Repository navigation
fix(codex): show who sent a group-chat request - #170709
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR places the admitted sender’s stable identity beside the current Codex request in both context-projection paths. Example: Alice receives a roster reply, then Bea sends “i am Bea coded wdym”.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open: it repairs a concrete attribution gap still present on current main, and no actionable code findings remain. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Codex plugin projects admitted user messages and conversation history into native turn/start text inputs, which Codex uses to produce the agent’s reply. flowchart LR
A[Channel message] --> B[User turn admission]
B --> C[Codex prompt preparation]
D[Conversation history] --> E[Context projection]
C --> E
E --> F[Native turn start]
F --> G[Agent reply]
Technical reviewBest possible solution: Keep bounded, inert sender labels adjacent to current requests under the existing Codex projection owner. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically emits the unlabeled request suffix reported on an official release; model misattribution was not independently exercised during this read-only review. Is this the best way to solve the issue? The repair targets the existing projection owner, reuses admitted metadata, preserves intentional request mentions, and adds no configuration or competing attribution path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 758febd268c8. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +119. Total +119 across 5 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 13, 2026, 3:35 AM ET / 07:35 UTC (Revision 3). |
Preserve stable sender attribution beside projected current requests while neutralizing native selection syntax only in generated labels. Cover both turn-start projection paths and remove redundant formatter scaffolding. Co-authored-by: sunlit-deng <[email protected]>
|
Merged via squash.
|
* fix(codex): label current group-chat request sender * fix(codex): keep current sender metadata inert Preserve stable sender attribution beside projected current requests while neutralizing native selection syntax only in generated labels. Cover both turn-start projection paths and remove redundant formatter scaffolding. Co-authored-by: sunlit-deng <[email protected]> * test(codex): infer sender fixture metadata without casts * test(codex): preserve fake deadline during question delivery --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: sunlit-deng <[email protected]>
What Problem This Solves
Fixes #170159: in a group conversation, Codex can answer the newest participant as if they were the previous speaker because the current request lacks an adjacent sender label.
User Impact
The current request carries the admitted sender's stable identity and available display labels. Name-only metadata remains unattributed. No configuration, migration, or public API change is required.
Why This Change Was Made
Both context-engine and continuity projection now pass the admitted current message to the existing Codex projection owner, which reuses the same bounded sender formatter as historical messages. Only the generated label is neutralized for native skill/plugin mention syntax; intentional mentions in the request remain intact.
Original fix by @sunlit-deng; maintainer cleanup removes a redundant label intermediate, replaces a metadata cast with the existing record reader, and strengthens regression coverage. A neighboring question-refresh fixture now flushes zero-delay question delivery without advancing its fake run deadline during cold asynchronous setup. This preserves the generated-metadata intent of #150490.
Evidence
87b0295824773still appends the bare prompt afterCurrent user request:. Historical labels already use the sender formatter and native-mention neutralizer. Sibling Codex source confirms explicit skill/plugin selection scans text inputs.context-engine-projection.test.ts:places stable current sender provenance beside the request (history: %s)covers history and empty-history requests;does not infer current sender identity from display names without a stable IDcovers anonymous metadata.turn/startinrun-attempt.context-engine.test.ts:bootstraps and assembles a compaction summary before the Codex turn startsandplaces inert sender provenance beside a continuity-projected request without escaping request mentionsverify adjacent attribution, inert$deploy/plugin display metadata, and preserved intentional request mentions.oxfmt --writepassed on all five changed files. Local lint: directoxlint --no-ignore --tsconfig config/tsconfig/oxlint.core.jsonpassed (initial 4-file pass and follow-up 2-file CI-repair pass, 5 unique files, 231 rules, zero diagnostics); the temporary config excludes only the unrelatedui/**/*.tsxSolid override because its plugin is unavailable in this nested install. All applicable rules remain enabled.git diff --checkpassed.eefc97130d85609fde1356fe7d52107fb98056f7(30 successful jobs, 30 inapplicable jobs skipped), including production types, test types, lint, and repository checks. The projection shard passed 190 tests, and the turn lifecycle shard passed 229 tests with 3 skips. All current-sender and question-refresh cases passed.ClawSweeper's P2 native-mention finding and duplicate security/provenance concern are addressed by neutralizing only generated sender metadata. Its live-proof-only request (including the Telegram E2E label) is superseded by the maintainer policy above. The latest completed ClawSweeper review of the prior head confirms the prior native-mention finding is fixed and reports no actionable code findings; its remaining prior-head CI request is resolved by the final green run.
CI repair: the first run passed both turn/start regressions but found an excess-property error in the test metadata helper and a fake-clock publication timeout in the neighboring question-refresh fixture. The helper now infers its metadata shape without a cast; the fixture keeps its existing wait and timeout but flushes only zero-delay tasks, retaining its exactly-once, steering, answer, and persistence assertions. Both corrections passed lint/format and independent P0–P2 review before the final push, and both formerly failing jobs passed on the final head. No CI rerun or inherited-failure exception was used.