Skip to content

fix(ci): restore subagent announce-loop guard coverage - #116307

Merged
vincentkoc merged 1 commit into
mainfrom
fix/subagent-registry-announce-loop-guard
Jul 30, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/subagent-registry-announce-loop-guard

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

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

  • Before: subagent-registry.announce-loop-guard.test.ts failed 2 of 5 tests with cleanupCompletedAt unset.
  • After: 1 file, 5 tests passed.
  • oxfmt --check and git diff --check passed.
  • Codex autoreview: no actionable findings; patch correct at 0.98 confidence.

@vincentkoc vincentkoc self-assigned this Jul 30, 2026
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Jul 30, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 30, 2026 08:20
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 4:24 AM ET / 08:24 UTC.

ClawSweeper review

What this changes

The 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 readiness

⚠️ Ready for maintainer review - 1 item remains

Keep 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
Reviewed head: b142ca3a34679c3b28e7b7eee56990969bf9f82e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, contract-aligned test repair with clear rationale and reported targeted validation; no correctness defect was found in the patch.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only PR does not change user-facing runtime behavior; focused test output in the PR body is the relevant validation evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only PR does not change user-facing runtime behavior; focused test output in the PR body is the relevant validation evidence.
Evidence reviewed 4 items Patch matches the new persistence boundary: The PR adds the named incremental persistence helper to the test double and asserts it receives the current entry's run ID after cleanup. This directly matches the exact-row persistence behavior introduced by the related merged change.
Merged prerequisite change: The related merged PR introduced exact-row SQLite persistence for hot registry mutations, including lifecycle cleanup; this test-only follow-up repairs a mock that no longer represents that module contract.
Current-main relationship: The branch targets current main at cc570a7, after the merged registry persistence work, and its only changed file is the guard test that imports the SQLite store seam.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

  • Complete next step (P2) - The patch has no concrete automated repair need; as a maintainer-authored PR carrying the maintainer label, it should proceed through normal maintainer merge review once required checks complete.
Agent review details

Security

None.

PR surface

Tests +6. Total +6 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 6 0 +6
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 6 0 +6

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a small internal CI and regression-coverage repair with no stated runtime behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only PR does not change user-facing runtime behavior; focused test output in the PR body is the relevant validation evidence.

Label justifications:

  • P3: This is a small internal CI and regression-coverage repair with no stated runtime behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only PR does not change user-facing runtime behavior; focused test output in the PR body is the relevant validation evidence.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Authored the related merged exact-row registry persistence change and this narrowly coupled test-mock repair. (role: recent area contributor; confidence: high; commits: d30d22d33c17, b142ca3a3467; files: src/agents/subagent-registry.store.sqlite.ts, src/agents/subagent-registry.announce-loop-guard.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc
vincentkoc merged commit ec53d0e into main Jul 30, 2026
162 of 170 checks passed
@vincentkoc
vincentkoc deleted the fix/subagent-registry-announce-loop-guard branch July 30, 2026 08:27
vincentkoc added a commit that referenced this pull request Jul 30, 2026
…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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 31, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 31, 2026
…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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant