Skip to content

feat: receive peer requests in original project conversations - #7419

Open
loopx-agent wants to merge 8 commits into
mainfrom
codex/project-recipient-20261026
Open

loopx-agent wants to merge 8 commits into
mainfrom
codex/project-recipient-20261026

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Original bound project conversations were discoverable, but peer delivery required a Goal/Agent receiver. This proposal adds an explicit original-conversation recipient while preserving its Goal=null Session, native thread and FIFO.

请求方显式选择已核验的原项目会话,本人在原会话中授权具体来源。请求由接收方独立判断,修订绑定的结论沿原请求方地址返回。

Behavior

  • Extend the existing TypeScript request, grant, revision, receipt and result owners. Existing Goal recipients retain their meaning; workspace grants and all_registered do not enroll this profile.
  • Persist exact operation and return-route identity before admission. Recheck source lineage, grant, binding, revision and cancellation before model input and return publication. Duplicate native-thread ownership rejects.
  • Expose discovery/request/control through manager inbox and collaboration MCP, and grants, queue/decision/results, unavailable readback and revocation in the original conversation. Peer input shows its purpose as Collaborator.
  • Correct the reviewed post-answer failure: after revision 1 had completed and been read, accepting revision 2 previously retained the old Turn key and could not execute the correction. Each accepted revision now receives one revision/digest-bound continuation in the same FIFO. Legacy revision-one keys remain readable; older answers remain immutable history.
  • Recover a lost corrected queue write by retrying the same correction or original publication. Recover a lost result write from that revision's saved structured answer without another model call. Superseded Turns refuse new model input/current publication; explicit cancellation uses the existing interrupt owner for this request's outstanding Turns.
  • Display queue/results for the current revision instead of labelling a corrected request as already read because an older conclusion exists. Keep both conclusions in the expanded history; expanded prose is 16px on desktop and 390px.

Validation and remaining holds

Candidate: ba0ea2a645451878a720c535e694bbcf95f52348. Integrated immutable main 22196e81db063cbfabb4ca5591fbb83c7bc987c0; the PR base remains main.

  • 30 File/SQLite integration cases pass, using the actual source, binding, HTTP, FIFO, request/revision and requester-return owners with scripted native transport. New cases complete/read revision 1, commit revision 2 while losing its queue write, retry concurrently, restart the native adapter, lose/recover the saved revision-two return, and verify unchanged Session/native thread and exactly two actual turn/start calls. A separate correction-at-native-write case verifies only revision 2 starts (one call).
  • 169 adjacent Python cases and 54 selected TypeScript owner cases pass. They cover ordinary conversation/Goal binding, queue preparation, MCP, exact source grants, revisions, return publication and receipts. Control-plane typecheck, packaged frontend build, configured mypy (17 files), required Ruff scope, diff hygiene and staged/head bilingual RFC checks pass. Earlier broad validation remains historical evidence; it is not a fresh all-suite claim.
  • The initial native premerge failed its module line budget after main integration. Same-function measurements show chat_runtime.py: main 2308 lines, previous PR 2313, integrated candidate 2319. Retain the peer admission/dispatch checks and main's six quota-recovery lines; update the reviewed line ceiling from 2313 to exactly 2319, without extra headroom. Actual Any count stays 34 (ceiling 37), dict[Any] count 0. No frozen experiment threshold changes.
  • Exact-head standard premerge: all 6 direct and 19 selected automatic checks pass. The native gate still returns manual_review_required (exit 1) for independent visual/privacy review of eight PNGs; it does not grant merge readiness.
  • Required browser failures remain blockers. Complete packaged typed-actions and research-finding-reader fail on both independently built immutable main and this candidate with identical header-geometry and research-label assertions. The three fixture files are unchanged between those scopes. Complete steward-group-trigger passes locally on both, so its remote failure remains unexplained. These observations do not waive required CI or establish a passing baseline.
  • Exact-scope quality receipt cqr_33503a65f8f228bc4f1c records fail; verification rejects it as a passing receipt. It retains the required browser failures and manual premerge hold as blockers, rather than using baseline attribution to waive them.
  • The original missing-continuation reproduction, intermediate native-write race failures and initial budget failure remain failed records. Final focused tests pass after the fixes. Full CI and an independent review of this new head, including all eight synthetic PNGs, remain outstanding.

The semantic advisory's four-value RECEIVER_DECISIONS carrier reuses existing decision meaning. The continuation reference extends the same typed request owner; Python performs fenced host IO. The bounded refactor shares enqueue/resume between publication and correction and avoids a second scheduler or policy owner.

支持范围为精确 source_session_v1 请求方和私有 Codex 项目接收方。旧请求方地址、群组及其他执行器继续不可用。当前验收覆盖显式 inbox/MCP 回传;自动 Goal 摘要投影、已安装 App/真实 provider、自然接收与采用、模型质量和长程成本收益仍未验收。此提案不构成合并、安装或发布授权。

Visual evidence

Primary question: which source may enter this original conversation, and what happened to the current request? Received work and explicit source grants are separate; expanding reveals complete briefs and historical conclusions. Long repeated content, mixed queue states, desktop and 390px reading were inspected. Escape returns focus to the original collaboration button.

All views use synthetic content, the actual owning HTTP/store/FIFO backend and scripted model transport. The unrelated portfolio/proposal read failures remain fixture limitations. These are packaged source views; there is no installed/live-provider qualification or hosted preview.

Original entry and mixed-state views, tested at 639dd6aa152ee806bc6ffc49e3912df261bbf931:

Original header before collaboration

Explicit grant and received requests

Expanded original request at 390px

Unavailable Session with retained revocation

Post-answer correction: same backend fixture with the previous frontend (1440px) and updated frontend (1200px). New assets and corrected source are recorded at ba0ea2a645451878a720c535e694bbcf95f52348:

Before: corrected request incorrectly appears already read

After: current revision is queued

Corrected request at 390px with 16px prose

Current and historical conclusions after execution, 1440px

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6.1-sol | OpenAI | reasoning_effort=max | runtime_reported

动机

A registered requester needs independent help from an existing private project conversation. Today the requester cannot address that original conversation without inventing a Goal recipient or relaying the material manually; the proposal routes an explicitly granted request into its original queue and returns the conclusion to the requester. The first authorized request, receiver decision and original-requester readback work in isolated File and SQLite integration. However, a correction accepted after the first answer has no reachable execution path at this head. Installed provider delivery, natural model quality, requester adoption and automatic Goal delegation-summary projection remain outside the qualified slice.

中文:首次接收、独立判断和回传已打通;但“收到结果后再纠正要求”的常见路径会停住,不能把成功写入修订记录等同于修订已被执行。

改动思路

The versioned address and explicit grant belong in the existing collaboration owner; Python supplies Chat/provider IO, while the original FIFO and result store retain their lifecycle responsibilities. The proposed boundary is one explicitly granted original-conversation request and its recovery; accepted corrections must use that same vertical path before this slice is complete. Discovery verifies the original App/operator/project/native-thread identity. It does not grant access. An exact source-to-recipient grant permits the registered requester to publish a request with an immutable return route. The receiver independently adopts, defers, rejects or reports no change; its existing workspace/tool permissions remain unchanged.

Trigger Owner and expected result Observed at this head
First authorized request Shared request store → existing Session FIFO → receiver → requester inbox Passes on File/SQLite
Lost conclusion write Saved actual answer → retry result IO, no new model call Passes on File/SQLite
Revocation before model input Fresh source/binding check refuses dispatch Passes
Correction after conclusion Current revision needs current work/result; older result stays historical Revision 2 accepted, but retry uses revision 1 answer and fails

This table explains the inspected source paths; the execution evidence is the isolated native-owner tests and packaged browser readback described below. Extending the shared typed recipient profile is preferable to a synthetic Goal or second project-only inbox. The necessary new persisted intent is the scoped grant; binding identity and view state derive from existing canonical observations.

具体改动

Exact reviewed head: c6d367914f1ec86a4869fee74a05b565262bcde0. The independent specification is docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md at bd03d0802d26643e71a1cb78f4a8d62188428e70 (accepted pre-change text). The new RFC wording is an implementation/status disclosure, not its own acceptance evidence. Criterion labels below refer to that section's existing numbered steps and identity/grant clauses:

  • recipient_identity — implemented: versioned binding/Session/native-thread identity, null Goal preserved; ambiguous ownership and changed provider/operator are refused.
  • explicit_source_grant — implemented: workspace grants and all_registered do not enroll this recipient. The owner grants the selected source in place; retained grants remain revocable when unavailable.
  • publication_fifo — implemented for the initial operation: original route, request and stable operation are persisted before enqueue; concurrent retry and publication/enqueue loss retain one original Turn.
  • receiver_revision_control — not met after a returned answer: the current correction is durably accepted but cannot reach another valid assessment/result. Minimum repair: connect the accepted revision to existing FIFO continuation and revision-aware return publication.
  • original_requester_return — implemented for the initial revision and lost-write recovery; the current-revision correction gap remains as above. Nothing authorizes an external-audience send.
  • packaged_management — implemented for discovery/grant/readback/revoke controls, with the stale current-result summary in the finding below still requiring repair. Installed provider qualification remains separate under the accepted contract.

关键代码讲解

  1. resolveOriginalConversationRecipient derives the versioned address from the current binding and canonical Session, including unique native-thread ownership. A path or Session ID alone is insufficient.
  2. planOriginalConversationRequest reuses source grants and shared publication/revision owners, preserves parent lineage and writes the exact requester route. The instruction explicitly distinguishes peer data from human authority.
  3. OriginalConversationRequests.publish performs fenced IO and enqueues peer-<request_id> in the original Session. Its existing-answer recovery branch is the correction failure described below.
  4. OriginalConversationRequests.execute rereads revision/grants before native input and saves actual structured output before result IO. That enables lost-write recovery without another model call. A stale saved answer must not become the execution path for a newly accepted revision.

对主干的风险

[P1] Make accepted post-answer corrections executable. At conversation_bindings.py:835–844, the queue key contains only the request ID. After revision 1 completes, control(revise) successfully commits revision 2, but creates no new continuation. Retrying the original operation retrieves the completed Turn and calls _complete_answer with its saved revision 1 answer. It raises original conversation answer belongs to a stale or cancelled request; the terminal Turn is never resumed. An independent production-owner reproduction fails identically on File and SQLite: current revision 2, assessment null, queue status completed, and only a revision 1 conclusion. The supplied regression tests cover correction before execution, which does not catch this boundary.

The packaged frontend reproduces the consequence: the row uses the corrected purpose while saying “结论待请求方读取” / “Conclusion awaiting requester”; expanding it reveals only “修订 1 的结论”. The current revision has neither assessment nor a queued continuation. Give an accepted new revision a revision-bound continuation through the existing FIFO and result owner, without replaying the old answer or duplicating a model call on same-revision retry. Until it has a current result, show the earlier conclusion as historical and the new revision as awaiting execution. Preserve cancellation, grants and original Session/thread/Goal identity. Add a regression that completes and reads revision 1, accepts revision 2, recovers across retry/restart, then observes exactly one revision 2 assessment/conclusion; keep the initial revision intact and verify no duplicate call on retry. If a correction cannot be executed within this slice, refuse it explicitly before committing success and expose its actual supported recovery route rather than silently stranding accepted work.

语义与 CI 对齐

The versioned recipient extends existing collaboration vocabulary and preserves old Goal addresses, request hashes and receipts. It does not create a durable Agent lifecycle or broaden filesystem, tool, cost or external-message authority. Typed schema checks distinguish the recipient profile; no prose/substr classifier was added. The current failure is a real revision-to-execution gap, not an objection to the intentional new profile. The source-level module-ceiling increases are bounded accounting changes around the existing host adapters; they do not waive semantic acceptance.

Reviewer validation: 138 Python tests passed, with 3 Win32-only skips; 19 selected TypeScript tests passed. Baseline unchanged legacy cohorts passed 109 tests with the same 3 platform skips, and those cases pass within the candidate cohort. The packaged build passed. Premerge passed all 6 direct checks and 19 selected catalog/risk/public-boundary checks; its exit remains manual_review_required for four PNG privacy/visual holds. I inspected all four synthetic images and their PNG metadata: no private operating context was found. This observation is not a merge-readiness or install claim. A separate future-Session scope probe passed on both backends: an existing grant did not enroll a newly created Session, while the original authorized request still completed. The new independent correction reproduction failed in both backends as described. The final head adds four browser-fixture corrections only (+25/−9); product, UI, tests and docs are byte-identical to the inspected predecessor 769419a. Their source evidence and packaged captures are reused at that recorded revision. I reran the correction at the final head (both backends still fail) and checked the four changed fixtures for syntax. Full unrelated browser scenarios were not rerun at the final head. GitHub CI was not queried or waited on.

我的整体评价

English verdict: REQUEST_CHANGES

Request changes conclusion (author-owned PR; GitHub blocks formal self-review). Initial delivery is useful and the existing-owner architecture is proportionate, but long-horizon continuation regresses once a successful request is corrected: accepted work stops behind an immutable old answer. User experience remains incomplete because the current brief and historical result can appear to be one pending result. The smallest repair is the revision continuation/result distinction above; neither a new queue nor the entire parent roadmap is required.

The panel separates received work from source grants and keeps expanded briefs readable, but the current-revision summary can present a historical conclusion as the pending current result. I inspected the actual packaged desktop after the correction, expanded the brief and closed with Escape; focus returned to the collaboration trigger. Reused desktop/narrow/unavailable images contain mixed states and long expanded Chinese content, with grants separated by a hairline and body-size reading text. Installed App/provider delivery, natural receiver adoption and portfolio sidebar status are unqualified; retained synthetic narrow/unavailable captures are reused after checking unchanged UI sources.

The new consent is justified only for an actually missing exact source grant; discovery, IDs and request formatting can be prepared by the Agent. Existing consent is reused, without another grant for each retry. No installed/natural-model effectiveness or cost improvement is established by these synthetic results. Re-review should execute the post-answer correction and a same-revision lost-return retry at the new exact head, retaining revocation/cancellation and ordinary human/registered-recipient controls.

…nt-20261026

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant