Skip to content

fix: secret requests preserve native answers and live requester authority - #132122

Merged
steipete merged 22 commits into
mainfrom
steipete/agent-secret-requests-4ae354
Aug 30, 2026
Merged

steipete merged 22 commits into
mainfrom
steipete/agent-secret-requests-4ae354

Conversation

@steipete

@steipete steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Closes #131306 (secret requests lose native answers and outlive their requester). Follow-up to #129670 (agent-requested credentials).

An agent could request an API key, but native submission could be rejected, credential whitespace or edited destinations could be lost, and the confirmation could misstate what was saved. The returned SecretRef was incomplete. Pending requests and established egress connections could outlive their requesting execution. Saving a missing provider credential could update secrets without updating the model owner that actually uses it.

Why This Change Was Made

Keep one protected path: task-needed request → host-owned masked card → shared-store commit → canonical stored marker and complete SecretRef. The Gateway validates the exact live requester, commits and settles the question synchronously, then refreshes runtime references. Proxy connections, streams and caches close with their exact owning registration; surviving run IDs or copied handles are not authority.

Web, iOS and Android preserve exact input and edited hosts, show requester/destination/replacement consent, consume canonical answers and clear terminal drafts. Native cards use Gateway question events. External channels use correlated durable delivery with a visible blocker when no usable Control UI origin exists. The existing active-run owner records human waits for recovery, steering and admission; cancellation and explicit run deadlines still win.

Provider discovery separates transient HTTP credentials from safe writable configuration. Gateway-backed turns reuse the matching prepared secret snapshot instead of requiring every unrelated provider credential again. Secret reload advances the published model owner at activation, fences stale publication and rollback, settles displaced readers, and revokes shared-auth clients before awaiting model preparation. Worker transport carries deterministic loader provenance so resolved bytes are not reinterpreted as environment references or markers. API-key and header normalization use source-aware classification. Provider discovery scope is unchanged.

Two additional owner-boundary repairs came from review/live proof. The Gateway now includes the effective host policy in every store question: proposed hosts, otherwise existing hosts, otherwise an explicit empty list. All clients show the policy that will be saved. Merely preserving native nil would retain destinations the operator had not seen; the producer fix avoids that hidden consent while preserving explicit clears and the generic store's omission semantics. Concurrent same-name insertion or policy changes cannot introduce undisplayed hosts.

A memory-provider health diagnostic was also registered as a startup migration. It tried to resolve an auth-profile SecretRef before Gateway activation, then blocked the activation it needed. This removes that no-op migration and obsolete wrapper/factory; genuine migrations, read-only health inspection and the runtime semantic-index protection remain.

No new product configuration/environment option, dependency, SQLite schema/version or Gateway protocol version. No release or native-store publication. AI-assisted; source, owner boundaries, regressions and actual flows were reviewed directly.

User Impact

Agents can request a missing credential without collecting it in chat. Operators can inspect consent and edit destinations on web, iOS and Android. Models receive a provider-qualified store SecretRef and bounded current entry policy, not the submitted value or an approval receipt. The human may edit the hosts; a difference from the proposal is not evidence of a Gateway policy override or a reason to change Gateway configuration.

Auth-profile and config references refresh after entry. Selected cold providers still fail before credential fallback; unrelated healthy providers remain usable. Auth-only snapshots, foreign configurations and explicit channel/account scopes remain strict. Config SecretRefs work independently of optional proxy egress and may have no egress hosts. Protected command egress never falls back to plaintext; operator-owned readable environment entries retain their separate behavior.

The bounded Android operator-last bootstrap repair uses the existing approval-refresh owner. A meeting-CLI import defect found during validation was independently fixed on main in #131719 (dependency/runtime refresh); this branch retains that canonical fix and its stronger registration tests. Only independent removal of unused, unshipped meeting SDK exports and a dead wrapper remains. Shipped question APIs are unchanged; SDK counters only tighten after removal of unshipped exports.

The shared proxy-target parser also covers the malformed-host crash reported in #128828 and proposed in #128829, including the TLS sibling. Thanks @udsy19 for the report and focused proposal. Those items are not claimed merged or closed by this PR.

Release-note context: repair agent-requested credentials across web/native clients, return complete SecretRefs and accurate current-policy metadata, refresh provider owners after entry, preserve credential provenance, and bind human waits and egress resources to their live requester.

Compact agent guidance

Core, Codex, Copilot and system-agent prompts share this guidance. The runtime substitutes the actual callable tool name, including deferred/namespaced tools, and omits named-tool guidance when unavailable:

`secrets`: list metadata first; request only missing task-needed credentials: name + reason, exact allowedHosts for egress.
Human masked entry -> protected shared store; metadata/ref only. Use returned store SecretRef on supported config fields.
Gateway egress needs enabled proxy + allowed hosts; no plaintext fallback.
Gateway-host commands: use auto-injected opaque env sentinel under stored name. No secret templates; never override/print that variable. Native shell/sandbox/node: no protected injection. First command snapshots store for run; late saves need next turn.
no_answer: report blocker or continue with best judgment; never ask in chat.

Generic no-chat/no-transcript credential rules remain when the tool is unavailable. The tool description shares the egress-use sentence. The execution environment parameter states: Env overrides. Literal values; no expansion. Omit to inherit. Intentional environment-override semantics are unchanged.

Tweet follow-up draft — not posted

New in OpenClaw: your agent asks for an API key, you enter it in a masked card, and it gets a SecretRef—not the key.

Web, iOS + Android. No pasting secrets into chat.

https://docs.openclaw.ai/tools/secrets

207 raw characters. Standalone follow-up for a release containing this repair; the original tweet draft was unavailable. Suggested media are the three inspected masked-entry captures below. Real-key entry was not recorded. No X post or release has occurred.

Evidence

Merged as 9e302fb57e4c. Reviewed PR head: 30b01f81d64a0ed35f061e096647fbb6a02702af, based on 7ca3e14a52cc. All 22 commit authors, dates and messages remain intact. The new PWA approval-expiry conflict is resolved by carrying main's five notification spy/binding/assertion lines into the extracted authority suite, not dropping them. Main's separate persistent-startup fixture change is retained. The introduced production repair is unchanged; 91 of its 93 production paths are byte-identical to the green-CI/live-tested Bee checkpoint. The other two contain only upstream sessions-history guidance and PWA approval-delivery wiring. Integration coverage passes 112 tests in six files; the original two-file benchmark passed 27 tests before integration. The full local pnpm build passed in 305.82 seconds. A fresh isolated full-branch Codex P1 review completed in two chunks with no actionable P0/P1 findings; it was diff-based review, not another test run. The full classified check plan passed in 618.11 seconds, including core/extension test types and targeted lint. Canonical prompt snapshots and the integrated startup-retry suite pass. Fresh exact-head package-only Docker proof also passes below. Current CI run 33290615815 completed successfully at attempt 1, including native lanes and the required gate. Native review artifacts validated and OPENCLAW_TESTBOX=1 scripts/pr prepare-run 132122 passed, preserving and verifying the same remote head. The native merge confirmed that exact attempted head as 9e302fb57e4c; the completion receipt is published. Earlier proof retains its actual source identity.

Post-merge verification also passed 184 tests across seven files on main at ecb0386e89b330884512a193dec116e6c4e14444, covering the newer CLI-auth composition, Gateway availability and both proxy suites. The isolated Gateway was stopped, its task-only credential copies removed, and the Testbox lease confirmed completed; operator services were untouched. The original issue is closed with merged-main proof. Related malformed-host issue proof and supersession proof were posted; this session's closure attempts were rejected by the GitHub tooling rather than bypassed. No release or X post occurred.

node scripts/run-vitest.mjs src/agents/model-auth-availability.reasons.test.ts src/gateway/server-methods/models.test.ts src/gateway/server-methods/models-list-result.cli-runtime-availability.test.ts src/commands/models/list.list-command.forward-compat.test.ts src/agents/model-provider-auth.test.ts src/secrets/egress-proxy/proxy-server.test.ts src/secrets/egress-proxy/proxy-server.lifecycle.test.ts
Current-head local commands and native preparation
node scripts/run-vitest.mjs src/gateway/server-aux-handlers.authority.test.ts src/gateway/server-aux-handlers.test.ts src/gateway/approval-web-push.test.ts src/gateway/server-methods/approval.test.ts src/gateway/server-methods/approval-request-delivery.test.ts src/gateway/server-methods/question.host-consent.test.ts
OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs extensions/codex/src/app-server/attempt-startup-retry.test.ts
node scripts/check-changed.mjs -- src/gateway/server-aux-handlers.authority.test.ts src/gateway/server-aux-handlers.test.ts extensions/codex/src/app-server/attempt-startup-retry.test.ts
pnpm prompt:snapshots:check
pnpm build
OPENCLAW_TESTBOX=1 scripts/pr prepare-run 132122

All passed at 30b01f81d64a. Native hosted-gate verification recorded the exact head; preparation made no source change and skipped an unnecessary push. At preparation, the refreshed ClawSweeper review was acknowledged and in progress; its then-pending result was not described as a clean review.

Current-head package and live proof: 30b01f81d64a

Blacksmith Testbox run 33290662314 verified the complete source tree e9560253502c62767dec9c4579524a6792d4c0c1, all 19 real-worker cases, and 221 Codex lifecycle tests with four platform skips across nine files. The owned lease is confirmed completed. Core package SHA-256: 5c419cfd89cce35589425cda97330282406b7bbcfec66898c9f936f96e43ec3d. The canonical package-only Linux ARM64 image is sha256:b702d6549f3c1e297325bea6ed11f668c68dbe7950439ad165716f8d1786f4e5; installed source identity and neutral-home CLI were verified, with no source overlay.

Three fresh real-model/browser flows passed on that exact package. An actually omitted host proposal displayed and retained api.previous.example; human-edited consent stored api.analytics.example. Both entries preserved all 50 bytes, including edge spaces, and returned the canonical marker, complete store Ref/current policy, and the requesting run's final reply. Normal Collapse → Stop cancelled a separate requester; its delayed answer returned QUESTION_ALREADY_TERMINAL, and a read-only store query found zero matching rows, including deleted rows. Gateway instance, start time and authored configuration were unchanged during all three flows; ambient OpenAI/Ollama keys were absent and incoming frames contained no raw submitted value.

The lead opened all three selected current-head stills: masked entry/edited host, existing-host replacement disclosure, and Interrupted/Skipped are visible. They remain local; existing inspected, source-labeled web/iOS/Android media below is unchanged. Current-head videos have not been inspected or offered as proof. The stopped screenshot is not catalog-readiness evidence; protocol and store checks establish rejection.

Green-CI checkpoint proof: bee48149180f

Pushed source: bee48149180f02a311b25122a1c7484a30ac4c71; tree 8e61dca827044bf9b498b11dfe77670f59ebbf46. Local pnpm build passed. Clean Linux package proof in Blacksmith Testbox run 33287733803 verified the complete source tree, all 19 real-worker cases, and the nine Codex lifecycle suites. The owned lease tbx_01m187erbjfccyt4pjzawrftq8 is confirmed completed. Core package SHA-256: c3c5d0165b05012773ea4bf15298c0ffe6bead1187e7d1fd0cf1570d0edc36d9.

The package-only ARM64 image sha256:a74e120843486d73e4e13dc693bac27fa6c7d2a002284cd6bc4c28b01f8ee64b ran the actual Gateway and real model without a source overlay. The same isolated retained configuration remained byte-identical throughout all three flows; no manual reload/restart occurred during them. Ambient OpenAI/Ollama key variables were absent.

Pushed-head flow Final effect observed
Existing-host replacement The model actually omitted allowedHosts; the masked card displayed api.previous.example. The canonical stored ACK and the requesting run's own final reply arrived. A read-only check of this synthetic entry verified all 50 bytes, including edge spaces, and the visible host policy in the protected store.
Human-edited policy The human changed api.example.com to api.analytics.example. Exact 50-byte storage, the complete {source:"store",provider:"default",id:…} Ref and matching current-policy metadata were verified. No raw value appeared in incoming frames.
Nearest revoked requester Normal browser Collapse → Stop, then a delayed resolve while the cancelled question was retained. It returned QUESTION_ALREADY_TERMINAL; the requesting run was aborted. Read-only SQL found zero matching rows, including deleted rows. There was no reconnect, config change or Gateway-instance replacement during the proof.

Three new still captures were personally inspected: masked input, the displayed existing/edited host, and Interrupted/Skipped are visible. They contain only synthetic task data. Their upload was blocked by the GitHub CLI wrapper's string-rewrite protection; that tooling issue is recorded separately, not bypassed. The already-published web/iOS/Android images and inspected recording remain below. The cancellation capture is not catalog-readiness proof; protocol and SQL establish rejection. New videos have not been inspected and are not offered as proof.

Integration, review and CI status

The real CI startup failure is repaired: a child can exit before Node delivers its exit callback, and the old registration cleanup discarded that diagnostic. Failed startup now uses the existing bounded descendant/pipe lifecycle and records whether cleanup caused the exit. Natural exits keep their bounded diagnostics; live inspection/store refusals and cancellation remain non-retryable. The real npm-launcher/native-child shape is covered, including inherited pipes and clean exits induced by cleanup. Fingerprints, registration-before-initialize, retry counts and shutdown budgets are unchanged.

Direct contract checks: pinned Codex fatal SQLite initialization, initialize gate, npm launcher's inherited pipes/signals, and Node 24's close-event contract.

The reversed-order regressions failed before the repair. The original 12-file CI envelope then passed 278/278 on Node 24 with CI's two-worker setting. Wider earlier Node 26 runs had outer-deadline failures and are not called green. Clean Linux subsequently passed 221 lifecycle tests with four macOS-ps skips on source 8c71dde9119b.

Integration at 1c9b1b9d298e passed 311 focused tests, 345 Apple tests, 147 Android tests with zero failures/skips, core/core-test type checks, and the local build. A full-branch independent P1 review completed in two chunks with no actionable P0/P1 findings in either chunk. The later bee481… refresh changed only canonical generated prompt fixtures in the introduced patch; git range-diff confirms production changes are unchanged. All 22 commit authors, dates and messages were preserved. The focused prompt/schema checks and canonical snapshot check passed again. No budget was raised.

A local build initially failed because its dependency tree lacked execa/index.js; pnpm install --frozen-lockfile restored it and the full build passed. Android's first attempt lacked an SDK location; the successful run used the existing API 37.0 SDK and Android Studio JBR, without changing project defaults or installing a substitute SDK.

Merged through the native workflow. Exact-head CI run 33287631289 completed successfully on bee481…, including the native lanes and openclaw/ci-gate. Main advanced during that run and produced another generated-prompt-fixture conflict. The watcher stopped on the conflict, not on a failed test; the run was retained through completion. The subsequent generated-fixture and PWA expiry-test conflicts are resolved in the integrated candidate. Current-head CI and native preparation passed on 30b01f81d64a; the native merge confirmed it as 9e302fb57e4c without a required-check bypass. Generated hash/count changes are not exempt from the native patch-equivalence check, and no required check is treated as passed by artifact validation.

ClawSweeper rank-up dispositions: the native omission issue is repaired at the common question producer, so all clients display what will be saved; a native-only nil workaround would retain unseen hosts. Explicit clears and concurrent replacements retain coverage. Fresh allowed-versus-revoked store-effect proof now exists on current head 30b01f81d64a, including direct zero-row verification after cancellation. Older protected-egress observations remain separately labeled. The lead directly inspected pinned Codex source; the dependency remains 0.150.1. Fresh re-review was requested and acknowledged; no successful candidate Codex inference is claimed through the unpublished-package trust guard.

Integrated-candidate rename-aware introduced delta against 7ca3e14a52cc: production +1,869/−1,110 = +759, tests/support +7,089/−1,266 = +5,823, docs/guidance +140/−42 = +98, generated +20/−2 = +18, prompt fixtures +43/−44 = −1, and ratchet metadata +2/−4 = −2, across 177 paths. Production growth supplies previously missing requester/registration ownership, cross-client consent, bounded current-policy/human-wait facts, lifecycle-owned publication, transferable credential provenance and bounded startup settlement. Duplicate cleanup/publication paths, source-free reparsing, stale prompt aliases, dead exports/wrappers and the memory pseudo-migration were removed; no parallel secret store or polling cache was added.

Earlier credential-recovery proof: 7cd56b399f64

Source 7cd56b399f64f84334c7e3db6fafd84cdc146002, tree e4cedc6b1a4e329e7d1beb4ea5dbbaa5bfe2a43b passed local pnpm build and clean Linux package/real-worker proof. Blacksmith Testbox run 33271676440, lease tbx_01m17gw05t2mwmdgq8seryy2q7, verified whole-source-tree equivalence and all 19 real-worker cases. The lease is confirmed completed. Core tarball SHA-256: 07c4a338d55d32db4f169a5a9001a90fe215f5fe572b5a62911e90c221e53814. The package-only ARM64 Docker image is sha256:c1bb7030bc8aba83e0f48893d1cfcb08e237f4164e8f7f9758ed01f0109adcd1, installed build 2026.8.1-7cd56b399f64-2026-08-29T19-48-27.110Z; no source overlay.

Cold Ref → masked save → authenticated discovery → available model now passes. The cold baseline had no anonymous or authenticated discovery. A healthy real model requested the missing credential; the normal masked card submitted exactly 12 synthetic bytes and returned the canonical stored ACK, complete Ref/current policy and that requesting run's own final reply. In the same container and unchanged configuration, normal models.list then returned 10/10 OpenAI and 1/1 Ollama models available, with no degraded owner. Product GET /api/tags and POST /api/show both returned authenticated HTTP 200. Proxy delta: two authorized calls, zero denied calls, zero upstream failures. Ambient provider-key environment variables were absent. No manual reload, restart or configuration edit occurred during recovery. This proves discovery/availability, not an Ollama generation call: the proof proxy permits only those read-only discovery routes.

The same packaged source also passed existing-host consent, human-edited policy, cancelled-requester rejection, and ordinary-prompt egress drivers. Cancellation returned QUESTION_ALREADY_TERMINAL with no listed stored entry; the stronger direct SQL zero-row check belongs to the separately labeled b103 proof below. Ordinary-prompt egress used one exec with no environment override, receiving malformed-target HTTP 400 followed by permitted real HTTPS 200, with no raw key in frames/history. The final driver captures were not inspected before temporary-file loss and are not offered as verified media; the previously inspected source-labeled web/iOS/Android images below remain the tweet media.

Before these flows, the isolated, stopped test volume needed a newer-main agent-identity migration. Normal doctor --fix --non-interactive exited 0, then this candidate started. Both semantic metadata rows and all 22 chunks retained exact hashes; no index deletion, rebuild, memory disablement or schema workaround. One immediate catalog probe failed before the cold-ready baseline and its body was not captured; it is not attributed to a proven cause or counted as a passing probe.

The old temporary proof directory did not survive a session restart. Published media, source-specific recorded results, the image and isolated volumes survive; missing receipts have not been recreated or relabeled as new observations.

Earlier packaged-source live proof: b103837e3f67

All observations in this table used the same package-only ARM64 Docker Gateway, normally authenticated clients, isolated retained state and unchanged authored configuration. There was no source overlay, manual reload, restart or credential fallback during these flows.

Flow Observed result
Retained semantic-index startup Gateway became healthy against the state that blocked the earlier build. Both metadata rows and all 22 semantic chunks retained their exact pre-boot hashes. No index deletion, rebuild or memory disablement.
Existing-entry host consent The real model actually omitted allowedHosts. The card displayed the existing api.previous.example policy; submission and storage preserved it and all 50 input bytes, including surrounding spaces. Canonical stored ACK and the requesting run's final confirmation were captured.
Human-edited destinations The operator changed the proposed api.example.com to api.analytics.example. Exact 50-byte storage, complete {source:"store",provider:"default",id:…} Ref and actual current policy were verified. The final reply confirmed storage without the earlier false Gateway-policy explanation.
Allowed versus revoked requester A separate real request was cancelled with the browser's normal Stop control. A delayed answer was sent 31 ms after the question cancellation event, while the terminal record was retained. It returned QUESTION_ALREADY_TERMINAL; the run was aborted and the protected store had zero rows, including deleted rows, for that entry. This is final-effect protocol/store proof, not an inference from the screenshot.
Ordinary-prompt egress One exec, no environment override or explicit-inheritance coaching. A malformed direct target returned HTTP 400, then the permitted real HTTPS request returned 200 using an opaque sentinel. Gateway/config unchanged; no raw credential in incoming frames/history.
Cold config Ref → save → discovery Cold owner was unavailable with no authenticated or anonymous discovery calls. Real masked entry returned the canonical ACK, complete Ref/current policy and the healthy requesting agent's own final reply. Actual authenticated tags and show calls then returned HTTP 200, with no degraded owner, restart or config edit. This older build still failed availability projection; the 7cd proof above verifies its repair.

Exact stored-byte checks and boundary scans found zero raw synthetic-value matches in other state tables, agent databases and logs. The public-marker fixture is not used as a string-based leak detector; its canonical envelope/provenance assertions are separate. Real-key proof has no screenshots or recording.

Before/after host-consent proof used original baseline e946d226f73c and candidate b103837e3f67. Before: an empty host field silently retained a bound host, and the known whitespace bug submitted 48 of 50 bytes. After: the existing host is visible and 50 bytes are preserved. The baseline trimming failure remains recorded rather than being relabeled as success.

The first cancellation driver looked for Stop while the expanded question occupied the composer slot. That automation attempt timed out without submitting; the corrected driver uses the normal Collapse → Stop interaction. Its failed attempt is retained. No permission or authority check was bypassed.

Native and earlier provider proof

The original iOS app reproduced INVALID_REQUEST from its flat answer envelope. Repaired iOS and Android artifacts rendered consent and preserved 52 synthetic bytes plus the edited api.native.example host. Android's cross-device flow used one native submission, no web entry, and no input retries/reinjections. Native Answered and final replies were visible; a native wire ACK was not captured, so source control flow is not presented as a captured acknowledgement.

Those installed native artifacts were built at accc27ffce344558b0fb026c79f941e28450db3d; their hashes, signatures and pairing were verified, not relabeled as b103 builds. All 1,776 recorded native inputs were unchanged through 63477765ee64; subsequent main integration received separate compilation/test proof. Historical Swift proof passed 344 tests across five suites; later integration passed 160 Android tests with zero skips and 304 Codex/TUI tests. The separate macOS repository CI lane passed 508 tests in 14 files, not 508 Swift tests. Overlapping batches are not summed.

Earlier real-provider proof at 566df86ab01e covered OpenAI auth-profile-only refresh (ten available models), a separate Anthropic Ref-only agent recovering in the same session, and authenticated Ollama profile-only discovery. These remain historical source-specific observations. The old unscoped config-Ollama zero-HTTP premise was invalid and was corrected publicly: unrestricted model selection does not imply proactive discovery of every provider. The current fixture uses the existing discovery-scope wildcard; production policy was not widened.

Deterministic proof, builds and direct dependency inspection

Owner-boundary regressions cover authority closure, write/answer races, auth-profile refresh, canonical recovery, proxy revocation/replacement, unconditional store sealing, human waits, native submission and external delivery. Prompt tests cover actual/deferred/namespaced names and omission when unavailable. Registered-plugin → planner and structured-worker → HTTP tests verify actual credential use and safe writable payloads.

Host-consent regressions produced eight intended pre-fix failures, then passed the 141-case sibling batch. The extracted shared harness also passed its 47-case one-worker run. Memory startup regressions failed the original producer with the exact unmaterialized-auth warning and passed after removal of the pseudo-migration. Final source/test graph, type, lint, assertion, sidecar, database-first and import-cycle gates passed. The aggregate changed-check command initially failed on the new test's static plugin imports; the test was corrected to use the existing public-surface loader, then the verified unchanged prefix was carried forward and every remaining planned gate was run. This is not a claim that the original aggregate command exited successfully.

The real-worker timeout was traced to a Darwin fs.watch lost wakeup, not fixed with longer deadlines. The test fixture now watches actual barrier-file state and retires workers before clearing their resources. The full 19-case real-worker suite passed locally and on clean Linux with the unchanged 120-second test deadline; 219 owner siblings passed. Lead inspected exact Node 24.20.0/libuv 1.52.1 watcher contracts. Canonical prompt snapshots and source-only native inventory were regenerated under the earlier approval; no budget or suppression was raised.

Representative exact focused commands:

node scripts/run-vitest.mjs src/gateway/server-methods/question.test.ts src/gateway/server-methods/question.host-consent.test.ts --reporter=verbose
node scripts/run-vitest.mjs src/commands/doctor-memory-startup.test.ts --reporter=verbose
pnpm lint:tmp:tsgo-core-boundary
pnpm tsgo:core:test
pnpm check:import-cycles

The b103 live-tested package was built from b103837e3f67bd856e5e4c9b816acb7733a3725c, tree 640446fdcd7740d362b15ad514b14021dfcc268b. Local pnpm build passed unchanged with no ineffective dynamic-import warning. Clean Blacksmith Testbox run 33264468792 verified full source-tree equivalence, the 19 worker cases and artifact hashes. The core tarball SHA-256 is a3364b4032f3d4b50bc77ec48c0fc76e6e87f0c48fabf6ac73c283ebc1d4aa77. The final package-only image verified installed identity and neutral-home CLI startup. Fresh independent P1 reviews of the watcher, consent and memory corrections returned no findings on their recorded trees, including the final 640446f tree.

Lead personally inspected pinned Codex dynamic handler, protocol, and npm launcher. Upstream awaits the host response without the OpenClaw-owned fixed watchdog repaired here. Dependency remains 0.150.1.

A separate secretless disposable Docker proof installed the candidate with normal npm-pack: management and --accept-capabilities, observed runtime registration loaded, resolved the declared dependency, and started the installed launcher as codex-cli 0.150.1. It correctly remained not trusted-official. An exact unpublished candidate cannot exercise the privileged binding store through normal official-install provenance: local artifacts deliberately do not inherit catalog trust. The earlier turn failed at that guard before inference; no trust override, fixture-registry substitution or publication was used. Package proof and Codex boundary tests are not claimed as a successful live Codex turn.

Historical observations and corrected premises: #132122 (comment)

The separately recorded unrestricted model-selection follow-up is not claimed resolved here. No raw credentials, agent transcripts or proof binaries are committed.

Inspected screenshots and suggested tweet media

Suggested tweet media: web, iOS, Android masked entry.

Web b103: masked credential entry and human-edited destinations

iOS: masked credential entry and edited destinations

Android: masked credential entry and edited destinations

Regression evidence:

Before: iOS rejects the flat secret-answer envelope

Before e946: omitted host proposal leaves only a placeholder, not the existing destination

After b103: the existing destination is visible before credential replacement

After b103: cancelled requester shows Interrupted and the question is skipped; protocol and store checks verify rejection

iOS: confirmation reflects the stored host policy

Real b103 masked-entry recording, frame-inspected, sidebar cropped and authentication setup trimmed; playback speed unchanged:

masked-entry-flow-b103.mp4

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation r: skill Auto-close: skills should be published on ClawHub, not added to core. app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes agents Agent runtime and tooling extensions: codex extensions: ollama extensions: copilot size: XL maintainer Maintainer-authored PR labels Aug 28, 2026
@clawsweeper clawsweeper Bot added 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. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 29, 2026, 2:13 AM ET / 06:13 UTC.

ClawSweeper review

What this changes

This draft repairs agent-requested credential handling across Gateway storage, web/native consent cards, provider refresh, Codex waits, and secret-egress lifecycle handling.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⛔ Blocked until real behavior proof is added - 9 items remain

Keep open: both native clients still turn an untouched absent host policy into an explicit empty list, clearing a previously host-bound secret on replacement. The draft also lacks exact-head final-effect authority proof and is currently conflicted/draft.

Priority: P1
Reviewed head: a7f5a09a3ccdfb67c102e680f0ba113b56d2be93

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The draft has substantial repair coverage, but two known native compatibility regressions and missing exact-head authority proof keep it from merge readiness.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: Authority-chain proof required: the final head changes requester-bound store and egress authority, but supplied live observations target earlier packaged revisions and the contributor states that final repaired-source live proof is pending. Prove an allowed request succeeds and the nearest revoked/replaced requester is rejected before protected-store or egress I/O; redact private endpoints and credentials. 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.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Authority-chain proof required: the final head changes requester-bound store and egress authority, but supplied live observations target earlier packaged revisions and the contributor states that final repaired-source live proof is pending. Prove an allowed request succeeds and the nearest revoked/replaced requester is rejected before protected-store or egress I/O; redact private endpoints and credentials. 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.
Evidence reviewed 6 items Android omitted-host regression: An untouched draft with no proposed hosts returns store.allowedHosts.orEmpty(), so absence becomes []; the controller serializes every non-null list. That makes a native replacement explicitly clear an existing host binding.
Apple omitted-host regression: For a secret request without allowed hosts, the getter derives an empty string and splits it into [], which the request encoder emits as an explicit override.
Store compatibility contract: The store preserves allowed_hosts on a replacement only when allowedHosts is omitted; an explicit empty list writes null and removes the previous binding.
Findings 2 actionable findings [P1] Keep absent Android host consent omitted
[P1] Keep absent Apple host consent omitted
Security Needs attention Prove requester revocation before final I/O: The branch changes authority for protected-store and egress operations; available evidence does not show the exact head rejecting the nearest revoked requester before its final store or proxy side effect.

How this fits together

An agent asks the Gateway for a credential, and a web or native client submits a masked answer that becomes a protected store entry. The Gateway then refreshes dependent provider state and may provide a destination-bound credential sentinel to Gateway-hosted commands.

flowchart LR
A[Agent credential request] --> B[Gateway question and authority check]
B --> C[Web and native consent cards]
C --> D[Protected secret store]
D --> E[Provider runtime refresh]
D --> F[Bounded egress proxy]
E --> G[Agent result]
F --> G
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Authority-chain proof required: the final head changes requester-bound store and egress authority, but supplied live observations target earlier packaged revisions and the contributor states that final repaired-source live proof is pending. Prove an allowed request succeeds and the nearest revoked/replaced requester is rejected before protected-store or egress I/O; redact private endpoints and credentials. 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.
  • Keep absent Android host consent omitted (P1) - When a request has no proposed hosts, an untouched Android draft returns [], and the resolver sends that list. Gateway treats [] as an intentional override, so rotating a secret with an existing host binding clears it instead of preserving it. This is the still-unfixed prior blocker; keep null until the operator edits the field.
  • Keep absent Apple host consent omitted (P1) - The Apple model turns an unedited absent host proposal into an empty array, which its transport encodes as an override. That clears an existing stored host policy during a native replacement; only an explicit user clear should produce []. This is the still-unfixed prior blocker.
  • Resolve security concern: Prove requester revocation before final I/O - The branch changes authority for protected-store and egress operations; available evidence does not show the exact head rejecting the nearest revoked requester before its final store or proxy side effect.
  • Resolve merge risk (P1) - Replacing an existing host-bound secret from either native client can silently remove its egress binding when the new request proposes no hosts.
  • Resolve merge risk (P1) - The authority-changing paths have no final-head allowed-versus-revoked final-effect proof; the cited live observations are from older source revisions.
  • Resolve merge risk (P1) - The pinned merge-base delta and test merge are unavailable, so the full 153-file branch cannot receive a complete introduction-ownership audit until it is rebased and reviewable.
  • Resolve merge risk (P2) - The Codex app-server timeout change still needs direct sibling-Codex contract inspection; the local environment could not obtain that checkout.
  • Complete next step (P2) - The two P1 blockers have a narrow, mechanical cross-client repair and focused existing tests.

Findings

  • [P1] Keep absent Android host consent omitted — apps/android/app/src/main/java/ai/openclaw/app/chat/ChatQuestion.kt:51-54
  • [P1] Keep absent Apple host consent omitted — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatQuestionCard.swift:158-161
  • [medium] Prove requester revocation before final I/O — src/gateway/server-methods/question.ts:450
Agent review details

Security

Needs attention: No new supply-chain concern was identified, but the changed requester-bound authority requires exact-head final-effect revocation proof before merge.

Review metrics

Metric Value Why it matters
Unresolved native clients 2 clients Both Apple and Android retain the prior host-policy replacement blocker.
Production versus test delta Unclassified; bounded patch evidence covers 80 of 153 changed files A full production/test LOC judgment needs a reviewable introduced range after rebase.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Repair native host omission (recommended)
    Keep an unedited absent proposal omitted in both native clients, preserve explicit empty edits, and add replacement coverage for an existing host-bound entry.
  2. Pause for a narrower refresh
    Rebase the broad draft and repeat the review only after the native compatibility repair and exact-head authority evidence are attached.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Preserve nil versus explicit empty host consent in Apple and Android, add existing-entry replacement regressions, and retain the Gateway's omitted-field semantics.

Technical review

Best possible solution:

Represent untouched absent host consent as nil in Apple and Android, reserve [] for an intentional clear, then prove a final-head requester-revocation attempt is rejected before store or egress I/O.

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

Yes—create a host-bound secret, request its replacement without proposed hosts, and submit unchanged native consent; current source serializes [], while the store treats omission and an explicit empty list differently.

Is this the best way to solve the issue?

No—the repair must preserve a three-state native consent value: absent, explicit list, or intentional empty clear. The current default collapses absent into an empty override in both clients.

Full review comments:

  • [P1] Keep absent Android host consent omitted — apps/android/app/src/main/java/ai/openclaw/app/chat/ChatQuestion.kt:51-54
    When a request has no proposed hosts, an untouched Android draft returns [], and the resolver sends that list. Gateway treats [] as an intentional override, so rotating a secret with an existing host binding clears it instead of preserving it. This is the still-unfixed prior blocker; keep null until the operator edits the field.
    Confidence: 0.99
  • [P1] Keep absent Apple host consent omitted — apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatQuestionCard.swift:158-161
    The Apple model turns an unedited absent host proposal into an empty array, which its transport encodes as an override. That clears an existing stored host policy during a native replacement; only an explicit user clear should produce []. This is the still-unfixed prior blocker.
    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 high; reviewed against cb7eecdb5bfb.

Labels

Label justifications:

  • P1: A documented native credential replacement can make an existing destination-bound secret unusable.
  • merge-risk: 🚨 compatibility: The introduced native encoding changes whether an existing secret retains its stored allowed-host policy.
  • merge-risk: 🚨 security-boundary: The draft changes requester-bound store and egress authority, but final-effect revocation proof is not available for the exact head.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Authority-chain proof required: the final head changes requester-bound store and egress authority, but supplied live observations target earlier packaged revisions and the contributor states that final repaired-source live proof is pending. Prove an allowed request succeeds and the nearest revoked/replaced requester is rejected before protected-store or egress I/O; redact private endpoints and credentials. 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.

Evidence

Security concerns:

  • [medium] Prove requester revocation before final I/O — src/gateway/server-methods/question.ts:450
    The branch changes authority for protected-store and egress operations; available evidence does not show the exact head rejecting the nearest revoked requester before its final store or proxy side effect.
    Confidence: 0.9

Acceptance criteria:

  • [P1] pnpm android:test.
  • [P1] swift test --package-path apps/shared/OpenClawKit.
  • [P1] pnpm test src/gateway/server-methods/question.test.ts.
  • [P1] pnpm check:changed.

What I checked:

Likely related people:

  • steipete: Authored the merged agent-requested credential feature and every commit in this repair draft. (role: original feature owner and recent area contributor; confidence: high; commits: ef95d8f55ef4, a7f5a09a3ccd; files: src/gateway/server-methods/question.ts, apps/android/app/src/main/java/ai/openclaw/app/chat/ChatQuestion.kt, apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatQuestionCard.swift)
  • ekinnee: Authored the merged provider-scoped discovery work that this draft extends in the provider refresh path. (role: adjacent provider-catalog contributor; confidence: medium; commits: cbdfedee842a; files: extensions/ollama/src/discovery-shared.ts, src/plugin-sdk/provider-catalog-live-runtime.ts)

Rank-up moves

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

  • Preserve omitted versus explicitly empty host consent in both native clients and cover replacement of an existing host-bound entry.
  • Add final-effect proof that the nearest revoked or replaced requester cannot reach protected-store or egress I/O on the exact head.
  • Rebase to a clean, reviewable head and provide the required direct Codex runtime-contract inspection.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-28T21:24:37.765Z sha 6347776 :: found issues before merge. :: [P1] Preserve an omitted host policy on native replacements
  • reviewed 2026-08-28T23:37:39.494Z sha 425d661 :: needs changes before merge. :: [P1] Preserve an omitted host policy on native replacements
  • reviewed 2026-08-29T04:16:00.570Z sha 425d661 :: found issues before merge. :: [P1] Preserve omitted Apple host consent | [P1] Preserve omitted Android host consent

@steipete

steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Current-head proof update: 30b01f81d64a0ed35f061e096647fbb6a02702af is pushed and non-draft; not merged. The PR body now contains the compact capability-gated agent guidance, the unposted tweet draft, source-labeled web/iOS/Android media, and the complete proof ledger. Exact-head CI, including native lanes and the required gate, is green. Native review/artifact validation and OPENCLAW_TESTBOX=1 scripts/pr prepare-run 132122 passed without changing the prepared head; native merge is next. Exact local commands and all proof gaps are in the PR body.

The latest review's host-consent finding is repaired at the common question producer: every masked store question carries the effective destinations the human will save—proposal, otherwise existing hosts, otherwise []. Native-only omission preservation would retain undisplayed hosts. Explicit clears and concurrent replacement cases remain covered.

Fresh real Docker proof now uses this exact head, not a relabeled earlier build. Clean Linux package run 33290662314 verified the full source tree, 19 worker cases, and 221 lifecycle tests with four platform skips. The package-only ARM64 image has no source overlay. Real-model/browser flows preserved all 50 submitted bytes and the displayed existing or human-edited host. Normal Collapse → Stop cancelled a separate requester; a delayed answer returned QUESTION_ALREADY_TERMINAL, and direct read-only store verification found zero rows, including deleted rows. The same Gateway instance and authored configuration remained unchanged throughout. The selected stills were personally inspected; no real-key entry was recorded.

The PWA expiry-test conflict is resolved without dropping main's new Web Push assertions. All 22 commit authors, dates and messages are preserved. On this head, 112 approval/consent tests, 14 startup-retry tests, canonical prompt checks, the full classified check plan, and pnpm build pass. A fresh isolated full-branch P1 review completed in two chunks with no actionable P0/P1 findings. This was diff review, not a substitute for test execution. Exact-head CI run 33290615815 completed successfully at attempt 1; openclaw/ci-gate is SUCCESS. Native hosted-gate verification passed; no required check is bypassed.

The lead directly inspected pinned Codex dynamic-tool handling, SQLite startup, and launcher/pipe lifecycle. No successful unpublished-candidate Codex inference is claimed through the normal official-install trust guard. Earlier native binaries and credential-recovery/egress proof remain labeled with their actual sources below and in the PR body.

The refreshed review is acknowledged and in progress. Its pending result is not claimed as a clean review.

Preserved earlier checkpoint, failed attempts, and corrected discovery premise (historical—not current status)

Packaged live-proof update — still draft, not land-ready. The original source-63477765ee64 failure (reply: models.providers.ollama.apiKey is unresolved in the active runtime snapshot, run 7bc73142-205c-4961-8407-e14086c4098f) is repaired on pushed source 425d6619fca9cd399b47251d162afdc978bb80c3: with that provider still cold, the healthy model requested its missing credential, the real masked card preserved all 12 synthetic fixture bytes, the tool returned a complete store SecretRef/current policy, and its own run completed without a config change, manual reload or restart. Regression coverage preserves strict selected-provider, foreign-config, auth-only-snapshot and channel/account boundaries.

Web and Android storage proof now pass. Fresh web flows preserved all 50 synthetic bytes, including edge spaces, and the operator's edited api.analytics.example host. The inspected video is a second recording without the first capture's transient viewport artifact; it is cropped to the relevant chat surface with no speed change. No real-key entry was recorded.

For Android, the real request was created on the web and the exact same session was opened through the native Sessions picker. Android alone entered and submitted the credential: 52 bytes preserved exactly, including two leading and two trailing spaces, and the edited api.native.example host. There was one native submission, zero web secret fills/resolves, and no key reinjection or input retries. The same real run reached its final state; Android displayed Answered, and the tool returned the complete store Ref/current policy. Both web and Android read-only checks found zero matching plaintext values in other shared-state tables, agent databases or logs. This is explicitly cross-device request/native-answer proof, not a claim that the earlier emulator composer-input failures were repaired. Those failed attempts and drafts remain preserved. Native binaries were built at accc27ffce344558b0fb026c79f941e28450db3d; the serving Gateway was 425d6619…, not a relabeled final-source binary.

Two limits remain visible in the Android evidence. The direct canonical question-answer ACK was not captured; the later question-record read found no record, so the verified tool result and native/store outcomes are not being called a captured wire ACK. Also, the model correctly reports the edited host but incorrectly attributes it to Gateway policy and recommends changing proxy configuration. Current entry metadata does not establish that cause. The final screenshot preserves this wording defect; the result-local guidance is being clarified to distinguish the entry's host list from global configuration and avoid invented explanations. Use the masked-consent capture—not that flawed explanation—for the unposted tweet draft.

The actual proxy proof passed: one unauthenticated malformed direct HTTP target returned 400, then a permitted read-only OpenAI request returned 200 using an opaque sentinel in the same exec, with the Gateway/config unchanged (run d7299207-578a-437a-977c-6407ab66e2a9). This run explicitly instructed the model to omit environment overrides. The earlier ordinary-prompt run is retained as a failed one-attempt proof: its first exec unnecessarily overrode the injected variable and failed the sentinel assertion; its second, identical command inherited the environment and succeeded. No raw credential appeared in incoming frames or history. The assisted run does not erase that model-behavior limitation.

Catalog evidence correction: the original fixture had no Ollama model reference, auth profile or provider wildcard in its agent discovery scope. Zero Ollama HTTP in that fixture was therefore not valid bug proof by itself: provider-scoped discovery intentionally separates unrestricted model selection from proactive provider discovery. Product scope will remain unchanged; the next worker/live reproduction uses an explicit, existing discovery scope in the test fixture. The original observations are retained, not relabeled as a passing scoped test.

Separately, the real reloader regression remains valid: active config recovers the credential, auth-profile revision stays unchanged, and the published model owner retains the unresolved Ref. Independent auth regressions also prove that source-Ref-owned marker/template values were rejected and whitespace was trimmed. Those owner repairs are underway. Worker provenance will be judged only with the correctly scoped fixture and a legitimate positive control. No new production discovery option, broader provider enumeration or implicit credential fallback is being added.

The necessary conflict integration is separately verified at 270fa6c31fe5a3f16207ec227e5b020a9fa9e6e1: 304 Codex/TUI tests, 160 Android tests with zero skips, scoped types/lint/format and native inventory passed. It introduced no production-code change and preserved all 15 feature commits' attribution. That is source integration evidence, not a new package build. Final repaired-source build/live proof, fresh review, exact-head CI and repository-native prepare/merge remain outstanding. The earlier unpublished Codex candidate's normal-install trust blocker remains documented and was not bypassed.

Web masked credential entry with operator-edited destination

Web confirmation without the submitted secret

Android masked credential entry and edited destination

Android submission succeeds; incorrect model policy explanation remains visible

web-secret-consent.mp4

@steipete
steipete force-pushed the steipete/agent-secret-requests-4ae354 branch from 6347776 to 425d661 Compare August 28, 2026 23:23
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Aug 28, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Aug 28, 2026
@steipete
steipete force-pushed the steipete/agent-secret-requests-4ae354 branch from 425d661 to a7f5a09 Compare August 29, 2026 06:06
@openclaw-barnacle openclaw-barnacle Bot removed the scripts Repository scripts label Aug 29, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 29, 2026
Reuse the matching config-prepared Gateway owner state instead of repeating broad strict secret resolution. Preserve selected-provider, foreign-config, standalone, and channel/account enforcement, including authored-reference provenance before config projection.

Reproduced both entry failures and the source-projection gap before repair; focused regressions, types, lint, import cycles, and independent review pass. Refs #131306.
Refresh canonical model publication at secret activation and fence
superseded publication and rollback. Carry authored SecretRef provenance
into catalog workers so resolved key and header bytes remain opaque and
writable catalog metadata remains safe.

Clarify current entry policy after human edits. Retire real-worker test
fixtures at their lifecycle boundary and replace timing-based overlap
checks with the existing barrier.

Focused regressions, type/lint guards, and isolated P1 review pass. The
full local worker suite recorded 14 passes and four 120-second timeouts;
unchanged clean-Linux and final live proof remain required before merge.
Normalize the host list at question creation so web and native cards show
what they will save. Preserve explicit empty proposals and human clears;
concurrent store writes cannot introduce undisplayed destinations.

Keep generic store-update semantics unchanged and cover replacement,
new-entry, and concurrent-write cases through the real question handlers.
Remove the read-only provider diagnostic that blocked Gateway startup
before auth-profile SecretRefs could activate. Keep genuine state
migrations, Doctor health guidance, and the runtime guard against
replacing an existing semantic index with FTS-only data.

Retire the unused migration wrapper and preserve the managed-local
readiness collector at its health owner. Cover stored and missing refs
through migration and activation while retaining semantic index rows.
Classify provider credentials from the matching authored SecretRef instead of
reinterpreting resolved bytes as environment markers, placeholders, or profile
names. Share that boundary with runtime auth planning and inline cooldown
ownership while retaining profile locks, order, and snapshot matching.

The live masked-entry flow recovered authenticated discovery but left the model
unavailable. Add failing-before/passing-after Gateway and shared chat-catalog
regressions, plus source-ownership and cooldown controls. Focused siblings pass
402 tests; the final changed-file gate and independent review are clean.

Refs #131306, #132122.
Keep literal environment overrides, inheritance, and every runtime constraint
while reducing combined field descriptions from 603 to 523 characters. Preserve
the existing 550-character budget and assertions; no schema or runtime change.

The exact failing CI assertion reproduces locally. Both schema suites, lint,
formatting, prompt snapshots, and independent review pass after the wording fix.

Refs #132122 (secret-request repair).
Load the real Ollama plugin through the SDK-owned, manifest-validating source
loader instead of the legacy core test-utils resolver and an import assertion.
Keep every credential-ownership and writable-plan assertion unchanged.

Regenerate the two lower SDK defaults from collectPluginSdkSurfaceReport:
4357 -> 4355 public exports and 2593 -> 2592 callable exports. Preserve all
budget checks, wildcard limits, and source-count equality assertions.

The exact import-boundary assertion, 28 plugin/planner cases, 10 SDK-report
cases, affected types/lint/format and fresh independent review pass.

Refs #132122 (secret-request repair).
Keep natural startup exits and their bounded diagnostics distinct from
registration refusals and cleanup-induced exits. Reuse transport-owned
containment and exit budgets so a refused npm launcher cannot leave its
native child or inherited pipes alive.

Preserve synchronous registration before initialize, cancellation authority,
retry counts, fingerprint checks, and the existing shutdown deadlines.
Add real-process regressions for both exit orderings, shared and isolated
startup, live refusals, launcher descendants, and bounded pipe draining.

Found while validating the secret-request repair in #132122. The original
12-file CI envelope passes all 278 tests with Node 24 and two workers.
@steipete
steipete force-pushed the steipete/agent-secret-requests-4ae354 branch from c999da8 to 30b01f8 Compare August 30, 2026 03:35
@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit 9e302fb into main Aug 30, 2026
271 of 273 checks passed
@steipete
steipete deleted the steipete/agent-secret-requests-4ae354 branch August 30, 2026 04:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 31, 2026
…rity (openclaw#132122)

* docs: allow isolated browsers for development proof

* fix(android): refresh approval when the operator connects last

* fix(secrets): preserve protected requests across clients and run lifecycles

* fix(secrets): preserve native prompts and durable channel delivery

* perf(cli): keep meeting metadata off runtime imports

Preserve command metadata and execution behavior while removing the broad meeting runtime from cold CLI discovery. Keep engine-private codec helpers internal and remove the unused, unshipped node-caller wrapper; no SDK budget or stable API changes.

* refactor(agents): remove unused reply registry type re-exports

* test(secrets): use typed gateway and deferred fixtures

* fix(secrets): return authoritative current policy after protected entry

* fix(auth): preserve resolved references in model discovery

Prepare canonical per-invocation credentials while preserving synchronous catalog callbacks and marker-only generated config. Isolate unavailable selected profiles before HTTP instead of making anonymous requests.

* fix(agents): explain protected command credential injection

Share compact inherited-sentinel guidance across prompts and tool descriptions: no secret templates, overrides or printing. Preserve host and run-snapshot limits, and clarify primary-session availability in docs. Verified six intended prompt regressions before the wording change.

* fix(ollama): separate discovery credentials from catalog configuration

* test(agents): mock the active-run projection owner in abort coverage

* fix(auth): preserve opaque config references through discovery

Carry source SecretRef provenance to model discovery and keep resolved credentials separate from configuration markers, including marker-shaped values. Preserve selected-owner unavailability and existing credential precedence.

* fix(agents): explain literal exec environment overrides

Clarify that environment override values are literal and omission inherits the prepared environment. This prevents the protected-credential workflow from implying shell expansion; execution semantics stay unchanged.

* fix(agents): keep healthy turns available with unrelated cold secrets

Reuse the matching config-prepared Gateway owner state instead of repeating broad strict secret resolution. Preserve selected-provider, foreign-config, standalone, and channel/account enforcement, including authored-reference provenance before config projection.

Reproduced both entry failures and the source-projection gap before repair; focused regressions, types, lint, import cycles, and independent review pass. Refs openclaw#131306.

* fix(secrets): publish recovered credentials to model owners

Refresh canonical model publication at secret activation and fence
superseded publication and rollback. Carry authored SecretRef provenance
into catalog workers so resolved key and header bytes remain opaque and
writable catalog metadata remains safe.

Clarify current entry policy after human edits. Retire real-worker test
fixtures at their lifecycle boundary and replace timing-based overlap
checks with the existing barrier.

Focused regressions, type/lint guards, and isolated P1 review pass. The
full local worker suite recorded 14 passes and four 120-second timeouts;
unchanged clean-Linux and final live proof remain required before merge.

* fix(secrets): show effective hosts before credential replacement

Normalize the host list at question creation so web and native cards show
what they will save. Preserve explicit empty proposals and human clears;
concurrent store writes cannot introduce undisplayed destinations.

Keep generic store-update semantics unchanged and cover replacement,
new-entry, and concurrent-write cases through the real question handlers.

* fix(memory): keep provider readiness out of startup migrations

Remove the read-only provider diagnostic that blocked Gateway startup
before auth-profile SecretRefs could activate. Keep genuine state
migrations, Doctor health guidance, and the runtime guard against
replacing an existing semantic index with FTS-only data.

Retire the unused migration wrapper and preserve the managed-local
readiness collector at its health owner. Cover stored and missing refs
through migration and activation while retaining semantic index rows.

* fix(auth): preserve resolved secret provenance in model availability

Classify provider credentials from the matching authored SecretRef instead of
reinterpreting resolved bytes as environment markers, placeholders, or profile
names. Share that boundary with runtime auth planning and inline cooldown
ownership while retaining profile locks, order, and snapshot matching.

The live masked-entry flow recovered authenticated discovery but left the model
unavailable. Add failing-before/passing-after Gateway and shared chat-catalog
regressions, plus source-ownership and cooldown controls. Focused siblings pass
402 tests; the final changed-file gate and independent review are clean.

Refs openclaw#131306, openclaw#132122.

* fix(agents): compact exec parameter descriptions

Keep literal environment overrides, inheritance, and every runtime constraint
while reducing combined field descriptions from 603 to 523 characters. Preserve
the existing 550-character budget and assertions; no schema or runtime change.

The exact failing CI assertion reproduces locally. Both schema suites, lint,
formatting, prompt snapshots, and independent review pass after the wording fix.

Refs openclaw#132122 (secret-request repair).

* test(secrets): align plugin fixture and tighten SDK counts

Load the real Ollama plugin through the SDK-owned, manifest-validating source
loader instead of the legacy core test-utils resolver and an import assertion.
Keep every credential-ownership and writable-plan assertion unchanged.

Regenerate the two lower SDK defaults from collectPluginSdkSurfaceReport:
4357 -> 4355 public exports and 2593 -> 2592 callable exports. Preserve all
budget checks, wildcard limits, and source-count equality assertions.

The exact import-boundary assertion, 28 plugin/planner cases, 10 SDK-report
cases, affected types/lint/format and fresh independent review pass.

Refs openclaw#132122 (secret-request repair).

* fix(codex): preserve startup exits through bounded cleanup

Keep natural startup exits and their bounded diagnostics distinct from
registration refusals and cleanup-induced exits. Reuse transport-owned
containment and exit budgets so a refused npm launcher cannot leave its
native child or inherited pipes alive.

Preserve synchronous registration before initialize, cancellation authority,
retry counts, fingerprint checks, and the existing shutdown deadlines.
Add real-process regressions for both exit orderings, shared and isolated
startup, live refusals, launcher descendants, and bounded pipe draining.

Found while validating the secret-request repair in openclaw#132122. The original
12-file CI envelope passes all 278 tests with Node 24 and two workers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: codex extensions: copilot extensions: memory-core Extension: memory-core extensions: ollama gateway Gateway runtime maintainer Maintainer-authored PR 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. P1 High-priority user-facing bug, regression, or broken workflow. r: skill Auto-close: skills should be published on ClawHub, not added to core. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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.

Secret requests lose native answers and outlive their requester

1 participant