Skip to content

fix(updater): bundle the interim Team deployment controller - #168319

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-controller-into-update-skill-20260919
Oct 10, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-controller-into-update-skill-20260919

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Team updater skill needs an installable, verifiable controller from an OpenClaw commit while native openclaw update completes the migration and recovery handoff.

User Impact

Operators can stage a complete four-file closure from this repository. Night Watch remains the executor, per-deployment approval remains required, and automatic deployment stays disabled. Adoption requires the incumbent's approved expectations in a private operator profile. This PR performs no deployment, restart, schema migration, or package publication; it claims no runtime speedup.

Why This Change Was Made

Imports the deploy controller, release library, pinned suspension bundle, startup profiler, and standalone Node tests from Manager d02035d40a9a2a9d73afee700aec26a10d1c66a9. The README records original source hashes, install ownership/modes, complete-pair adoption, exclusions, and the native replacement boundary. The generated bundle's TypeBox license is retained.

Deployment-specific channel, model-agent, policy, and handoff endpoint expectations now come from a required private operator profile. The suspension bundle and startup profiler are byte-identical to the specified source. The deploy script and library differ through documented privacy substitutions and nine review repairs: absent user-bus handling, PID generation checks during source export, same-phase optional-profile closure, pointer-publication failure propagation, pre-mutation workspace containment, captured transcript-generation checks, rollback handoff ordering, restored predecessor verification, and persistent timer catch-up settlement. Persisted record formats are unchanged. Tests use synthetic identities and endpoints and retain the production ownership and capacity guards.

The old mutable updater, installer/inventory test, one-off host transaction tools, service/timer templates, and historical provenance bundle are excluded. Existing service configuration stays operator-owned. Imported JavaScript retains source formatting because the bundle hash and boundary fixtures depend on exact bytes. Changed-path routing recognizes this specific skill owner as maintainer tooling; its Node tests stay outside default Vitest projects.

The requested non-TypeScript-test diff filter reports 41 files, +33,869/-5 lines (it includes the opt-in .test.mjs files). The four runtime files add 22,908 lines, including the unchanged 9,205-line generated suspension bundle; the small routing change removes one net line. This growth is the requested relocation of an existing installed deployment/recovery contract. Its removal requires proven native replacement and settlement of legacy transactions.

Evidence

Validation uses disposable Linux; no suites, builds, or typechecks ran on the saturated development host.

  • Crabbox hetzner, lease cbx_5bb790109896: full imported Node suite with real root-owned Node/Bun, bubblewrap, synthetic services/state, and disk-backed temporary storage. Initial full run: 793 root tests, 786 passed and 7 failed, no skips (1,910.24 s); ordinary-user offline Doctor: 237/237 passed, no skips (513.91 s). The failures exposed fixture assumptions plus the missing-table regression. Both complete affected sibling files then passed 66/66 tests, no skips (572.99 s); the 15 affected release cases also passed, no skips (489.48 s). Every one of the seven initial failures has a passing replay.
  • Rig fallback, /srv/rig/wt-lane727: node scripts/check-changed.mjs --staged passed, including all three root-tooling typechecks, dead-export scans, and lint. The final staged replay passed (exit 0); all three typecheck lanes, dead-export scans, and lint remained green.
  • Rig fallback: export-name collision guard and node scripts/run-vitest.mjs test/scripts/eager-import-closure.test.ts test/scripts/pr-wrapper-source-closure.test.ts test/scripts/ci-node-test-plan.test.ts test/scripts/ci-node-test-plan.commands.test.ts test/scripts/changed-path-facts.test.ts test/scripts/changed-lanes.test.ts passed: 213 tests across six files, 167.68 s wall time, plus the export-name collision guard.
  • Independent Codex review of the final candidate: clean, zero actionable findings across four source partitions. Negative control: 15 failures / 18 tests on the pre-review controller; final candidate: 18/18 passed in 122.89 s. These owner-flow cases are opt-in and add zero seconds to default CI.

These opt-in Node integration tests add no default CI execution time. This proves the synthetic controller boundary, not a live systemd cutover or deployed behavior. The private profile and complete-pair adoption still require Night Watch's reviewed execution.

@clawsweeper

clawsweeper Bot commented Oct 10, 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 docs Improvements or additions to documentation scripts Repository scripts size: XL labels Oct 10, 2026
@steipete
steipete marked this pull request as ready for review October 10, 2026 07:48
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR bundles the interim Team deployment controller, documents adoption, and adds private operator configuration and tooling classification.

Example: Night Watch stages the reviewed controller from commit c9306fa.

  • Before: The skill depends on a separately installed controller from an operations checkout.
  • After: The repository supplies the four runtime files and a documented adoption procedure.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful owner-scoped maintenance with substantial boundary coverage and no established code defect, but privileged final effects and existing-state compatibility are not verified.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Team operators need a reviewable, installable controller closure while native update cannot yet replace the deployed migration and recovery contract.
Reason: The existing feature owner supplies a bounded relocation with explicit adoption safeguards and a native retirement path; ordinary installations remain outside its scope.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open: this PR provides a useful repository-owned Team controller while native update still lacks its complete migration and recovery replacement.

Priority: P2
Reviewed head: c9306faa009a1d0db030f99498a66e915597e520

Before merge

  • Add real behavior proof - Authority-chain proof required: supplied runs exercise the real controller with synthetic Gateways, process state, systemd, and account routing. Provide redacted final-effect traces for an allowed deployment, the unprivileged runtime account, and authority expired or replaced after an awaited check, showing rejection before service I/O. Disposable Linux proof is sufficient; no Team deployment is requested. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve security review attention item - No concrete security bypass was established, but final-effect authority across the privileged deployment boundary remains unproven.
  • Resolve merge risk - Before merge, establish final-effect authority across the runtime-account-to-root service boundary, including lease expiry or replacement after an awaited check.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Low-value test .agents/skills/update-team-server/controller/terminal-persistence-waiver.test.mjs: Replace exact Bash-source and branch-text assertions with owner-boundary outcomes; these assertions cannot establish whether persistence prevents a service stop.
  • Low-value test .agents/skills/update-team-server/controller/mirror-budget.test.mjs: Replace source-spelling and numeric-default assertions with the command-budget contract; identifier-only refactoring currently breaks these tests.
  • Missing end-to-end proof: Supply a recorded controller run through real account and service boundaries, including rejected stale authority and incumbent-state adoption with settings, journals, and data preserved.
Agent review details

How this fits together

Night Watch invokes the privileged controller with operator policy and existing installation state; it prepares sealed releases, coordinates Gateway suspension, and records deployment or recovery outcomes.

flowchart TD
A[Night Watch and operator profile] --> B[Deployment controller]
B --> C[Sealed release preparation]
B --> D[Gateway suspension owner]
D --> E[Systemd lifecycle]
B --> F[Journal and Doctor recovery]
E --> G[Native acceptance receipt]
F --> G
Loading

Technical review

Best possible solution:

Maintain one adopted controller until the native updater proves the remaining migration, recovery, and retirement contracts.

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

This is primarily a relocation; reported controller repairs have synthetic negative controls, but no live failure was reproduced during this read-only review.

Is this the best way to solve the issue?

A versioned closure with explicit adoption and retirement boundaries is a reasonable interim solution, provided it remains outside ordinary runtime packaging.

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Prove authority at the service boundary (recommended)
    On disposable Linux, record the real controller allowing an authorized operation and rejecting the runtime account and expired or replaced authority before service I/O.

Provenance checked

  • Team deployment authorization changes intended behavior with a stated reason (8206e75: The original skill authorized unattended routine updates; this PR explicitly requires per-deployment approval and disables unattended deployment.)
  • Night Watch execution ownership keeps the original intent (1395926: Reserve live deployment and recovery for the designated Night Watch owner.)
  • Native acceptance ownership keeps the original intent (1b35575: Consume the updater's acceptance receipt instead of repeating agent-side validation.)
  • Maintainer tooling classification keeps the original intent (63dcd40: Route reviewed hidden maintainer helpers through tooling checks while unknown owners retain fail-safe classification.)

Testing

Proof path: in-process harness.

Security

Needs attention: No concrete security bypass was established, but final-effect authority across the privileged deployment boundary remains unproven.

Evidence

What I checked:

Likely related people:

  • Hannes Rudolph: Raw commit 2227743 adds scripts/lib/changed-path-facts.mjs:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 2227743f7474; files: scripts/lib/changed-path-facts.mjs)

PR surface

Tests +9834, Docs +284, Other +23997. Total +34115 across 44 files. Added test files: 31.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 32 9834 0 +9834
Docs 3 286 2 +284
Config 0 0 0 0
Generated 0 0 0 0
Other 9 24000 3 +23997
Total 44 34120 5 +34115

Review metrics

Metric Value Why it matters
Required operator configuration 1 new required environment variable OPENCLAW_TEAM_OPERATOR_PROFILE replaces private hard-coded expectations and must accompany adoption and recovery.

Labels

Label changes:

  • add P2: This is scoped maintainer deployment tooling with useful recovery value and no demonstrated urgent public-runtime regression.
  • add merge-risk: 🚨 compatibility: Adoption introduces a required profile and consumes existing journals, permits, configuration, and database state without a supplied incumbent-to-candidate compatibility run.
  • add merge-risk: 🚨 security-boundary: The imported controller carries Gateway suspension authority into privileged systemd effects; supplied fixtures do not establish the actual account boundary.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: This is scoped maintainer deployment tooling with useful recovery value and no demonstrated urgent public-runtime regression.
  • merge-risk: 🚨 security-boundary: The imported controller carries Gateway suspension authority into privileged systemd effects; supplied fixtures do not establish the actual account boundary.
  • merge-risk: 🚨 compatibility: Adoption introduces a required profile and consumes existing journals, permits, configuration, and database state without a supplied incumbent-to-candidate compatibility run.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

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

  • Record allowed and nearest-forbidden final service effects, including lease expiry or replacement after an awaited check.
  • Demonstrate incumbent-to-candidate adoption and recovery with the approved profile and existing settings, journals, and data intact.
  • Replace the two source-coupled tests with behavioral contract coverage.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 10, 2026, 3:55 AM ET / 07:55 UTC.

@steipete
steipete merged commit 072215c into main Oct 10, 2026
188 of 189 checks passed
@steipete
steipete deleted the steipete/perf-micro-controller-into-update-skill-20260919 branch October 10, 2026 08:01
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant