Skip to content

test(agents): split subagent task-settlement test support under the line cap - #159584

Merged
steipete merged 1 commit into
mainfrom
fix/live2-task-settlement-split
Sep 27, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/live2-task-settlement-split

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

src/agents/subagents/registry/subagent-registry.task-settlement.test-support.ts has grown to 846 physical lines (811 counted by oxlint max-lines, limit 700). It is not in config/max-lines-baseline.txt, which is a shrink-only ratchet. Whenever node scripts/check-changed.mjs runs the full core lint lane, it fails on this file, so unrelated PRs hit a red gate caused by main.

Why This Change Was Made

The module is split along its two concerns into two concept-named test-support modules:

  • subagent-registry.completion-settlement.test-support.ts (351 counted lines);
  • subagent-registry.restored-settlement.test-support.ts (481 counted lines).

The only importer, subagent-registry.test.ts, is updated. Test bodies and registration order are unchanged. No baseline entry or suppression was added, and no production code changed. All nine registration helpers are still used.

The other file currently over the cap on main, src/gateway/session-row-projection.ts, is handled by #159473 and is untouched here.

User Impact

None for users. It restores the check-changed core lint lane for PRs.

Evidence

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 27, 2026 10:03
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: L labels Sep 27, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 6:10 AM ET / 10:10 UTC.

ClawSweeper review

What this changes

Splits subagent settlement test support into completion and restored-run modules and updates the registry test suite to import them.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main still has the over-limit test helper, and this coherent branch has no demonstrated replacement or introduced defect. The related state-file repair addresses a separate lint failure.

Priority: P3
Reviewed head: 1bedcbc9b18eaa76102cce0011eab0e002252a0b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving test-support split with clear source evidence and no actionable patch finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The repository state identifies a member-authored, test-only module split, so contributor runtime proof is not required. The reported Testbox checks support the lint and test intent but are not exact-head CI proof; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository state identifies a member-authored, test-only module split, so contributor runtime proof is not required. The reported Testbox checks support the lint and test intent but are not exact-head CI proof; no stored-data contract changes.
Evidence reviewed 8 items Current main still needs the split: The fetched main revision retains the original 846-line task-settlement support file and its suite import.
Enforced line cap: Oxlint sets a 700-counted-line error limit for source files; the original helper has no entry in the max-lines baseline.
Split module sizes: The new completion and restored-run support modules have 370 and 497 physical lines respectively, both below the 700-counted-line limit.
Findings None None.
Security None None.

How this fits together

The subagent registry tracks delegated agent runs, including completion and recovery after a restart. Its test support registers settlement scenarios in a Vitest suite that CI tests and lints.

flowchart LR
  A[Delegated run scenarios] --> B[Settlement test support]
  B --> C[Registry test suite]
  C --> D{Lint and test checks}
  D --> E[CI results]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +18. Total +18 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 383 365 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 383 365 +18

Review metrics

Metric Value Why it matters
Support-module line cap 370 and 497 physical lines; 700 counted-line limit Both resulting modules fit the enforced limit even before blank lines and comments are excluded.

Technical review

Best possible solution:

Retain the behavior-preserving split under the line cap and handle the separate state-file overage through its own repair.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main has the 846-line helper under a 700-counted-line lint rule and no baseline entry. This read-only review did not execute lint.

Is this the best way to solve the issue?

Yes. The split keeps the existing settlement cases and registration order while bringing both support modules below the cap.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 87795936be44.

Labels

Label changes:

  • add P3: This is a focused test and lint maintenance change with no intended user-facing 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: The repository state identifies a member-authored, test-only module split, so contributor runtime proof is not required. The reported Testbox checks support the lint and test intent but are not exact-head CI proof; no stored-data contract changes.

Label justifications:

  • P3: This is a focused test and lint maintenance change with no intended user-facing 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: The repository state identifies a member-authored, test-only module split, so contributor runtime proof is not required. The reported Testbox checks support the lint and test intent but are not exact-head CI proof; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@steipete
steipete merged commit b505b36 into main Sep 27, 2026
237 of 240 checks passed
@steipete
steipete deleted the fix/live2-task-settlement-split branch September 27, 2026 10:46
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 27, 2026
* commit '69809d7a94277d01be964bd1cbbb7aa0ebc58c9b': (219 commits)
  perf(agents): serialize large model requests once (#159574)
  refactor(cli): share capability agent-selection test cases (#159616)
  fix(workers): restore installation type checks (#159629)
  test(channels,qa,providers): remove low-value tests (batch d065) (#159627)
  test(doctor): run isolated migration cases concurrently (#159609)
  feat(apple): show agent identities in native chat (#159528)
  chore(i18n): refresh native locales (#159635)
  fix(gateway): keep node provisioning's installation contract after overlapped preparation
  fix(models): keep shared catalog requests alive for remaining callers (#157191)
  feat: let agents query online people and device activity (#159117)
  perf(gateway): first cloud dispatch prepares worker artifacts one after another (#159520)
  refactor(android): deslop Android app third pass (#159589)
  test(qa-lab,openshell,slack,reef,team-reports): remove low-value tests (batch d064) (#159607)
  fix: align process liveness checks (#151107) thanks @ekinnee
  fix: sessions model default does not clear the override (#159587)
  fix(ios): preserve typing during reentrant SwiftUI updates
  fix(ci): frozen 2026.8.33 validation fails on inherited test clock (#159594)
  perf(gateway): avoid duplicate recipient row lookup (#159595)
  refactor(gateway): deslop gateway fourth pass (#158786)
  test(agents): split subagent task-settlement test support under the line cap (#159584)
  ...
vincentkoc added a commit that referenced this pull request Sep 27, 2026
* commit '69809d7a94277d01be964bd1cbbb7aa0ebc58c9b': (219 commits)
  perf(agents): serialize large model requests once (#159574)
  refactor(cli): share capability agent-selection test cases (#159616)
  fix(workers): restore installation type checks (#159629)
  test(channels,qa,providers): remove low-value tests (batch d065) (#159627)
  test(doctor): run isolated migration cases concurrently (#159609)
  feat(apple): show agent identities in native chat (#159528)
  chore(i18n): refresh native locales (#159635)
  fix(gateway): keep node provisioning's installation contract after overlapped preparation
  fix(models): keep shared catalog requests alive for remaining callers (#157191)
  feat: let agents query online people and device activity (#159117)
  perf(gateway): first cloud dispatch prepares worker artifacts one after another (#159520)
  refactor(android): deslop Android app third pass (#159589)
  test(qa-lab,openshell,slack,reef,team-reports): remove low-value tests (batch d064) (#159607)
  fix: align process liveness checks (#151107) thanks @ekinnee
  fix: sessions model default does not clear the override (#159587)
  fix(ios): preserve typing during reentrant SwiftUI updates
  fix(ci): frozen 2026.8.33 validation fails on inherited test clock (#159594)
  perf(gateway): avoid duplicate recipient row lookup (#159595)
  refactor(gateway): deslop gateway fourth pass (#158786)
  test(agents): split subagent task-settlement test support under the line cap (#159584)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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