Skip to content

refactor: finish commitments retirement bookkeeping - #122143

Merged
steipete merged 2 commits into
mainfrom
steipete/commitments-feature-removal-ecbfd2
Aug 11, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/commitments-feature-removal-ecbfd2

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The commitments feature was removed in #121479, but two stale references remained and the intentionally deferred physical schema cleanup had no durable, machine-checked record.

This follow-up is deliberately separate from #118488, which landed independently. It contains no heartbeat behavior changes.

Why This Change Was Made

This removes the stale commitments entry from the completeness rubric and the obsolete focused-test routing entry, then adds a declarative schema-retirement ledger with a contract test.

The ledger records shared-state commitments as planned for schema v7, including its five named indexes. The table remains physically present but inert in the current v6 shared schema: this PR does not approve, implement, or perform a schema bump or migration.

Only the per-agent state_leases retirement is recorded as completed at agent schema v17. Shared state_leases, agent_database_leases, Teams Get Poll plugin state, and ACPX process-lease records are distinct live surfaces and remain unchanged.

User Impact

No runtime behavior, CLI, configuration, dependency, public API, protocol, generated database type, or product documentation changes. This is internal retirement bookkeeping that prevents the deferred schema cleanup from being forgotten or applied to unrelated live lease and poll state.

Runtime production LOC: +0/-0. Declarative schema metadata: +26/-0. Tests: +133/-0. Internal support/reference cleanup: +1/-5. Aggregate: +160/-5 across four files.

No changelog entry is included because this is internal retirement bookkeeping.

Evidence

Validated on exact head eaf0a638aa6cce728c73984a1a69427f8560e9b6 after rebasing onto origin/main at a496fd148ede83a0927d8c58c556f96fbc3d3365:

  • Retirement ledger contract: 1/1 passed.
  • Test-project routing suite: 243/243 passed.
  • Targeted oxfmt and Oxlint passed.
  • Native state schema version guard passed at v6.
  • git diff --check origin/main...HEAD passed.
  • Exact four-path changed dry-run selected core, coreTests, scripts, docs, and tooling.
  • Fresh branch autoreview through P2 was clean; secret scan was clean.

Related completed removal: #121479

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Aug 11, 2026
@steipete
steipete marked this pull request as ready for review August 11, 2026 16:45
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 11, 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 Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 12:51 PM ET / 16:51 UTC.

ClawSweeper review

What this changes

This PR removes stale commitments references and adds a tested ledger that records the shared commitments table for a future state-schema v7 retirement.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking correctness or security finding: the PR removes references to a deleted feature and records, without performing, the separately approved future schema retirement. It remains open because it is maintainer-authored and labeled maintainer; exact-head CI and a human merge decision are still required.

Priority: P3
Reviewed head: eaf0a638aa6cce728c73984a1a69427f8560e9b6
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned cleanup with no blocking finding; current-base exact-head checks remain the final merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-authored internal metadata PR; the real-behavior gate does not apply, and the body reports focused exact-head contract validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-authored internal metadata PR; the real-behavior gate does not apply, and the body reports focused exact-head contract validation.
Evidence reviewed 5 items Stale test routing remains on current main: Current main still maps the absent commitments runtime path to tests; the PR deletes that obsolete entry.
Shared schema is intentionally unchanged: Current state schema version is 6 and still defines the commitments table and all five ledger indexes; the current-main-to-head comparison shows no changes to schema owners or legacy compatibility paths.
Ledger test checks the intended boundary: The added test requires planned entries to be exactly the next schema version and still present, while completed entries must be absent from the current canonical schema.
Findings None None.
Security None None.

How this fits together

OpenClaw’s shared and per-agent SQLite schemas define persistent runtime state and upgrade rules. The new ledger reads those canonical schemas in a contract test and records which retired objects still exist versus which are already gone.

flowchart LR
A[Removed commitments feature] --> B[Stale references removed]
A --> C[Shared state schema v6]
C --> D[Retirement ledger]
D --> E[Contract test]
E --> F[Future approved v7 migration]
Loading

Decision needed

Question Recommendation
Should this maintainer-authored ledger contract be merged now as the durable record for the future v7 commitments migration? Merge the retirement ledger: Accept the tested v7 plan while leaving the current v6 schema and live shared lease state untouched.

Why: The source proves the change is intentionally bookkeeping rather than an approved schema migration, but the protected maintainer workflow requires a human merge judgment.

Before merge

  • Resolve merge risk (P1) - The branch is behind current main and exact-head CI is still running; refresh the merge/review evidence if the final merge ref changes. Any physical v7 cleanup must separately receive SQLite migration approval and remove the retained compatibility and additive-schema references together.
  • Complete next step (P2) - No repair lane is needed: this protected maintainer PR has no discrete defect and awaits human merge judgment plus exact-head CI.
Agent review details

Security

None.

PR surface

Source +26, Tests +133, Docs 0, Other -4. Total +155 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 1 26 0 +26
Tests 1 133 0 +133
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 4 -4
Total 4 160 5 +155

Review metrics

Metric Value Why it matters
Production versus test LOC runtime production +0/-0; declarative metadata +26; tests +133; support/docs +1/-5 The change adds no runtime path; its new surface is a checked retirement record and contract coverage.

Stored data model

Persistent data-model change detected: serialized state: src/state/openclaw-schema-retirements.json, serialized state: src/state/openclaw-schema-retirements.test.ts, unknown-data-model-change: src/state/openclaw-schema-retirements.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the v6 schema unchanged now, merge the ledger if reviewers accept its v7 plan, and perform physical commitments retirement only in a separately approved migration that updates all remaining schema compatibility paths.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the v6 schema unchanged now, merge the ledger if reviewers accept its v7 plan, and perform physical commitments retirement only in a separately approved migration that updates all remaining schema compatibility paths.

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

Not applicable: this is an internal cleanup and contract-record PR, not a report of a user-visible failure.

Is this the best way to solve the issue?

Yes. Recording the deferred deletion while preserving v6 is safer than prematurely dropping persisted schema objects or conflating them with live shared lease state.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is low-risk internal bookkeeping with no user-visible runtime, configuration, or schema mutation.
  • 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 is a maintainer-authored internal metadata PR; the real-behavior gate does not apply, and the body reports focused exact-head contract validation.

Label justifications:

  • P3: This is low-risk internal bookkeeping with no user-visible runtime, configuration, or schema mutation.
  • 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 is a maintainer-authored internal metadata PR; the real-behavior gate does not apply, and the body reports focused exact-head contract validation.

Evidence

What I checked:

Likely related people:

  • obviyus: Authored the merged commitments-removal PR that this bookkeeping follow-up explicitly completes. (role: feature-removal author; confidence: medium; commits: 4b0151682ef4)
  • Yuval Dinodia: Current shared-schema and agent-retirement lines blame to this contributor at the available history boundary. (role: current shared-schema contributor; confidence: medium; commits: 01d84e18a4f6; files: src/state/openclaw-state-schema.sql, src/state/openclaw-agent-db-schema.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • If a rebase or merge-ref refresh is needed, let the resulting exact-head checks complete before merge.

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

Copy link
Copy Markdown
Contributor Author

Land-ready evidence for exact head eaf0a638aa6cce728c73984a1a69427f8560e9b6:

  • The follow-up removes the two remaining retired commitments references and adds a declarative schema-retirement ledger plus contract test. Runtime production LOC is +0/-0; shared schema remains v6 with no migration or version bump.
  • OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=<unique> node scripts/run-vitest.mjs src/state/openclaw-schema-retirements.test.ts — 1/1 passed.
  • OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=<unique> node scripts/run-vitest.mjs test/scripts/test-projects.test.ts — 243/243 passed.
  • Targeted oxfmt and node scripts/run-oxlint.mjs src/state/openclaw-schema-retirements.test.ts passed.
  • node scripts/check-native-state-schema-version.mjs passed at v6.
  • git diff --check origin/main...HEAD passed.
  • node scripts/check-changed.mjs --dry-run -- <the exact four changed paths> selected core, coreTests, scripts, docs, and tooling.
  • Fresh branch autoreview through P2 and its secret scan were clean.
  • Exact-head pull_request CI run https://github.com/openclaw/openclaw/actions/runs/31514120063 succeeded, including openclaw/ci-gate.
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 122143 passed in hosted_exact_or_recent_parent mode against the same head; no separate remote lease was needed.

ClawSweeper reported no findings. Its only optional Rank-up move applies if a rebase or merge-ref refresh is needed; neither is needed here, the PR is mergeable, and exact-head CI is green. Behind-main drift is advisory under the native landing policy.

Known proof gap: no live runtime scenario was run because this PR introduces no runtime loader or behavior. Direct import inspection shows only the contract test loads the manifest; the focused schema contract and exact-head CI cover the changed boundary.

@steipete
steipete merged commit 6792921 into main Aug 11, 2026
182 of 184 checks passed
@steipete
steipete deleted the steipete/commitments-feature-removal-ecbfd2 branch August 11, 2026 16:59
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 12, 2026
* refactor(commitments): remove remaining retired references

* refactor(state): track schema retirements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. scripts Repository scripts size: S 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