Repository navigation
refactor(channels): persist feedback through transcript workers - #165764
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 maintainer review before merge. Reviewed October 5, 2026, 5:30 PM ET / 21:30 UTC (Revision 2). ClawSweeper reviewWhat this changesMoves durable channel feedback persistence into the existing transcript workers while preserving missing-session results and native maintenance and incognito adapters. Merge readiness✅ Ready for maintainer review This PR remains useful: current main still performs feedback persistence on the caller thread, and the merged predecessor explicitly left this work outstanding. No actionable introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherChannel feedback recording accepts feedback events from channel plugins and saves them in the agent’s session transcript. The Gateway retains the selected session source while the existing database writer commits the event and acknowledges any projection work. flowchart TD
A[Channel feedback event] --> B[Retained session reader]
B --> C{Session exists}
C -->|No| D[Return false]
C -->|Yes| E[Existing transcript writer]
E --> F[Validate source and append event]
F --> G[Acknowledge committed result]
G --> H[Reconcile projection if needed]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +116, Tests +10, Docs +9. Total +135 across 7 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep feedback persistence under the existing reader, writer, and settlement owners with the released SDK contract preserved. Do we have a high-confidence way to reproduce the issue? Yes, source establishes current main’s caller-thread session read and append, and the submitted real-entry measurement records that SQL. This read-only review did not execute tests. Is this the best way to solve the issue? Yes, reusing the canonical writer and event kernel is a focused solution; the inspected path preserves native adapters and avoids a competing persistence owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0e54386a4634. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…claw#165764) * refactor(channels): persist feedback through transcript workers * docs(sessions): clarify feedback native adapters
What Problem This Solves
Recording channel feedback still reads the session and appends its transcript event on the Gateway thread, even though the entry point is asynchronous.
Why This Change Was Made
Retain the physical session reader through a synchronous append transaction in the existing agent writer. The transaction rereads the session identity, uses the existing event kernel, and returns an acknowledged projection receipt. Host authority is checked at transaction and commit; the existing FIFO and settlement owner retain accepted writes. Projection reconciliation starts after acknowledgment.
User Impact
Removes caller-thread SQLite from durable channel feedback without changing event bytes, schema, retention, or accepted SDK argument types. Missing sessions still return
false. Maintenance and process-held incognito retain their native adapter, which first-party SQLite test helpers also reuse.This is W4-01 reslice 1. The independent strict-turn harness sibling is #165793. The complete locked/Codex/delivery-mirror cutover is parked because its dependency closure exceeds the agreed size cap. Related predecessor: #165541. Overlap is permitted with #162433, #165710, and the concurrent database/session-authority lanes; whichever lands second merges main and adapts.
Evidence
a33accd27f3d; the affected source is byte-identical to this PR's4d94a9fac61f2base. The older parked draft's 36 count is not reused as current evidence.OPENCLAW_*names.pnpm test … --maxWorkers=1, 632.34 s wall. Includes the real feedback boundary, bounded-history indirect caller, message rewrite siblings, runtime-process build graph, reply import closure, and reconcile import closure. The new worker test took 15.08 s; it needs real transport/admission to detect caller-thread SQL. The existing dispatch tests took 0.48 s. Five MS Teams feedback authorization tests also passed in a separate 140.56 s wall run. PR CI timing is not yet available.The committed SDK API diff completed successfully (1581.07 s) and reports one representational signature change for
channel-inbound.recordChannelFeedbackEvent:Parameters<typeof appendTranscriptEvent>[1]becomes the sameTranscriptEventtype (unknown); no SDK export is added or removed and no surface budget is raised.check-changedran for 1595.02 s and stopped at inherited unused exports:resolveBrowserOpenCommandinsrc/commands/onboard-helpers.tsandsrc/infra/browser-open.ts, plusnormalizeMediaUnderstandingChatTypeinsrc/media-understanding/scope.ts. The unchanged pinned base reproduces all three (198.09 s). All 10 remaining owner-selected checks passed in a separate 1139.02 s run, including core/script lint, schema/storage guards, runtime import cycles, and webhook/pairing guards. No full green check-changed claim is made.Published-driver update proof: 2026.9.8 → exact candidate tree
1fc3dbcbbabeb210f9cc95e49246978b8db9e872passed, readiness HTTP 200, durable state retained and incognito restart behavior checked. Candidate package integrity passed; tarball SHA-256f83fbdeddc26e44d7a17c95fd978a83d968984c97edd62d9045c208c761462e9. Cell wall 260.60 s; package + cell command 1159.98 s. Testbox run, leasetbx_01m46rd2zqh7r02vf3hpj66msm, exited 0 and stopped after success. Its backing Actions step may show cancelled because the external lease was stopped.The final follow-up commit only corrects documentation about the private testing helper. Runtime, SDK, and package proof above bind runtime commit
4d6e7978c139; production bytes are unchanged by that documentation correction.Final-head validation: gateway runtime build passed (141.45 s), isolated MS Teams cold-import profile qualified with no gaps (2.26 s; child process group verified closed), and the edited documentation passed its MDX and diff checks.
Landing review at
c2ae375cb2b6db3548431462e2fbdf69fb8144db: compared the releasedchannel-inboundfeedback contract againstv2026.10.1-beta.1and stablev2026.9.8. The function remains asynchronous with the same parameters andPromise<boolean>result;TranscriptEventremainsunknown. No released export or callback contract is removed, so no deprecation adapter is needed. The new append helper is internal.CI attempt 1 (run 37366899278) completed its executed test and typecheck lanes successfully. Eight CI jobs were abandoned before any step executed during the GitHub Actions outage; the aggregate gate failed solely on those abandoned lanes. This is infrastructure failure, not passing coverage. GitHub reported Actions operational at 2026-10-05 21:54 UTC; the abandoned CI and analysis lanes were rerun once after that recovery was verified. All selected CI lanes passed in attempt 2 on the unchanged approved head. CodeQL security and critical quality, Node runtime conformance, and platform-scope checks also passed on their single recovery rerun. ClawSweeper completed an exact-head review at 2026-10-05 20:48 UTC with no actionable findings.
The PR-context check identified the original
Problemheading as missing the requiredWhat Problem This Solvessection. The heading now matches the repository template; the problem statement and runtime code are unchanged.