Skip to content

refactor(tasks): remove maintenance dependency registry - #155120

Merged
steipete merged 1 commit into
mainfrom
codex/task-maintenance-seam-retirement
Sep 22, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/task-maintenance-seam-retirement

Conversation

@steipete

@steipete steipete commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Task maintenance carries a mutable dependency registry and test-only setter/resetter around functions already owned by the task, session, and ACP runtimes.

User Impact

Maintenance keeps its existing liveness authority, recovery, retention, lazy ACP cleanup, currentness checks, and scheduler stop/join behavior.

Why This Change Was Made

Call the existing owners directly, retain the narrow ACP/backing/snapshot contracts, and move test substitutions into scoped spies that restore prior implementations. This removes 73 production lines. Test/support changes add 162 lines, for an overall increase of 89 lines.

Route six remaining database-backed suites through the existing process-isolated broker owner. Preserve the newer session-store fixture lifetime and awaited database closure already on main, including its existing broker route.

Related: #150153. Built on the landed runtime cleanup in #155157.

Evidence

  • Fresh P2 review is clean on the complete 20-file candidate; normal commit hooks preserved the reviewed tree.
  • Current-main qualification passed all four complete owner files: 103 session-store, 150 registry, 27 command, and one maintenance E2E case. The two routing registry checks and seven targeted route cases also passed: 290 distinct cases total. The 1,442 other routing-table cases were intentionally excluded.
  • Formatting, core/routing lint, and both command/state type configurations passed. All 48,017 raw source paths and modes matched the reviewed tree before and after execution. Native and wrapper exits were 0; canonical cleanup and independent completed provider state were verified. The separate external portal-sync warning is retained in the evidence.
  • Retained historical qualification includes 213 owner/sibling cases and a full build, ACP recursion red/green proof, 301 broker/fixture/ACK cases, and 178 runtime-composition cases. These remain evidence for their original source identities, not current-head full-suite proof.

Current source: commit 64e2690b684d2c1293e4a48d69d353511732522d, tree d16dd3255ca915e82deab4383c19baf0d993a70a, base 3aa130d87165ab08ce615238c8cc1a606ce19840. Exact-head PR CI remains required before landing. No production Gateway was exercised by this qualification.

@clawsweeper

clawsweeper Bot commented Sep 21, 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Sep 21, 2026
@steipete
steipete marked this pull request as ready for review September 21, 2026 19:31
@steipete
steipete force-pushed the codex/task-maintenance-seam-retirement branch from 4e41dfa to c5c18a3 Compare September 21, 2026 22:27
@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 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 9:18 PM ET / September 22, 2026, 01:18 UTC (Revision 2).

ClawSweeper review

What this changes

Task maintenance calls its existing runtime owners directly, while tests replace the removed dependency registry with restorable spies and existing database-worker routing.

Merge readiness

✅ Ready for maintainer review

Keep open. This remains a useful, distinct cleanup, and no actionable introduced defect was found. The maintainer-authored, protected PR is not eligible for automatic closure.

Priority: P3
Reviewed head: 64e2690b684d2c1293e4a48d69d353511732522d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with coherent fixture migration and no actionable introduced findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored internal refactor preserves maintenance authority and does not trigger the authority-proof exception. Reported owner-suite qualification is supplemental and is not presented as production Gateway proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored internal refactor preserves maintenance authority and does not trigger the authority-proof exception. Reported owner-suite qualification is supplemental and is not presented as production Gateway proof.
Evidence reviewed 8 items Pinned production change: The introduced diff replaces registry indirection with the same imported owners. The authority flag, recovery ordering, currentness assertions, lazy ACP closer, and retention operations remain intact.
Still distinct from current main: The maintenance production file is unchanged between the pinned merge base and fetched main; fetched main still contains the mutable dependency registry and test setters. No implemented-on-main or shipped-fix claim is established.
Preserved maintenance contract: The documented distinction between conservative offline maintenance and authoritative Gateway liveness remains implemented. The patch adds no configuration, persisted format, retention policy, or public plugin API.
Findings None None.
Security None None.

How this fits together

Task maintenance combines persisted task records with live runtime and session facts to recover interrupted work, identify lost tasks, and clean up completed work. Gateway scheduling and CLI inspection consume these maintenance operations.

flowchart TD
  A[Gateway scheduler or CLI] --> B[Task maintenance]
  C[Persisted task records] --> B
  D[Runtime and session owners] --> B
  B --> E{Liveness and retention checks}
  E --> F[Recovered or lost task status]
  E --> G[Session cleanup and record pruning]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -73, Tests +162. Total +89 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 1 64 137 -73
Tests 19 320 158 +162
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 20 384 295 +89

Review metrics

Metric Value Why it matters
Production versus test footprint production −73 lines; tests/support +162 lines net The growth moves substitution machinery into tests while reducing the production maintenance surface.

Technical review

Best possible solution:

Keep maintenance decisions with the existing runtime owners and confine test substitutions to restorable test support.

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

Not applicable: this PR removes internal test indirection rather than reporting a new product failure.

Is this the best way to solve the issue?

Yes. Direct calls preserve the existing owners and narrow helper contracts without adding another runtime abstraction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c803800ac2bc.

Labels

Label justifications:

  • P3: This is internal maintenance cleanup with no intended user-visible 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 maintainer-authored internal refactor preserves maintenance authority and does not trigger the authority-proof exception. Reported owner-suite qualification is supplemental and is not presented as production Gateway proof.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • JackS1237: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-21T22:47:37.978Z sha c5c18a3 :: needs maintainer review before merge. :: none

Use the existing maintenance owners directly and scope test substitutions through restorable spies. Preserve the session-store fixture lifetime already maintained on main and route the remaining six database-backed suites through their broker owner.
@steipete
steipete force-pushed the codex/task-maintenance-seam-retirement branch from c5c18a3 to 64e2690 Compare September 22, 2026 01:11
@steipete steipete changed the title refactor: remove task maintenance test overrides refactor(tasks): remove maintenance dependency registry Sep 22, 2026
@steipete
steipete merged commit 19fae01 into main Sep 22, 2026
203 checks passed
@steipete
steipete deleted the codex/task-maintenance-seam-retirement branch September 22, 2026 01:48
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
Use the existing maintenance owners directly and scope test substitutions through restorable spies. Preserve the session-store fixture lifetime already maintained on main and route the remaining six database-backed suites through their broker owner.

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations gateway Gateway runtime 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: 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