Repository navigation
test: finish Gateway cleanup and repair CI fixtures - #156136
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. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 23, 2026, 7:17 AM ET / 11:17 UTC (Revision 14). ClawSweeper reviewWhat this changesThe PR makes test cleanup await accepted writes, synchronizes Gateway and Telegram test fixtures, supplies missing fixture dependencies, and classifies two developer scripts correctly for dependency checks. Merge readiness✅ Ready for maintainer review The PR remains useful: current main still cancels accepted SQLite followers in composite test cleanup. The fixture repairs preserve meaningful assertions, and this review found no blocking correctness or security defect. Priority: P2 Review scores
Verification
How this fits togetherThese test helpers exercise OpenClaw’s Gateway requests, session storage, and developer tooling. They coordinate asynchronous work and resource cleanup so tests observe completed behavior before retiring their fixtures. flowchart TD
A[Test requests and queued writes] --> B[Gateway and session fixtures]
B --> C[Await owned work and publication]
C --> D[Assert responses and persisted results]
D --> E[Retire fixture storage]
F[Copied developer tooling] --> G[Complete dependencies and trusted workflow identity]
G --> D
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +62, Other 0. Total +62 across 10 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep fixture synchronization with the existing lifecycle owners while preserving the behavioral assertions and production contracts. Do we have a high-confidence way to reproduce the issue? Yes, source provides a clear reproduction path: hold a SQLite writer, queue a follower, then invoke main’s composite cleanup, which rejects pending followers. This review did not execute tests. Is this the best way to solve the issue? Yes, reusing the canonical drain and retirement helpers repairs fixture ownership without introducing competing cleanup logic or weakening the tested outcomes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bffdc770bf7a. 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 (13 earlier review cycles; latest 8 shown)
|
87ba045 to
cfc4b11
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review The current head also joins the terminal owner-clear notification in the lifecycle-persistence test. The PR body records both green packed agent/chat runs and the focused proof for this separate CI fixture repair. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
8d8941b to
95484db
Compare
|
@clawsweeper re-review The merge conflict is resolved on the current rebased head. All six retained commits are patch-identical; the duplicate lifecycle-test correction was dropped because #156014 now joins the same full persistence promise on main. The base retains that repair and its active-owner assertions. Gateway integration proof is being renewed for the base's SQLite worker-close changes. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
95484db to
5d40c50
Compare
|
@clawsweeper re-review The current five-file follow-up reuses the canonical queue drain already landed in #156172. It finishes the non-destructive composite cleanup and resume-store retirement paths, and retains the proven abort-event and Telegram-port fixture fixes. The PR body records the narrowed scope, the failing-before/passing-after cleanup regression, and 70 passing focused tests. The duplicate queue implementation and overlapping weak queue test were removed. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
5d40c50 to
83c2ef4
Compare
|
Merged via squash auto-merge.
|
Incorporate the upstream Gateway test correction from #156136 and #156460 instead of duplicating it. The original five-file icon-control patch remains patch-equivalent (68ff51f01760ab97321206d323990196ec0fe23b), with no package.json or AGENTS.md delta against the refreshed base. Co-authored-by: hxy91819 <[email protected]>
* test(gateway): finish queued-write cleanup and fixture joins * test(gateway): join dispatch error before late abort * test(ci): complete fixtures for build warning helpers Keep isolated lint and changelog fixtures complete after build-warning helper imports were added. Verify the reusable workflow identity exported to its trusted relay checkout while preserving artifact-only transport guards. * fix(ci): classify workflow script roots as development tooling Keep the warning relay and Swiftlint wrapper visible to full-tree audits without treating developer executables as shipped production entrypoints. * test(telegram): observe completed control writes directly Join the exact command artifact write in the synthetic run fixture instead of relying on directory notifications. Preserve the recorder-exit precondition and both cancellation deadlines.
What Problem This Solves
Completes the write-queue cleanup work landed in #156172. The composite session-store test helper still rejected accepted SQLite followers, and the resume fixture could retire storage before the shared drain completed. It also repairs fixture failures exposed by the complete CI run.
User Impact
Test cleanup lets accepted SQLite writes finish before retiring storage, using the canonical agent-write drain and Gateway fixture retirement owner. No production API, configuration, schema, or timeout changes are introduced.
Why This Change Was Made
The composite cleanup joins accepted agent writes instead of cancelling queued followers. The resume fixture keeps its store selected until producers and writers settle. The original participant-root detachment and queue implementation landed independently on main and are reused here.
Three timing-sensitive fixtures now synchronize with their actual owners: abort authorization joins event publication and a same-WebSocket response barrier; the late-abort test joins session admission and a history response before asserting its established error; the synthetic Telegram Gateway receives a continuously reserved listener through IPC.
The latest integration run also exposed deterministic fixture omissions after main's build-warning changes. Copied lint and changelog fixtures now include their required imports, and the install-smoke test verifies the validated reusable-workflow identity consumed by its directly pinned relay checkout. The two CI/developer executable roots remain visible to Knip without being classified as shipped production entrypoints. Artifact-only transport and trusted-SHA assertions remain intact.
Evidence
95484db11c31: all three reported files together (105 tests, 84.80s wall), the runtime group (19 files / 157 tests), and two quiet full agent/chat shard runs, each 81 files / 1,165 tests (595.46s and 616.93s wall). Both used the exact groups payload with default three forks, file parallelism, andisolate:false: run A, run B. The final follow-up reuses main's equivalent canonical queue owner and has fresh focused and GitHub proof.OPENCLAW_TESTBOX=1 pnpm check:changedpassed during the original implementation, including all typechecks, 25 core-test shards, 28 lint shards, three export scans, and structural guards: check run. Later fixture corrections have separately scoped checks and review.Earlier CI also encountered main's UI type error, corrected in
813a10e7deb, and the build-warning omissions described above. One initial focused attempt ran zero tests because concurrent SDK declaration generation changed compiler inputs; generation was joined before successful proof. A supplemental changed check stopped on formatting; the files were formatted before the final check. The final-head results and remaining evidence gaps are recorded below.A final macOS/Node 26 diagnostic found that the synthetic control command was written and the recorder exited within 700 ms, but its directory watcher never delivered the notification; a separate write/chmod probe also delivered no event within five seconds. The fixture now signals after the real write to the exact command path succeeds and restores the original writer during cleanup. Both 1.5-second assertions remain unchanged, and isolated P2 review is clean. A subsequent loaded-Mac replay (load 45) passed four of seven cases and also hit provider-startup and separate restart-watcher failures; these remaining local failures are not claimed fixed. The final isolated Linux run passed all 141 tests across the 13 Node test files, including all seven composition cases, in 10.03s test time on the unchanged deadlines: proof run. Its source capsule matches the committed observer SHA-256
b5eaab547cbbf332d3c34925ed7b2195e41b03b724ee9758b082dd9a6eed91f1; the one-shot Testbox stopped after success. This proves the Linux fixture boundary and does not erase the loaded-Mac observations.CI on
910ad27used main058e664f5cb, before two owning fixes landed. The branch now includes main's9bb3ccca699revert of the projection-settlement regression and91ee6aa3de1correction of the UI footer fixture's missing pane-ID callback. All five PR commits remain patch-identical across this rebase. The revert preserves the canonical scoped write drains; the PR does not modify any reverted file. The five affected Gateway fixture files passed together on final7ae1a27: 195 tests, 285.08s Vitest / 287.94s wrapper wall with one worker, including resume, RPC fixture, create, permission-root, and permissions-hooks. The canonical wrapper verified the exact source/tree, and the Testbox stopped after success: post-revert proof.The final native merge check found an overlapping main change in the abort-authorization test. Inspection confirmed its complete file blob is byte-identical to this PR (
6f9d26b11aba844f7cfc0b8287cfe067ffbe66bb), so main has independently adopted the same event join. The remaining delta and proof are unchanged.Merged as
ceb109668b4396181205e330a2b466c132fede89after final-head CI and a clean ClawSweeper review. Final mixed tooling-shard walls were 423s (small-42), 548s (small-41), and 901s (small-38); these are whole-shard costs, not individual fixture times. Native source/receipt verification and branch/worktree closeout completed.