Skip to content

chore(deadcode): delete unused exports and model live Knip entrypoints - #204043

Merged
obviyus merged 3 commits into
mainfrom
fix/knip-unused
Nov 23, 2026
Merged

obviyus merged 3 commits into
mainfrom
fix/knip-unused

Conversation

@obviyus

@obviyus obviyus commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

The check-dependencies Knip reports pass again: unused exports are removed and five live files get their real entrypoints.

Part of #204008. Refs #198611.

Problem

check-dependencies fails in every scheduled main run (latest: 45147591436). The three Knip reports listed:

  • Unused files (5): scripts/e2e/lib/upgrade-survivor/{registry-tls,release-fixture,release-update}.mjs (added by test(e2e): run a T to T+1 upgrade-survivor scenario through update.run #203966 today) and test/manual-release-approval.{checks,config}.ts (added by feat(release): release fast-track system #201080). These are live: upgrade-survivor-docker.sh runs release-update.mjs by path, which imports the other two, and docs/reference/fast-track-release-approval.md runs the manual-only Vitest config by path. Knip could not see either entrypoint.
  • Unused exports (~45): exports whose last consumer moved or that never had one outside their own file.

Solution

  • Knip config: add release-update.mjs and the two manual approval files as entries; the manual checks suite is also a consumer in the scripts-export pass. Add openssl to ignoreBinaries (the release-update scenario mints its registry certificate with it).
  • Exports used only in their own file: drop export (and the matching .d.mts declarations).
  • Exports consumed only by focused tests (resetCronProviderBackoff, authorizeControlUiPluginCookieRequest, the lean post-ready bounds, TRIAL_BUDGET_MS) stay exported and are listed in the production config's existing test-only ignoreIssues block. CronProviderRunSlot is used through import(...) type queries that Knip does not follow; both configs ignore its type export.
  • Exports and test-support helpers with no use at all: delete them (spawnGatewayInstance, buildManagedServiceHandoffUnavailableMessage, mockGitInstallSurface, managedGateway, shape, recorded/settled, devTargetRefusalCases, expectUpdateFailureReport, expectDelegatedPluginDoctorInput, ValidatedFastTrackReference, panelTabStripCss) and the imports and re-exports that only they used.
  • Two tests that imported a removed export now go through the real path: the openclaw id unlink warning test checks the warning that runUnlink prints, and the tab-strip browser test loads panel-tab-strip.css?inline directly.

No runtime behavior changes.

Evidence

  • pnpm deadcode:report on main 6963e4f: fails (script, production and full-tree reports; same list as CI).
  • Same command on this branch: script, production and full-tree reports pass.
  • src/cli/id-cli-unlink.test.ts: 5/5 pass. tsgo:core, tsgo:scripts, tsgo:ui, tsgo:core:test, tsgo:test:root, tsgo:test:ui pass. oxlint and oxfmt clean on changed files.

- Drop or delete exports with no consumer outside their file.
- Model the release-update scenario and manual release-approval suite as Knip entries.

Co-authored-by: obviyus <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 23, 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 app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts docker Docker and sandbox tooling size: M labels Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 8b38391986cd3b6c9a11c30853a16b5a24495476
  • Maintainer: @obviyus
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/http-utils.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/operator-role-source-policy.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 23, 2026
@clawsweeper

clawsweeper Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR removes unused exports and helpers and declares dynamically invoked files as Knip entrypoints.

Example: Audit the release-update Docker scenario with pnpm deadcode:report.

  • Before: Knip cannot see the shell-invoked release-update.mjs entrypoint and reports its import tree as unused.
  • After: Knip follows the declared entrypoint and recognizes its dependencies.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful cleanup with reported audit passes, but source and exact-head CI establish broken live export contracts.
Proof confidence 🦐 gold shrimp (3/6) This behavior-preserving cleanup requires affected compiler, test, and audit validation; it introduces no user-visible runtime behavior requiring a live demonstration.
Patch quality 🦪 silver shellfish (2/6) 6 actionable review findings remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Scheduled dependency audits report dead exports and fail to recognize maintained commands invoked by path.
Reason: The maintainer-authored direction is appropriate and keeps the audit aligned with real execution paths without adding product settings or behavior.

Merge readiness

⛔ Needs changes before merge - 10 items remain

Keep this PR open: the cleanup is useful, but six export removals break existing production types or tests.

Priority: P2
Reviewed head: 6854758060a23b2bf6209e4ac0a4dc3370c30b50

Before merge

  • Restore the production CronProviderRunSlot export (P2) - This type is still referenced by import types in src/cron/isolated-agent/run-prepare-runtime.ts:40, src/auto-reply/reply/session-event-contract.ts:172, and src/cron/service/state.ts:250 and :272. Removing export makes those production contracts fail typechecking; exact-head validate annotations report the missing exported member. Retain the export rather than duplicating its shape in the callers.
  • Preserve the cron backoff reset used by existing fixtures (P2) - test/helpers/cron/service-regression-fixtures.ts imports this function and calls it during teardown, and src/cron/service.event-source.test.ts calls it directly. Those consumers remain unchanged, so privatizing the function produces resetCronProviderBackoff is not a function failures confirmed by this head's CI. Preserve the reset contract or migrate the fixtures to an equivalent existing reset owner.
  • Migrate cookie-authorizer tests before hiding their import (P2) - src/gateway/control-ui-plugin-auth-cookie.test.ts and src/gateway/server/plugins-http.test.ts still import and call authorizeControlUiPluginCookieRequest. The latter fails at line 400 with an undefined-function error in exact-head CI. Restore the export or move both suites through prepareControlUiPluginCookieRequest while preserving their admission assertions.
  • Update the lean-startup timing consumers in the same change (P2) - server-post-ready-release.test.ts imports all three constants, and server-runtime-services.maintenance.test.ts imports LEAN_POST_READY_FIRST_CHECK_MS. Making them private leaves missing named imports and invalidates the clock advances used to verify idle release and the maximum deferral. Keep the exports or migrate both test files while retaining those timing contracts.
  • Keep the launcher rollback test's trial budget available (P2) - src/update/launcher.test.ts:8 still imports TRIAL_BUDGET_MS. Its combined-budget rollback case uses that value to construct createdAt and verify the rollback reason. Privatizing the constant leaves an unresolved named import and prevents that existing regression from exercising the intended deadline. Retain the export or migrate the test's deadline setup and assertion together.
  • Preserve the watchdog subprocess test's parser contract (P2) - test/scripts/docker-e2e-watchdog.test.ts:64 dynamically imports parseTimeoutMs from a copied watchdog module and passes it to Array.map. After this removal the imported value is undefined, so the subprocess fails instead of validating timeout parsing and inert imports. The declaration companion also still advertises the export. Preserve it or migrate the subprocess test to exercise parsing through runWatchdog and update the declaration together.
  • Explain or restore the original intent of Cron provider-slot and reset exports - a2f7aa9: Provider backoff carries run-slot contracts across production modules and resets shared backoff state between regression cases; those consumers remain.
  • Explain or restore the original intent of HTTP cookie authorization export - f1a6dbd: The admission refactor retains admission-time cookie authorization and associated tests; privatizing the still-imported authorizer leaves those tests broken.
  • Explain or restore the original intent of Lean startup timing constants - 0e45cc7: The lean-startup repair introduced bounded maintenance deferral and tests that use its timing exports; those tests were not migrated.
  • Explain or restore the original intent of Resident launcher trial budget - be5f7fa: The resident launcher has a bounded trial budget, and its existing subprocess rollback test still imports that budget.

Findings

  • [P2] Restore the production CronProviderRunSlot export — src/cron/service/timer-execution-timeout.ts:73
  • [P2] Preserve the cron backoff reset used by existing fixtures — src/cron/service/provider-backoff.ts:29
  • [P2] Migrate cookie-authorizer tests before hiding their import — src/gateway/http-auth-plugin-cookie.ts:90

Provenance

  • Cron provider-slot and reset exports changes intended behavior without addressing why it exists (a2f7aa9: Provider backoff carries run-slot contracts across production modules and resets shared backoff state between regression cases; those consumers remain.)
  • HTTP cookie authorization export changes intended behavior without addressing why it exists (f1a6dbd: The admission refactor retains admission-time cookie authorization and associated tests; privatizing the still-imported authorizer leaves those tests broken.)
  • Lean startup timing constants changes intended behavior without addressing why it exists (0e45cc7: The lean-startup repair introduced bounded maintenance deferral and tests that use its timing exports; those tests were not migrated.)
  • Resident launcher trial budget changes intended behavior without addressing why it exists (be5f7fa: The resident launcher has a bounded trial budget, and its existing subprocess rollback test still imports that budget.)
Agent review details

How this fits together

Knip audits the repository import graph; its configuration must represent executable entrypoints while preserving exports consumed by production code and tests.

flowchart LR
  A[Shell and documented commands] --> B[Knip entrypoints]
  C[Production imports] --> D[Export consumers]
  E[Test imports] --> D
  B --> F[Knip reports]
  D --> F
Loading

Technical review

Best possible solution:

Keep the exact Knip entrypoints and genuine deletions while preserving live exports or migrating all their consumers together.

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

Existing consumers establish the missing-export paths, and exact-head CI confirms the CronProviderRunSlot, cookie-authorizer, and cron-reset failures; no target code was executed locally.

Is this the best way to solve the issue?

Exact entrypoint modeling and genuine dead-code removal are appropriate, but passing Knip cannot justify deleting exports that existing consumers still require.

Full review comments:

  • [P2] Restore the production CronProviderRunSlot export — src/cron/service/timer-execution-timeout.ts:73
    This type is still referenced by import types in src/cron/isolated-agent/run-prepare-runtime.ts:40, src/auto-reply/reply/session-event-contract.ts:172, and src/cron/service/state.ts:250 and :272. Removing export makes those production contracts fail typechecking; exact-head validate annotations report the missing exported member. Retain the export rather than duplicating its shape in the callers.
    Confidence: 1
  • [P2] Preserve the cron backoff reset used by existing fixtures — src/cron/service/provider-backoff.ts:29
    test/helpers/cron/service-regression-fixtures.ts imports this function and calls it during teardown, and src/cron/service.event-source.test.ts calls it directly. Those consumers remain unchanged, so privatizing the function produces resetCronProviderBackoff is not a function failures confirmed by this head's CI. Preserve the reset contract or migrate the fixtures to an equivalent existing reset owner.
    Confidence: 1
  • [P2] Migrate cookie-authorizer tests before hiding their import — src/gateway/http-auth-plugin-cookie.ts:90
    src/gateway/control-ui-plugin-auth-cookie.test.ts and src/gateway/server/plugins-http.test.ts still import and call authorizeControlUiPluginCookieRequest. The latter fails at line 400 with an undefined-function error in exact-head CI. Restore the export or move both suites through prepareControlUiPluginCookieRequest while preserving their admission assertions.
    Confidence: 1
  • [P2] Update the lean-startup timing consumers in the same change — src/gateway/server-post-ready-release.ts:10-12
    server-post-ready-release.test.ts imports all three constants, and server-runtime-services.maintenance.test.ts imports LEAN_POST_READY_FIRST_CHECK_MS. Making them private leaves missing named imports and invalidates the clock advances used to verify idle release and the maximum deferral. Keep the exports or migrate both test files while retaining those timing contracts.
    Confidence: 1
  • [P2] Keep the launcher rollback test's trial budget available — src/update/launcher.ts:11
    src/update/launcher.test.ts:8 still imports TRIAL_BUDGET_MS. Its combined-budget rollback case uses that value to construct createdAt and verify the rollback reason. Privatizing the constant leaves an unresolved named import and prevents that existing regression from exercising the intended deadline. Retain the export or migrate the test's deadline setup and assertion together.
    Confidence: 1
  • [P2] Preserve the watchdog subprocess test's parser contract — scripts/lib/docker-e2e-watchdog.mjs:5
    test/scripts/docker-e2e-watchdog.test.ts:64 dynamically imports parseTimeoutMs from a copied watchdog module and passes it to Array.map. After this removal the imported value is undefined, so the subprocess fails instead of validating timeout parsing and inert imports. The declaration companion also still advertises the export. Preserve it or migrate the subprocess test to exercise parsing through runWatchdog and update the declaration together.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Knip executable and test-consumer modeling keeps the original intent (b764572: The prior audit repair preserves live test-consumed exports while the full-tree pass checks their actual consumers; the new exact executable roots follow the documented entrypoint contract.)
  • Deleted unused update and Gateway test helpers keeps the original intent (cb5cfb2: History identifies recovery-test scaffolding; current reference searches find no remaining consumers of the deleted helpers.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

Acceptance criteria:

  • pnpm deadcode:report
  • pnpm tsgo:core
  • pnpm tsgo:test
  • pnpm test src/cron/service.event-source.test.ts src/gateway/control-ui-plugin-auth-cookie.test.ts src/gateway/server/plugins-http.test.ts src/gateway/server-post-ready-release.test.ts src/gateway/server-runtime-services.maintenance.test.ts src/update/launcher.test.ts test/scripts/docker-e2e-watchdog.test.ts src/cli/id-cli-unlink.test.ts
  • git diff --check

What I checked:

Likely related people:

  • Vincent Koc: Raw commit b764572 adds config/knip.config.ts:1227 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b7645726f23a; files: config/knip.config.ts)

PR surface

Source -9, Tests -132, Other +8. Total -133 across 30 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 17 21 30 -9
Tests 8 15 147 -132
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 5 14 6 +8
Total 30 50 183 -133

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: This is useful CI cleanup with focused compile and test regressions, without an established production outage.
  • add merge-risk: 🚨 automation: Removing exports still used by production types and test suites directly breaks validation after merge.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This is useful CI cleanup with focused compile and test regressions, without an established production outage.
  • merge-risk: 🚨 automation: Removing exports still used by production types and test suites directly breaks validation after merge.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 23, 2026, 6:18 AM ET / 11:18 UTC.

obviyus and others added 2 commits November 23, 2026 16:52
- Restore exports that focused tests or import() type queries consume; list them in Knip ignoreIssues.
- Drop declarations for exports removed from .mjs modules.

Co-authored-by: obviyus <[email protected]>
- docker-e2e-watchdog.test.ts imports parseTimeoutMs by file URL; declare that seam in Knip.

Co-authored-by: obviyus <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot removed the docker Docker and sandbox tooling label Nov 23, 2026
@obviyus

obviyus commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer override: the remaining reds on head 8b38391 are not caused by this PR.

ci-triage 204043 output:

# PR #204043 head 8b38391986cd; main run 45165162201
checks-node-changed-compact-large-10	src/flows/doctor-health.legacy-update.test.ts	MAIN-ALSO
checks-node-changed-compact-large-15	src/gateway/mcp-http.personal-authority.test.ts	MAIN-ALSO
checks-node-changed-compact-large-27-1	src/gateway/server-methods/agents-mutate.test.ts	MAIN-ALSO
checks-node-changed-compact-large-27-1	src/gateway/server-methods/question.own-run.test.ts	MAIN-ALSO
checks-node-changed-compact-large-27-1	src/gateway/server-methods/sessions-create-device-folder.test.ts	MAIN-ALSO
checks-node-changed-compact-large-27-1	src/gateway/server-methods/sessions-diff.test.ts	MAIN-ALSO
checks-node-changed-compact-large-33-1	src/gateway/mcp-http.async-scope.test.ts	MAIN-ALSO
checks-node-changed-compact-large-38-1	src/gateway/server-methods/environments.suggested-profile.test.ts	MAIN-ALSO
checks-node-changed-compact-large-38-1	src/gateway/server-methods/models-auth-status.test.ts	MAIN-ALSO
checks-node-changed-compact-large-38-2	src/gateway/server.sessions.create.projects.test.ts	OURS
checks-node-changed-compact-large-38-3	src/gateway/server.config-security-policy.test.ts	MAIN-ALSO
checks-node-changed-compact-large-38-4	src/gateway/server-methods/agent.test.ts	MAIN-ALSO
checks-node-changed-compact-large-39	src/gateway/server-methods/question.session-access.test.ts	MAIN-ALSO
checks-node-changed-compact-large-4-3	src/gateway/server.sessions.create.lifecycle.test.ts	MAIN-ALSO
checks-node-changed-compact-large-7-2	src/gateway/server.sessions.create.durability.test.ts	MAIN-ALSO
checks-node-changed-compact-large-8-2	src/gateway/openclaw-id/member-profile-role-recovery.test.ts	MAIN-ALSO
checks-ui (1/3)	src/lib/toast.browser.test.ts	OURS
  • This PR removes export from symbols, deletes unused test helpers and edits Knip config. It changes no runtime code path. The changed-file plan ran many gateway shards only because the PR touches widely imported modules.
  • server.sessions.create.projects.test.ts fails a forbidden refusal assertion in "repository children inherit independent sources": the same class as the one-time-admission refusal tests above that fail on scheduled main (CI: scheduled main run 45131412779 red in jobs without an owner issue #204008, groups A1-A5). The test imports none of the changed modules.
  • toast.browser.test.ts fails a WebKit layout case ("stacks three behind the newest", 258 vs 44 px). This PR changes no toast code or style.
  • android-ktlint: Gradle could not reach its Maven repository (Repository MavenRepo is disabled due to earlier error).
  • checks-node-changed-2: the runner stayed in "Setup Node environment" until the job limit cancelled it; its log blob returns 404.
  • Knip proof: pnpm deadcode:report passes all three reports locally on this branch; PR CI does not select check-dependencies.

@obviyus
obviyus merged commit ea8d95b into main Nov 23, 2026
161 of 178 checks passed
@obviyus
obviyus deleted the fix/knip-unused branch November 23, 2026 12:41
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
openclaw#204043)

The `check-dependencies` Knip reports pass again: unused exports are removed and five live files get their real entrypoints.

Part of openclaw#204008. Refs openclaw#198611.

## Problem

`check-dependencies` fails in every scheduled `main` run (latest: 45147591436). The three Knip reports listed:

- **Unused files (5):** `scripts/e2e/lib/upgrade-survivor/{registry-tls,release-fixture,release-update}.mjs` (added by openclaw#203966 today) and `test/manual-release-approval.{checks,config}.ts` (added by openclaw#201080). These are live: `upgrade-survivor-docker.sh` runs `release-update.mjs` by path, which imports the other two, and `docs/reference/fast-track-release-approval.md` runs the manual-only Vitest config by path. Knip could not see either entrypoint.
- **Unused exports (~45):** exports whose last consumer moved or that never had one outside their own file.

## Solution

- Knip config: add `release-update.mjs` and the two manual approval files as entries; the manual checks suite is also a consumer in the scripts-export pass. Add `openssl` to `ignoreBinaries` (the release-update scenario mints its registry certificate with it).
- Exports used only in their own file: drop `export` (and the matching `.d.mts` declarations).
- Exports consumed only by focused tests (`resetCronProviderBackoff`, `authorizeControlUiPluginCookieRequest`, the lean post-ready bounds, `TRIAL_BUDGET_MS`) stay exported and are listed in the production config's existing test-only `ignoreIssues` block. `CronProviderRunSlot` is used through `import(...)` type queries that Knip does not follow; both configs ignore its type export.
- Exports and test-support helpers with no use at all: delete them (`spawnGatewayInstance`, `buildManagedServiceHandoffUnavailableMessage`, `mockGitInstallSurface`, `managedGateway`, `shape`, `recorded`/`settled`, `devTargetRefusalCases`, `expectUpdateFailureReport`, `expectDelegatedPluginDoctorInput`, `ValidatedFastTrackReference`, `panelTabStripCss`) and the imports and re-exports that only they used.
- Two tests that imported a removed export now go through the real path: the `openclaw id unlink` warning test checks the warning that `runUnlink` prints, and the tab-strip browser test loads `panel-tab-strip.css?inline` directly.

No runtime behavior changes.

## Evidence

- `pnpm deadcode:report` on `main` bc8f08f: fails (script, production and full-tree reports; same list as CI).
- Same command on this branch: script, production and full-tree reports pass.
- `src/cli/id-cli-unlink.test.ts`: 5/5 pass. `tsgo:core`, `tsgo:scripts`, `tsgo:ui`, `tsgo:core:test`, `tsgo:test:root`, `tsgo:test:ui` pass. oxlint and oxfmt clean on changed files.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
…ate acts on it (#201668)

* fix(update): verify recorded data-at-risk marks before repair acts on them

* fix(update): verify any unverified data-at-risk mark and honor receipts in handoff recovery

* fix(update): recognize a Git release-mode service as its checkout's own

* fix(update): check a recorded data-at-risk mark before the next update, including already-current runs

* fix(update): lead data-at-risk refusals with triage and record them on the refused run

* fix(update): keep data-at-risk refusals within the recorded warning limit

* test(e2e): finish the seeded data-at-risk run with a terminal phase

* fix(update): name the agent route in killed-update recovery refusals

* fix(update): drop an unused import

* test(update): expect the agent route in killed-update refusals

* fix(update): verify the newest mark before restoration without comparing run ids

* fix(update): address review: keep the Gateway down on any inconsistent mark, resolve all marks, harden release ownership

* fix(update): break the admission-root import cycle and type the e2e schema read

* fix(update): address rating findings: agent rollback leftovers, helper restart, blocking findings first, shared Git metadata

* test(e2e): prove the next plain update resolves a mark with the Gateway running

* fix(update): address rating round 2: refuse marks before Doctor, registry-based rollback check, handoff fallback, async history read

* test(update): pick the repair run, not a settlement row, in the data-at-risk cell

* fix(update): resolve live-writer marks after Doctor holds the state

* fix(doctor): say a skipped stale-Gateway stop left the PID running

* fix(update): address rating round 3: leftovers before deferrals, retained rollback files, refusal after Doctor fails finalization

* docs(update): note retained rollback files and refusals after Doctor

* fix(doctor): say a stale Gateway stop could not be confirmed when nothing shows it running

* fix(update): address landing review: revert release-mode ownership, check leftovers first, handoff entry guard, durable rollback evidence

* test(update): follow main's Git release link layout in the launcher refusal test

* fix(update): treat uninspectable leftovers and unreadable databases as unchecked; true wording after Doctor

Release adaptation: Retain the stable installed-recovery harness. Do not add main's installed Docker service cell, later retired by #203808, or Git release-launcher wording/test because stable uses the in-place Git updater. Keep the state-verification, next-update, repair and interrupted-handoff paths and their compatible regressions.

Companion audit: #203486 is present-equivalent at 3081077 (preserved). #201978 is selected next in this lane. #203808 and #203966 involve the inapplicable installed service-cell layout; #203497 and #203194 change main's package/Git activation layout and are not applicable; #204017 depends on that release-install layout. #204077, #204043, #203555 and #203520 are independent authority, cleanup, helper-fixture and config-validation changes. #204151, #203917, #203849 and #203406 are separate guidance, cleanup or status changes, not required by the data-risk verifier. #203569 fixes a separate cron receipt fixture in the same Doctor suite; the touched stale-stop cases do not depend on it.

(cherry picked from commit a28f211)
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit f8d4bc138ed2512c413cf96f66fe0eefb3b28d65)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui cli CLI command changes gateway Gateway runtime merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts security-sensitive-changed size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant