Repository navigation
fix: prepare native admin access on the first Agent deployment - #2259
miguelbranco80 wants to merge 16 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThis PR prepares each enabled Agent's native administration policy during deployment without changing its reusable Configuration. Example: Deploy revision 1 from Standard Codex with Installation native administration and private routing enabled.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open for the native-admin owner's direction decision. The previous provisioning finding is fixed, and no new actionable correctness defect was found. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherOCC deployment admission passes an Agent identity and Configuration copy to Kubernetes Compute, which prepares native policy before the immutable revision reaches the worker and Gateway. flowchart TB
A[Deployment or provisioning] --> B[OCC admission]
C[Trusted Installation settings] --> B
B --> D[Kubernetes Compute policy]
D --> E[Immutable Agent revision]
E --> F[Worker and private Gateway]
G[Authorized browser session] --> H[OCC native proxy]
H --> F
Technical reviewBest possible solution: Prepare Agent-specific policy through Compute at deployment admission while preserving explicit opt-outs, reusable Configurations, and exact-Agent authorization. Do we have a high-confidence way to reproduce the issue? Current-main presets enable the UI without the exact origin and device approval required by nativeAdminConfigurationSupported, establishing the unsupported first-revision path from source. Is this the best way to solve the issue? Deployment-time preparation uses the owning Compute primitive and avoids embedding Agent-specific origins in shared Configurations; its automatic approval semantics need an owner decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c1bd65749c85. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed October 13, 2026, 8:15 AM ET / 12:15 UTC (Revision 4). |
|
Addressed the proof requests in the upstream review at the unchanged head Native authority and denied effectsA fresh revision 1 opened the real local OpenClaw UI through OCC using an exact-Agent human administrator. The actual Gateway enrolled an
This uses the production default authorization lease, with the existing 30-second revocation bound. It does not claim immediate per-command revocation. There are no changes to the pilot's private-routing, exact-Agent authorization or full-native-authority boundary. Environment: macOS arm64, Node 24.19.0, Chromium and immutable local Gateway image First-deployment screenshot and seven-second native UI walkthrough (the RPC and revocation assertions are in the trace below):
native-first-deployment.webmHTTP denial after exact-Agent permission revocation:
Existing stored stateAn upstream After stopping that controller process and starting the PR candidate against the same database and Configuration directory, all three Agents, Configuration values/generations, settings/opt-outs and six revisions loaded through the API unchanged. Compute and Secret effects remained existing test Drivers; this is persisted-data/controller restart proof, not an installed runtime upgrade. This diff changes no persisted schema or migration files. Existing native-admission integration coverage also checks template/generation preservation, redeployment, historical revisions and explicit opt-outs. The existing Redacted results and scope · Native authority reproduction script · Stored-state restart reproduction script. The scripts are attachments, not additions to the product or test suite; remove the final Remaining upstream decisionMaintainer approval is still needed for scoped automatic preparation within the already-enabled trusted-operator pilot and the optional Compute contract. RFC #898, candidate 5/D69, remains proposed; this contribution builds on the original pilot #256 without adopting its broader scope cuts or changing defaults. Upstream CI workflows await maintainer approval; genuine k3d/Envoy/model/release-image qualification remains unrun. |
|
Addressed the P2 provisioning-test finding in The existing native-admin worker integration now waits for durable Also passed 367 Compute/native-admin/WebSocket tests (one Linux-only skip), 91 Helm/yq packaging tests, typecheck, lint, formatting, workspace, OpenAPI, suite-registration and docs checks. No new test-only production seam or compatibility shim was added. The two merge conflicts preserve current-main CA handling, shared API/worker native-origin settings and both required test imports. The PR description now records final-head verification and labels the uploaded browser/native-runtime evidence as historical proof at the preceding revision. Marking this upstream PR ready for review as requested; the fork PR remains draft. Maintainer policy approval, CI and genuine k3d/model/release-image qualification remain pending. Neither PR was merged; fork main and the integration branch were not modified. |
|
Free's clanker here (an AI agent working on Free's behalf). Review-only pass at 1284334. The admission hook, the frozen-copy path (
Merge-tree: clean against main, #2311, #2253 and #2255; textual conflicts only with the stale #906 (native-admin docs and tests) and #1559 ( |
|
Both documentation requests from my earlier review are addressed at
CI Required passed on the published head. In an additional private clean merge with current main, including #2311, all 18 native-admin access tests passed, as did the 448-file docs word gate and formatting of these two pages. These are application/fixture and source checks, not production, a browser walkthrough, or a claim that an old Claw review applies to new bytes. The remaining question belongs to the native-admin owner: should Installation enablement plus an enabled Agent UI prepare a full administrator device on the first deployment, under this optional Compute contract? This comment closes my documentation feedback, not that decision. No push, live activation, merge or bot rerun from me. |
|
RFC coverage is now explicit in RFC-0021: Prepare enabled native administration at deployment admission, submitted in the documentation-only commit It specifies the optional Native-admin and Compute owners: please review whether automatic full-administrator preparation within the enabled pilot and this optional Driver contract are acceptable. That owner decision remains a hold. Documentation checks passed; no product tests were run for this RFC-only commit. The main refresh and its verification follow separately. |
|
Free's clanker here (an AI agent working on Free's behalf). Review-only delta pass at Delta: one documentation commit, Earlier items
New (low): your #2518 also adds an RFC numbered 0021 ( Since this PR now carries an RFC, it is merged by hand by maintainers; no landing from me. |
* test: run real-cluster cleanups newest-first and bounded arrangeProductionTopology registers the platform Namespace delete (the worker's ServiceAccount) first and the host worker, port-forward and pool stops later. node:test runs a test's after hooks in registration order and skips the rest once one throws (finding 1711), so the topology tests deleted the ServiceAccount under a running worker, and a failed or timed out Namespace delete skipped every stop and held the file to the runner's file timeout. The production topology, OTLP and live Slack tests now hand the topology a boundedTeardown context: cleanups run newest-first, each within 180 s, all attempted, and the file exits after an abandoned step. A conformance test runs each of the three files with the topology helper replaced by a stand-in that registers the helper's order, fails the Namespace delete and keeps a worker poll alive until its stop. It fails (and the file hangs) if any of the nine tests passes its own node:test context to arrangeProductionTopology. * test: settle every topology file before asserting its teardown order Review follow-ups on the stand-in regression: assert after all children settle, show stdout with stderr when a count is off, drop the resolve hook's format, explain the per-file test counts, and name the helper's export list when the parse fails. harness-topology-k3d-routing-real and native-admin-k3d-real still pass their own context to arrangeProductionTopology. Both files are in open PRs (#906, #2259, #2596), so they are left for a follow-up. * test: register each production topology cleanup on its own The topology registered its forward, worker, app, pool, Postgres network, Namespace and directory cleanups as one callback, so a worker stop that rejected skipped the rest of it even under a bounded teardown. They are now separate registrations through registerProductionTopologyCleanups, in dependency order (the forward and worker stop first, the directory last). arrangeProductionTopology takes withBoundedTeardown of its context: a raw node:test context, as the routing and native admin tests still pass, gets its own bounded teardown, and one from boundedTeardown is reused rather than nested. A conformance test runs that registration in its own node:test process with a raw context and a worker stop that rejects at once: every later cleanup is attempted in order, the worker's error fails the test, and the file exits once the app close releases what held it. Regrouping the cleanups into one callback makes it hang and fail.
|
Free’s clanker here. Update for I verified the PostgreSQL result artifact against GitHub’s digest and bound it to tested merge No rerun requested. Whether an installation with native admin enabled should automatically prepare full administrator access on first deployment remains the RFC owner decision. The human-merge notice is correct and auto-merge is off. Free's clanker here. On
|


Problem
Closes #2257.
Standard OpenClaw and Standard Codex already enable native UI, but the first admitted revision lacks its Agent origin and device-approval policy. Operators must discover the origin, edit Configuration JSON and redeploy before using an already-enabled UI.
RFC coverage and contribution
Proposed RFC-0023: Native-admin deployment preparation covers the optional
ComputeDriver.configureAgentcontract, admission order, ownership, opt-outs, failure behavior and unchanged Configuration/history. Originally submitted for human review as RFC-0021, it is renumbered because current main occupies 0021 and 0022. The old-to-new lookup and flow link are updated; upstream's RFCs and index rows are preserved.Decision status remains Proposed. Implementation status is now Implemented, recording the scoped candidate code and its verification in this PR. It does not claim owner acceptance, a merged release or installed-runtime qualification. The native-admin/Compute owner decision remains a hold.
This contributes first-deployment preparation discussed in the original scope-cut RFC #898, building on trusted-operator pilot #256. Broader scope cuts, execution boundaries, default enablement and the dedicated native terminal decision remain outside this PR. RFC-0023 records separate integration needed for #2596/#906 human identities; this refresh retains machine-only policy and does not broaden authority.
Corresponding PR: Fork PR #12. Both share
raw-labs/openclaw-enterprise:codex/native-admin-first-deploy. This refresh does not change the fork's comparison base or other branches.Change
publicOrigin, the exact allowed origin, the existing trusted-proxy identity,operator.adminscopes and device auto-approval before logging, Configuration validation and immutable admission. API and worker use matching inputs, including guided provisioning and both Helm worker placements.mainat774b3d6760f9699506e41da34f7ce1ab751b8424without rewriting published history. Preserve both native-admin origin preparation and upstream Driver-configuration registry imports in API composition and Kubernetes Compute. Preserve upstream RFC-0022's status and RFC-0023's owner hold. Consolidate repeated wording in the native-admin breaking-change notice after the combined page exceeded the word limit; keep all settings, readiness steps and the untested status. Native-admin flow history and Manual Notes remain unchanged.Final head:
f76001198bdaaef13fdb985ddccf81654e1bb432. Focused diff: 32 files changed, 1036 insertions(+), 265 deletions(-). Forkmainandcodex/raw-integrationwere not modified.Verification
The committed tree is
0fd902878d4cb94b779df2f1ab613dd56c097678, identical to the locally verified candidate. Merge parents are published headcf2ee27610901516cea2c7337c3a62c14f88e73dand pinned main774b3d6760f9699506e41da34f7ce1ab751b8424. This refresh installed no dependencies and changed no shared test infrastructure.-addextoption. No product or fixture code was changed to hide those failures. Eighty-five packaging cases skipped becauseyqis unavailable; two skips cover Linux-only contracts. The initial Node 24.3 run could not import the native-admin TLS API; the compatible installed Node resolved that import failure.f76001198bdaaef13fdb985ddccf81654e1bb432; they are pending, not claimed green. Advisory QA was skipped by the existing selector. No workflow or scanner settings were changed.Local review
The canonical AutoReview helper completed a PR-wide Codex GPT-6 Astra, medium, P0–P2 review against pinned main, with unchanged installation-configuration and registry source supplied as context. It reported
scoped-clean,report_produced=true, and no actionable findings. It checked the combined admission path, registry integration, API/worker inputs, opt-outs and saved-Configuration boundary. The final wording-only length correction was reviewed manually and passed docs/format checks; product tests and model review were not repeated solely for prose. Source review does not resolve owner acceptance or installed-runtime qualification.Commands:
node --test tests/conformance/kubernetes-compute.test.mjs tests/conformance/contracts.test.mjs tests/conformance/native-admin-websocket-relay.test.mjs tests/conformance/native-admin-upgrade-reset.test.mjs tests/integration/native-admin-access.test.mjs tests/integration/configuration-startup.test.mjs tests/integration/production-kubernetes-packaging.test.mjs pnpm typecheck pnpm lint pnpm format:check pnpm check:workspace pnpm openapi:check node scripts/ci/run-tests.mjs audit # In the exact-tree private copy with the matching preexisting docs graph: node scripts/docs-site/word-count.mjs node scripts/docs-site/build.mjs --check node scripts/check-specs.mjs node scripts/docs-site/build.mjs node scripts/docs-site/node_modules/pagefind/lib/runner/bin.cjs --site dist/docsPreviously accepted native-runtime evidence
The review response and uploaded traces/scripts were exercised at prior head
eee339c22ceea4fa5213dd785047a810402e1675and accepted as sufficient scoped proof by the automated review. They establish revision-1 UI access, persistent admin-device enrollment, actual native file writes, forbidden callers denied before Gateway effects, grant/session revocation within the existing 30-second bound, and unchanged persisted records after controller restart. They are historical runtime evidence, not a rerun on the refreshed head.Real local Gateway/Chromium; controlled Compute activation/ingress and in-memory OCE State/auth policy storage. No model turn or Kubernetes deployment is claimed. First-revision screenshot and seven-second native UI walkthrough:
native-first-deployment.webm
HTTP denial after permission revocation. Console source and controls are unchanged in this feature diff.
Remaining proof and decisions
RFC-0023 is unique on pinned main, but #2518 also proposes RFC-0023. Coordinate these unmerged proposals before either lands. This refresh renumbers neither and merges neither PR.
Native-admin-owner approval of automatic administrator preparation and the optional Compute contract remains pending. Documenting RFC-0023 does not resolve that hold. Final-head CI remains pending. The successful local independent review above does not replace native-admin/Compute owner acceptance or any existing hosted-review/product-acceptance holds. The historical native-runtime walkthrough was not rerun. Genuine current-image k3d/Envoy/model and release-image qualification are unrun. Native device authority remains full administrator authority behind exact-Agent OCE admission and its bounded authorization lease; cancellation of already accepted commands is not promised. Native edits remain gateway-local and outside immutable OCE Configurations.