Skip to content

ci(update): fail main when the installed package exceeds the updater entry budget - #197269

Merged
steipete merged 3 commits into
mainfrom
codex/installed-tree-budget-guard
Nov 11, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/installed-tree-budget-guard

Conversation

@steipete

@steipete steipete commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Related: #196079, #196418, #197153

What Problem This Solves

Fixes: nothing in CI goes red when a change pushes the installed package past the 50,000 entries that published 2026.9.x updaters accept, so main can silently become uninstallable for those users.

User Impact

No user-visible change. Scheduled main validation now fails within the hour when the npm-installed package exceeds the release budget, before such a build can be released and strand 2026.9.9 and 2026.9.36 (extended-stable) users on the built-in updater.

Why This Change Was Made

#196079 let the transcript worker's private build reach Doctor's cold-restore graph. The installed tree grew from about 45,400 to 50,927 entries, and published 2026.9.9 and 2026.9.36 updaters refused main with "Package rollback verification entry limit exceeded". #197153 (from #196418) removed that import edge. That fixed the regression, but nothing had caught it.

  • The 47,500-entry budget check lived only in Package Acceptance, which main never reaches on a schedule: Update Migration is blocked at image prep.
  • The hourly published-driver cell uses the latest published driver, which degrades past the walk cap instead of refusing.

This PR closes both gaps:

  • Published-driver cell: after a successful update, the cell measures the tree its driver installed and asserts the existing release budget with the existing checker. The Docker harness now mounts that checker.
  • Build test: a tsdown test builds the retirement-read worker with its real private config and bounds its emitted files, so this exact edge fails a tooling test.

Rejected alternatives:

  • Running npm installs on every PR: a full package build per PR is a CI cost and policy call, left to maintainers.
  • Raising the budget: shipped updater caps are frozen.

Evidence

All native runs were on Crabbox AWS c7a.8xlarge, with packages relabelled 2026.11.30 and npm 12.

Build npm 12 installed entries dist/config/sessions/transcript-*
main 7bf2160 (before #197153) 50,927 (over budget) 5,595
#196418 change carried onto 7bf2160 45,766 434
this head c2f4c03 (main 83fd655 + this PR) 45,856 –

Published updater lanes ran openclaw update --yes --tag <tarball> from fresh published installs with a managed systemd Gateway:

Updater Pre-#197153 main With the fix This head
2026.9.9 rc=1 at package-swap, "Package rollback verification entry limit exceeded", still healthy on 9.9 rc=0 in 437 s, healthy on 2026.11.30 –
2026.9.36 (--channel stable) the same refusal rc=0 in 435 s rc=0 in 433 s, healthy on 2026.11.30 (c2f4c03)

Guard and test:

  • Budget checker (measureInstalledPackageTree + evaluateInstalledPackageBudget): reports ["entries"] on the 50,927-entry tree and [] on the fixed tree.
  • Real published-driver Docker cell: scripts/e2e/published-driver-update-docker.sh with a build:ci-artifacts candidate of this head and the latest driver (2026.11.3) passed. It wrote installed-tree.json with 45,855 entries, so the mount and the assertion run inside the container.
  • tsdown retirement-read test: red before fix(sessions): keep transcript workers outside Doctor repair imports #197153 ("expected 5408 to be less than 1500"), green on this head (58 emitted files).
  • Static checks: oxfmt, oxlint, git diff --check, the test-lines ratchet (33-line allocation) and tsgo:core are clean.

Review:

  • autoreview at P2 is scoped-clean.
  • An independent Codex review found that the harness didn't mount the checker. That is fixed in this PR, and the re-review reported no findings.

Credit: the regression test comes from RoboClaw's #196418, credited as co-author.

steipete and others added 3 commits November 11, 2026 07:14
… cell

The 47,500-entry budget check only ran in Package Acceptance, which main never
reached on a schedule (Update Migration is blocked at image prep), and the
hourly published-driver cell uses the latest published driver, which degrades
past the walk cap instead of refusing. So #196079 pushed main past the 50,000
entries that 2026.9.x updaters enforce without any CI going red.

Measure the tree the published driver actually installed and assert the same
release budget, so scheduled main validation goes red within the hour.

Refs #196079
#196079 let the transcript worker's private build reach Doctor's cold-restore
graph, which pushed the installed package past the 50,000 entries that
2026.9.x updaters accept; #197153 fixed the import edge. Build the
retirement-read worker with its real private config and require it to stay
small, so the edge cannot come back unnoticed: 5,408 emitted files before
#197153, 58 after.

Refs #196079
Refs #196418

Co-authored-by: RoboClaw <[email protected]>
The published-driver cell imports scripts/check-openclaw-installed-package-budget.mts,
which the harness did not mount, so the cell would fail on import.
@clawsweeper

clawsweeper Bot commented Nov 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 docs Improvements or additions to documentation scripts Repository scripts docker Docker and sandbox tooling size: S labels Nov 11, 2026
@steipete
steipete marked this pull request as ready for review November 11, 2026 15:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T15:49:24.175571Z c2f4c03 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete merged commit d3942b5 into main Nov 11, 2026
183 of 186 checks passed
@steipete
steipete deleted the codex/installed-tree-budget-guard branch November 11, 2026 16:00
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 12, 2026
…entry budget (openclaw#197269)

* ci(update): enforce the installed-tree budget in the published-driver cell

The 47,500-entry budget check only ran in Package Acceptance, which main never
reached on a schedule (Update Migration is blocked at image prep), and the
hourly published-driver cell uses the latest published driver, which degrades
past the walk cap instead of refusing. So openclaw#196079 pushed main past the 50,000
entries that 2026.9.x updaters enforce without any CI going red.

Measure the tree the published driver actually installed and assert the same
release budget, so scheduled main validation goes red within the hour.

Refs openclaw#196079

* test(sessions): bound the retirement-read worker build

openclaw#196079 let the transcript worker's private build reach Doctor's cold-restore
graph, which pushed the installed package past the 50,000 entries that
2026.9.x updaters accept; openclaw#197153 fixed the import edge. Build the
retirement-read worker with its real private config and require it to stay
small, so the edge cannot come back unnoticed: 5,408 emitted files before
openclaw#197153, 58 after.

Refs openclaw#196079
Refs openclaw#196418

* ci(update): mount the installed-tree budget module in the Docker harness

The published-driver cell imports scripts/check-openclaw-installed-package-budget.mts,
which the harness did not mount, so the cell would fail on import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling docs Improvements or additions to documentation scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant