Repository navigation
fix(ci): restore subagent announce-loop guard coverage - #116307
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 4:24 AM ET / 08:24 UTC. ClawSweeper reviewWhat this changesThe PR updates the subagent announce-loop guard test mock to provide incremental SQLite registry persistence and verifies that cleanup persists the affected run ID. Merge readinessKeep this maintainer-authored PR open for normal maintainer review. The merged registry-persistence change introduced the incremental SQLite helper that this focused test mock must expose; the six-line patch restores coverage of the announce-loop cleanup path without changing runtime behavior. Priority: P3 Review scores
Verification
How this fits togetherThe subagent registry tracks active and completed subagent runs while the agent runtime decides whether to announce a completion or give up after restart/cleanup conditions. Registry lifecycle changes are persisted through the SQLite store, and this test isolates that boundary so the cleanup guard remains covered. flowchart LR
A[Subagent lifecycle event] --> B[Registry cleanup guard]
B --> C[Announce or restart decision]
B --> D[Incremental registry persistence]
D --> E[SQLite run records]
B --> F[Guard test mock]
F --> G[Cleanup persistence assertion]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +6. Total +6 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Merge the focused test-double update after the remaining required checks complete, preserving the explicit assertion that announce-loop cleanup uses exact-row persistence. Do we have a high-confidence way to reproduce the issue? Yes, from source and the patch context: the guard test's SQLite mock omits the incremental persistence export now used by the registry cleanup path, preventing the intended cleanup assertions from being reached. I did not execute the test in this read-only review. Is this the best way to solve the issue? Yes. Updating the existing mock at the module boundary and asserting the exact persisted run ID is narrower and more maintainable than weakening production persistence or removing the cleanup coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cc570a74532e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…n-dedupe * origin/main: (25 commits) fix(qqbot): use Gateway timezone for reminders (#116294) test(openai): cover out-of-order named mark acks docs(openai): clarify cumulative playback marks test(openai): cover sustained unnamed mark acknowledgements fix(openai): preserve playback acknowledgement order test(openai): verify bounded playback acknowledgements fix(openai): bound realtime playback marks test(agents): mock incremental registry persistence (#116307) fix(memory-core): MEMORY.md compaction deletes user notes written under a promotion-style heading (#116180) feat(reply): annotate recent history images (#100866) chore(ios): refresh native i18n inventory fix(ios): isolate capability router handlers docs(ios): cut 2026.7.22 release notes docs(hooks): document validation responses test(qa): assert hook account rejection reasons fix(gateway): validate hook delivery accounts perf(gateway): bound prepared runtime startup work (#116261) fix(agents): prevent registry stalls during large fan-outs (#116286) fix(sqlite): preserve replaced snapshot targets on Windows (#116284) fix(ci): load frozen shard runner without repository fetch (#116273) ...
…n-dedupe * origin/main: (25 commits) fix(qqbot): use Gateway timezone for reminders (openclaw#116294) test(openai): cover out-of-order named mark acks docs(openai): clarify cumulative playback marks test(openai): cover sustained unnamed mark acknowledgements fix(openai): preserve playback acknowledgement order test(openai): verify bounded playback acknowledgements fix(openai): bound realtime playback marks test(agents): mock incremental registry persistence (openclaw#116307) fix(memory-core): MEMORY.md compaction deletes user notes written under a promotion-style heading (openclaw#116180) feat(reply): annotate recent history images (openclaw#100866) chore(ios): refresh native i18n inventory fix(ios): isolate capability router handlers docs(ios): cut 2026.7.22 release notes docs(hooks): document validation responses test(qa): assert hook account rejection reasons fix(gateway): validate hook delivery accounts perf(gateway): bound prepared runtime startup work (openclaw#116261) fix(agents): prevent registry stalls during large fan-outs (openclaw#116286) fix(sqlite): preserve replaced snapshot targets on Windows (openclaw#116284) fix(ci): load frozen shard runner without repository fetch (openclaw#116273) ...
Related: #116286
What Problem This Solves
Resolves a CI failure where the subagent announce-loop guard tests stopped reaching their cleanup assertions after the registry persistence path added exact-row SQLite writes.
Why This Change Was Made
The test's SQLite module mock did not expose the new incremental-write helper, so strict persistence threw inside the mocked cleanup path and rolled the test entry back. The mock now implements that dependency and asserts the affected run ID is persisted.
User Impact
No runtime behavior changes. CI again exercises the restart give-up path instead of failing in an incomplete test double.
Evidence
subagent-registry.announce-loop-guard.test.tsfailed 2 of 5 tests withcleanupCompletedAtunset.oxfmt --checkandgit diff --checkpassed.