Skip to content

fix: remove updater-only restrictions from agent maintenance guidance - #200978

Merged
roboclaw-bot merged 3 commits into
openclaw:mainfrom
lastguru-net:fix/authorized-source-maintenance
Nov 19, 2026
Merged

roboclaw-bot merged 3 commits into
openclaw:mainfrom
lastguru-net:fix/authorized-source-maintenance

Conversation

@beru-ant-king

@beru-ant-king beru-ant-king commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Related: #200779, #200809, #198396, #136588

What Problem This Solves

An operator can explicitly request a Git-based source update and forbid the updater, yet the agent's prompt requires the updater and forbids exec for its own installation. The agent then refuses a valid maintenance method or substitutes a different update path. The config-recovery change in #200809 left this separate restriction intact.

User Impact

User impact: a source-checkout maintenance request no longer conflicts with an updater-only prompt rule. This removes that rule, rather than adding a new exception or permission setting.

Existing execution permissions, owner admission, approval decisions and live-output build protection are unchanged. This does not make rebuilding files used by a running Gateway safe or deploy an update.

Why This Change Was Made

  • Delete the no-exec maintenance mandate, forced updater/helper routes, duplicate tool-description directives and the redundant component-build exception.
  • Keep capability descriptions and existing restart/cleanup safeguards; reconcile the corresponding docs and regenerate the canonical prompt artifacts.
  • Remove the Gateway-specific cross-tool description rewrite. Production delta: 7 added / 20 removed lines. Existing test delta: 13 added / 26 removed lines; no new test suite, configuration, runtime policy or fallback.

Evidence

  • Canonical pnpm build:runtime passed at exact head f6bf7dc8c7cf981766ae7b762c852c7ec93529eb in 287.7 s, including core, bundled plugins, Codex and Control UI. Independent verification matched current source signatures and every recorded Codex output hash; this is runtime-build proof, not a full SDK declaration build.

  • The original prompt fails the four tool-availability regression cases. The changed ordinary and native-harness prompts remove the exclusive routing while retaining restart-custody and authorization-denial guidance.

  • Canonical snapshot generation/check passes all six outputs. After the main refresh, the Telegram Codex fixture, including dynamic tools, shrinks from 118,516 to 117,822 characters: 694 fewer characters, 173 fewer rough tokens (the repository's text estimate, not provider token accounting).

  • Focused coverage passes: 174 prompt/harness/catalog cases, 14 Gateway-tool cases, 17 owner-admission cases and 7 snapshot cases. Unaffected successful cases were reused; corrected assertions were rerun. The snapshot/catalog/Gateway-tool follow-up took 112.76 s, and the two affected owner-prompt cases took 149.06 s (cold compilation dominates). Upstream CI timing is pending.

  • Targeted TypeScript graphs pass: agents-root (44.0 s), agents-tools (29.4 s), gateway-methods (36.4 s). Scoped lint, formatting and git diff --check pass. The automatic typecheck selector expanded to all graphs and was stopped; these explicit affected graphs are the claimed typecheck scope.

  • A bounded independent native source audit found no remaining direct updater-only/no-exec maintenance mandate in the inspected surfaces. Local Codex autoreview against base bd1c54cfde534824d31a4cc3c01ce3a116234549, through P2, returned reviewer_unavailable without a report. The subsequent hosted ClawSweeper review covered head f6bf7dc8c7cf981766ae7b762c852c7ec93529eb, identified no actionable code findings, and required real-behavior proof and an area-owner decision. The unavailable local review is not represented as clean.

Real-model source maintenance (November 18)

An isolated Gateway ran the exact reviewed runtime with OpenAI Codex gpt-6-astra, reasoning xhigh. One user request asked it to inspect its deployment and update a designated Git revision without an updater. Deployment/ref/service facts and the canonical build entry point were supplied, not a step-by-step recipe. The model chose a local git fetch plus merge --ff-only, authored an independently supervised systemd worker and recovery command, built with pnpm build:runtime, restarted the Gateway, and verified the result.

The first worker failed because its PATH lacked corepack (exit 127). Its recovery command restored the previous source/runtime and a healthy Gateway. Native restart recovery resumed the model without another user message; it diagnosed the PATH error, launched a corrected worker, and completed the update. The final model response accurately reported both completion and the recovered failure.

Independent observations establish:

  • Both actual Gateway shutdowns had a running worker in a separate systemd cgroup, with no PartOf/BindsTo dependency on the Gateway. Native monotonic worker-start/stop pairs were 258159467141 < 258168804254 and 258239308076 < 258247297301 microseconds.
  • The final worker exited 0; the original failed worker remains recorded as exit 127. The new Gateway invocation started at 258450560472 microseconds, after the final stop.
  • Git HEAD and build identity match 6fe8e4ac013e5b36b24fd8007e011bac9a77203b, a local marker-only child of reviewed head f6bf7dc8c7cf981766ae7b762c852c7ec93529eb. The checkout is clean. Independent source/build/runtime signatures and every recorded Codex output hash match.
  • /healthz, /readyz and /startupz returned HTTP 200; readiness reported ready=true, coreReady=true. A read-only Gateway history query found exactly one user request and the final OpenAI/Astra response with positive usage (499 input, 47,232 cached input, 112 output tokens).

Redacted actual worker log excerpt (UTC):

05:12:20 ERROR line=109 exit=127
05:12:42 Original revision and service health restored; requested update FAILED
05:13:38 building
05:16:57 starting
05:17:35 SUCCESS: exact target built, restarted and healthy

Instrumentation failures are not green tests. Earlier attempts exposed a unit-file quoting error, ambiguous fixture paths, contradictory worker scope, and incomplete Luna/low follow-through. An Astra attempt reached the target but the harness incorrectly read a discarded stop timestamp; cleanup triggered a verified rollback. The final run completed in reality, but its harness incorrectly required the first worker to finish successfully even after the model recovered and used a second worker. A separate read-only recorder captured the completed result before cleanup; an independent validator checked both shutdown boundaries, the successful final custodian, health, build provenance and final model response. No claim is made that the original Vitest harness passed; the failures and exact inputs remain retained.

Limits: This proves the exercised Linux/systemd source-maintenance and recovery flow, not universal model behavior or automatic method selection for an unspecified update request. The synthetic target changes no product/dependency files; dependency installation, a release/schema migration, and Discord delivery were not exercised. No production deployment was performed. Full CI remains unverified; the published CI run requires maintainer action.

Owner decision

Merge-conflict follow-up: merged main 5e677bad858c331ec7db0a547bebf0b15e4786d4 in 2e69e54bf57f0b97309927378e55fadae3776140 without rewriting history. Only two generated prompt snapshots conflicted; canonical regeneration resolved them and all six outputs pass prompt:snapshots:check. git diff --check passes. The non-generated PR patch is identical (stable patch ID e30b142e7757c4bcb49218a177b0cbace0071168), and all three maintenance-guidance/tool owners are byte-identical to reviewed/live-tested f6bf7dc8c7cf981766ae7b762c852c7ec93529eb. The prior review and runtime proof are reused for that unchanged patch, not claimed as a new full live run on the merge commit. No additional hosted review was requested for this mechanical refresh, consistent with the repository's review-reuse policy.

This intentionally changes the updater-only routing policy retained by #198396 following the self-stop incidents described in #136588; it is not restoration of an established product contract. Requested decision: accept owner-selected source-maintenance methods under existing execution authority and mandatory restart custody. This PR does not claim that tests or a bot review supply that product approval.

Delete blanket no-exec maintenance routing and redundant component exceptions. Preserve runtime authority and live-build checks.

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

clawsweeper Bot commented Nov 18, 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 gateway Gateway runtime agents Agent runtime and tooling size: S labels Nov 18, 2026
@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. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. 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 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Allows explicitly requested, host-authorized Git source maintenance while keeping the built-in updater as the default.

Example: An authorized operator requests source revision 6fe8e4ac013e5b36b24fd8007e011bac9a77203b and forbids the updater.

  • Before: The prompt requires maintenance tools and prohibits exec or detached jobs for the hosting Gateway update.
  • After: The agent may use Git under host-authorized maintenance authority while preserving a working restart path.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch has sufficient production-flow evidence and no actionable findings; unresolved product direction caps overall readiness.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Supplied real-model Gateway logs and independent observations exercise Linux/systemd exact-revision maintenance, separate restart custody, failed-worker rollback, successful recovery, health checks, and final reporting on the earlier implementation. The latest prompt narrows eligibility to the demonstrated authorized scenario; it is not represented as a new exact-head live run. The historical screenshots provide context only.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: An operator-selected Git update conflicts with guidance requiring the updater, potentially causing refusal or substitution of another method.
Reason: The revised proposal is bounded and demonstrated, but changes a deliberately designed maintenance policy without recorded area-owner approval.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR offers a focused, demonstrated maintenance-policy change with no actionable code findings; explicit product approval remains unresolved.

Priority: P2
Reviewed head: c768bfcb04ebeef9ccea8788361a8b82dc52ad38
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should agents permit explicitly requested exact-revision Git maintenance under host authorization while retaining the built-in updater as the default?
  • Recommendation: Accept the narrowed policy: Allow operator-selected exact revisions when the host authorizes maintenance, retaining restart custody and denial handling.
  • Why: This revises the intentional policy retained by fix(agents): allow authorized non-disruptive component work #198396 after documented self-stop incidents; the narrower latest wording and successful runtime evidence establish feasibility, but no explicit owner acceptance is recorded.

Before merge

  • Await maintainer action - A maintainer must approve the current-head validation workflows awaiting action.

Findings

None.

Agent review details

How this fits together

Configured tool capabilities enter the shared prompt renderer and tool-description finalizer, which supply maintenance guidance to ordinary and native-harness agents using existing execution and Gateway actions.

flowchart TD
A[Configured capabilities] --> B[Shared control renderer]
A --> C[Tool description finalizer]
B --> D[Agent model request]
C --> D
D --> E[Authorized tools]
E --> F[Gateway maintenance and recovery]
Loading

Technical review

Best possible solution:

Accept the shared-owner change if the area owner approves explicitly requested, host-authorized Git maintenance with mandatory restart custody.

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

Current main explicitly prohibits exec and detached jobs for hosting-Gateway updates, establishing the conflict with an operator-requested Git-only method without proving universal model refusal.

Is this the best way to solve the issue?

The patch changes the existing shared renderer and descriptions without introducing another maintenance implementation, preserving runtime ownership of authorization and lifecycle actions.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Exclusive maintenance routing and component exception changes intended behavior with a stated reason (05b4cf9: Permit authorized non-disruptive component work while retaining supervised maintenance for updates and service control.)
  • Gateway descriptions and cross-tool routing changes intended behavior with a stated reason (8a669b4: Expose owner-authorized update, restart, and cleanup through runtime-owned actions.)
  • Manual maintenance outside the hosting service changes intended behavior with a stated reason (d809c11: Prevent self-stop from killing the shell responsible for restarting the Gateway and preserve visible update outcomes.)
  • Capability-aware update fallbacks changes intended behavior with a stated reason (fcf2884: Avoid recommending disabled update commands while retaining available operator recovery routes.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Jason (Json): Raw commit 8a669b4 adds src/agents/tools/gateway-tool.ts:94 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8a669b484bad; files: src/agents/tools/gateway-tool.ts)
  • Peter Steinberger: Raw commit d809c11 adds src/agents/tools/gateway-tool.ts:122 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d809c115eb72; files: src/agents/tools/gateway-tool.ts)
  • Ted Li: Raw commit fcf2884 adds src/agents/system-prompt-control.ts:25 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: fcf2884eeb9c; files: src/agents/system-prompt-control.ts)

PR surface

Source -12, Tests +20, Docs -5. Total +3 across 14 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 8 20 -12
Tests 8 87 67 +20
Docs 3 5 10 -5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 100 97 +3

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:

No label changes.

Label justifications:

  • P2: This is a bounded improvement to an advanced, explicitly requested source-maintenance workflow.
  • merge-risk: 🚨 availability: The patch relaxes routing introduced after hosting-service self-stop incidents; restart custody remains required, and acceptance belongs to the area owner.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-11-18T04:21:09.363Z sha f6bf7dc :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-18T05:27:47.213Z sha f6bf7dc :: blocked before merge. :: none
  • reviewed 2026-11-18T05:51:37.221Z sha 2e69e54 :: blocked before merge. :: none

Reviewed November 18, 2026, 7:52 PM ET / November 19, 2026, 00:52 UTC (Revision 4).

@beru-ant-king

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 18, 2026
Merge current main and regenerate conflicting prompt snapshots. The non-generated PR patch and maintenance owners are unchanged.

Co-authored-by: Beru <[email protected]>
@beru-ant-king

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. label Nov 18, 2026
…intenance

Refresh the PR against main, preserve contributor history, and cover write-only clients reaching the built-in updater.

Co-authored-by: VACInc <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Maintainer decision for c768bfcb04ebeef9ccea8788361a8b82dc52ad38: @VACInc accepted the narrowed policy and requested landing. Keep the built-in updater as the default. Git is an option only for an explicitly requested exact revision on a source installation, when the host authorizes maintenance for that caller. Shell access alone is not update authority; restart custody and denial handling remain unchanged.

This records the product decision, not a passing CI result or a GitHub review by @VACInc. The write-scoped regression covers the built-in updater; it is not a real-model denial test for the Git path.

@roboclaw-bot
roboclaw-bot merged commit 8f2cfd4 into openclaw:main Nov 19, 2026
119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants