Repository navigation
test(update): assert closed-tick advice with retained post-completion steps - #207759
Merged
Merged
Conversation
… steps #207640 removed post-terminal admission of the deleted native post-activation inspection steps. This test still wrote those step names, so main dropped them and failed deterministically. Keep the watcher's closed-tick advisory custody contract and assert it with the step families that are still admitted (recovery-artifact-cleanup receipts and the plugins step that plugin maintenance writes).
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 29, 2026
… steps (openclaw#207759) ## What Problem This Solves Scheduled CI on `main` fails deterministically in `src/infra/update-run-ledger.post-activation.test.ts` ("retains post-activation advice from a closed tick scope without reopening the update"): the run history holds only `requested`, so the assertion at line 86 fails (scheduled run 46186339900, job `checks-node-compact-large-38`). Reproduced locally on `6bdbd80a`: 1 failed, 2 passed. Cause: openclaw#207640 removed the post-terminal admission of the `post-activation doctor inspections` step names from `applyUpdateRunStep` (`src/infra/update-run-write.ts`), because openclaw#207585 deleted the native inspection writer that recorded them. This test still writes those names after the run finishes, so the ledger now drops them correctly. Putting the four names back makes the test pass again, which confirms the cause. ## Fix Test only. The test keeps covering the live contract: the update-run watcher takes advisory work after the caller's tick scope closes, and `stop()` joins that work. Plugin maintenance uses this contract (`schedulePluginMaintenance` in `src/update/gateway-trial.ts`). The test now writes step families that the ledger still admits after a run finishes: - `recovery-artifact-cleanup` receipts; - the `plugins` step that plugin maintenance writes. ## User Impact None. No production code changes. No user loses advice: no current code records `post-activation doctor inspections` through `recordUpdateRunStep` after a run finishes. The shipped legacy `update finish` path writes those receipts through `recordUpdateRunDiagnostic` (`src/cli/update-cli/update-command-migrate.ts`), which upserts without the terminal-admission check. ## Evidence - Base `6bdbd80a`: the test fails as on scheduled CI (steps contain only `requested`). - Base plus the 4 removed admission names put back: 3/3 pass (cause confirmed; experiment not committed). - This head: `src/infra/update-run-ledger.post-activation.test.ts` 3/3 pass; oxfmt and oxlint clean. Co-authored-by: Ayaan Zaidi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Scheduled CI on
mainfails deterministically insrc/infra/update-run-ledger.post-activation.test.ts("retains post-activation advice from a closed tick scope without reopening the update"): the run history holds onlyrequested, so the assertion at line 86 fails (scheduled run 46186339900, jobchecks-node-compact-large-38). Reproduced locally ona737f425: 1 failed, 2 passed.Cause: #207640 removed the post-terminal admission of the
post-activation doctor inspectionsstep names fromapplyUpdateRunStep(src/infra/update-run-write.ts), because #207585 deleted the native inspection writer that recorded them. This test still writes those names after the run finishes, so the ledger now drops them correctly. Putting the four names back makes the test pass again, which confirms the cause.Fix
Test only. The test keeps covering the live contract: the update-run watcher takes advisory work after the caller's tick scope closes, and
stop()joins that work. Plugin maintenance uses this contract (schedulePluginMaintenanceinsrc/update/gateway-trial.ts). The test now writes step families that the ledger still admits after a run finishes:recovery-artifact-cleanupreceipts;pluginsstep that plugin maintenance writes.User Impact
None. No production code changes. No user loses advice: no current code records
post-activation doctor inspectionsthroughrecordUpdateRunStepafter a run finishes. The shipped legacyupdate finishpath writes those receipts throughrecordUpdateRunDiagnostic(src/cli/update-cli/update-command-migrate.ts), which upserts without the terminal-admission check.Evidence
a737f425: the test fails as on scheduled CI (steps contain onlyrequested).src/infra/update-run-ledger.post-activation.test.ts3/3 pass; oxfmt and oxlint clean.