Repository navigation
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: stale review; fresh review needed. Summary Next step Review history (22 earlier review cycles; latest 8 shown)
|
7140b7d to
3d2fca0
Compare
3d2fca0 to
6616ec0
Compare
|
Exact-head proof is now attached to the PR body for 6616ec0279c11feb6d7d697b20fdc3547328aae4. The added connection-level regression covers both the allowlisted custom GW_TOKEN handshake and the denied-ref no-fallback handshake. @clawsweeper re-review |
|
Resolved the current-head P2 from ClawSweeper in
No installed app, operator Gateway, config, Keychain, or PortGuardian state was touched, so this remains exact-head connection-path @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
1b72615 to
0d6d0f6
Compare
|
Contributor-PR loop note: we checked this against current main ( We're leaving this PR open rather than taking it over. The fix is Swift-only and needs a native macOS reproduction and proof, and this loop has no macOS host. When it lands, it should keep the human co-author credits: Ayaan Zaidi, TheAngryPit and Vitor Cepeda Lopes. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Adapt #128175 source 3481ca3 to stable. Preserve #191468 configured credential precedence and the existing remote base path. Resolve explicit auth modes and typed env SecretRefs without falling through invalid configuration. Fresh P2 source review clean; Swift/native execution remains required qualification. Co-authored-by: RomneyDa <[email protected]>
|
Repair and validation update — November 4, 2026
Current head:
8149b98130829cb7d83ec153c9bc9355bcc7cc64. Validation completed November 5 UTC (November 4 Pacific).The follow-up fixes Core secret preparation: a remote-client token no longer deactivates the local password SecretRef. Local-token suppression and remote fallback rules remain intact. Original contributor history is preserved.
Successful exact-candidate validation run (proof harness
41fd6f3290417aa078a1de9cbfc4114d247c389f):config.geton the same native UI connection in every phase.config.get. The ready-service replay does not demonstrate a fix for that behavior.openclaw/ci-gatecheck run passed. The separate currentopenclaw/ci-gatestatus is failure, withopenclaw/security-sensitive-reviewpending: “A maintainer must approve the current PR revision.” Thus the aggregate gate is not green. Fresh independent source review and local ClawSweeper review of3481ca33..8149b981previously found no actionable correctness/security findings; those reviews do not satisfy the outstanding maintainer approval.Requested native/upgrade proof complete; maintainer security approval remains outstanding. No merge performed. Historical evidence below retains its original revision and limitations; historical pending proof statements are superseded only by the exact-candidate evidence above.
Closes #128171
What Problem This Solves
The macOS app could not authenticate to a local Gateway when
gateway.auth.tokenorgateway.auth.passwordused a typed env SecretRef. The Gateway supports those inputs, but the native endpoint store previously handled only strings.What Changed
gateway.remote.token: the local password wins unless an ambient Gateway token causes Core to leave that password ref inactive; when token auth is active, preserve LaunchAgent-token precedence before the remote-token fallback.User Impact
Users can keep local Gateway credentials in supported typed environment SecretRefs without breaking the macOS app connection. Invalid or disallowed references remain fail-closed, and the native app follows the same token/password selection behavior as Core.
Evidence
Current evidence refresh, 2026-10-28
Current public head is
3481ca33a1bf69a445814f0c620e12719c78f947(treef9061f44fb6a5815d8ab0e0f3a5391a9cac3a758). Its merge preservesc17b72d3538f81e934caaa4d5c373cf90e90c513and integrates main9a5581b4ce230381e3f200a62be4cdbe78e41c19. GitHub blob identities confirm that both PR-owned Swift files are unchanged fromc17b72d353. Contributor credit and the prior source and native evidence below remain attached to their stated revisions.Canonical CI run 40678248294 and its CI gate succeeded for head
3481ca33a1bf69a445814f0c620e12719c78f947. This run contains 5 successful and 38 skipped jobs. Both macOS Swift phases and the iOS build phase were skipped. macOS and shared Periphery run 40678248230 completed seven selected jobs successfully, including both shared-kit producers and the intersection; the iOS dead-code scan was skipped. Skipped native tests and successful static scans do not establish packaged-app authentication.No new native run or fresh ClawSweeper verdict is claimed. The durable review below remains bound to
ff41c754, and the shorthand correction atc17b72d353remains a source disposition. Exact-current-head focused tests, packaged-app coverage of the later remote-fallback combinations, and a stable-release upgrade retaining existing shorthand settings remain required. Historical native runs, the beta2 port, and earlier CI are preserved below and are not relabeled as current-head proof.Historical evidence status refresh, 2026-10-27
At that refresh, the public head was
c17b72d3538f81e934caaa4d5c373cf90e90c513. The completed CI run 39411875583 succeeded on tested merge44577cf085aada61cbbfb40cbbd236c63a28518a, combining this head with maind8c96213c5cf40295863fb5fb6d347e1f9caf6b7. Its unique job inventory contains 5 successful and 37 skipped jobs, with no failures or pending jobs. These are this run's jobs, not a sum of duplicate check/status surfaces; skipped jobs are not passing runtime proof.The exact delta since reviewed head ff41c754 changes only the endpoint source and its test file.
configuredInputnow classifies trimmed shorthand throughenvSecretRefNamebefore auth-surface selection, and the existing handshake matrix adds both$GW_PASSWORDand${GW_PASSWORD}with the available service token. This addresses the source change requested by the earlier P1 finding and preserves the original shorthand/fallback intent. It is a source disposition, not a new exact-head ClawSweeper verdict or packaged-app result.The durable review explicitly says maintaining Swift/Core parity alone does not require another product decision. Earlier parity-approval language below records historical status and is superseded on that point. Maintainer acceptance remains outstanding. Packaged-app proof for the later remote-fallback combinations and a stable-release upgrade retaining existing shorthand settings remain unproven. The beta2-port test evidence below is not relabeled as current-head packaged-app proof. Earlier pending-CI statements are historical and superseded only by the completed run identified here. No new runtime test, whole-current-tree review, or upgrade demonstration is claimed by this refresh.
Historical follow-up, 2026-10-20
Follow-up head: c17b72d353.
$NAMEand${NAME}shorthand forms as references before implicit auth-mode selection. A missing password reference no longer suppresses an available service token. Explicit modes and malformed or literal values keep their existing paths.git diff --checkpassed. This is synthetic proof of the beta2 port, not an exact-head packaged-app run or real Keychain, GUI, identity, or upgrade proof.Historical candidate evidence
Current PR candidate:
1ad4bcb852b2266950eea45c077ee023e1a42358, merged with currentopenclaw/openclaw:mainat1e13fc8abcd942ca398a89ca5560da11a1d46c41. GitHub confirms the PR is OPEN and the head/base match those revisions. The branch isMERGEABLE(no content conflict), but the merge state is BLOCKED by required CI. The PR delta against current main is limited toGatewayEndpointStore.swiftandGatewayEndpointStoreTests.swift(+118/-8 production, +477/-1 tests).conditionalAssignmentstyle error before compilation. The follow-up changes only the expression form and is being validated in current-head CI.scoped-cleanat P2 with no findings (confidence 0.76). Its report used the selected diff and supplied Core auth sources; it does not claim runtime verification. The report is preserved in the task-local review artifacts.macos-swift (tests)job cancelled while its Swift test step was running; no Swift test result is available. The aggregateopenclaw/ci-gatefailed solely because the selectedmacos-swiftcheck was cancelled. Preflight,security-fast,native-i18n, all three macOS Node shards, Swift lint,macos-swift (packages), shared OpenClawKit scans, macOS Periphery, OpenGrep, actionlint, changed-path scan, and security review passed. The iOS Periphery scan was skipped by scope.Must have admin rights to Repository. The Swift test verdict and aggregate CI gate therefore require a repository admin to rerun.git diff --checkpasses. This Windows host has no Swift toolchain, so native Swift execution relies on exact-head GitHub CI.23b805fa3821e06e882d846843d96da2252a91bd. It is historical evidence and does not demonstrate the added remote-token fallback cases on the current candidate.Native validation on 2026-09-04:
Validated candidate:
23b805fa3821e06e882d846843d96da2252a91bd.The main refresh preserves @TheAngryPit's original repair, @CassieMei's carried
auth-mode and precedence corrections, and all five contributor commits. Its sole
content conflict was two independent insertions in the endpoint store; both the
typed-reference resolver and main's source-snapshot helper are retained.
Before
Native baseline run
used unchanged production main
606d9ab82afdb28ebaad33896e41811b96ad87c7.The actual ad-hoc packaged app sent no token for a supported typed custom env
reference that the healthy managed local Gateway could resolve. It received
token_missing. A fresh literal-token control authenticated asopenclaw-macosand completed
config.get.After
Exact-candidate native run
reconstructed and checked the exact candidate tree/commit, verified its signature,
built the real app through the normal package script, and installed each real
local service through
gateway install --wrapper. The wrapper supplied normaldiagnostics and, only in the app-env fallback cases, the service's synthetic env
value. Every case used fresh synthetic profile/pairing state.
config.getconfig.getconfig.getconfig.getconfig.getconfig.getThe protocol evidence correlates
openclaw-macos, modeui, to successfulprotected responses on the same connections. Separate Control UI traffic is not
used as a substitute. Rejected-ref probes kept the server healthy with the
existing reload-off option; no auth or pairing policy was relaxed. The corrected
setups connect normally.
GatewayEndpointStoreTests: 83 tests passed on the exact candidate, includingprovider/allowlist rules, handshake auth, legacy strings and lifecycle siblings.
all synthetic Keychains were deleted successfully.
Prior ClawSweeper finding and current scope
The fresh ClawSweeper finding was checked against Gateway startup at the exact
Core revision it reviewed. Startup's
hasGatewayTokenCandidateexcludesgateway.remote.token, so a typed local password ref is materialized when noambient/local token candidate suppresses it; after materialization Core infers
password mode before token. The native selector and connect-frame regression
now preserve that password. If an ambient Gateway token is present, Core leaves
the password ref inactive and the native selector uses the token surface.
Against current main, the production delta is +118/-8 and the test delta is
+477/-1. The added native code
implements the existing typed-env contract; it adds no configuration option,
policy, schema, remote-auth behavior, or file/exec/store-ref support. Keep the
native/Core parity cases aligned when the shared auth contract changes.
The material below is retained contributor history at its stated inputs, not a
replacement for this current baseline and exact-candidate proof.
Historical contributor evidence
Historical contributor head:
4e35b1caf03687853b8cc9dd47f8d5c6ea81bb93The native proof was built from the exact two-file PR patch (
patch-id 7040be749e604bbda4f9be0b44ed15605a058bd9) over frozen base9d79bf3f8c5f18f7c35d028d57402f5085659640.swift test --package-path apps/macos --filter GatewayEndpointStoreTests— 75/75 passed on Apple Silicon macOS.config/swiftformat— 0/2 files require formatting.config/swiftlint.yml— 0 violations.git diff --check— passed.OpenClaw.apppackage build completed;codesign --verify --deep --strictpassed.config.getresponse.Review finding and vanilla verification
ClawSweeper correctly identified that the previous selector returned no credential for mixed typed-ref/ambient cases. Before changing it, the current Core Gateway was exercised directly in two isolated profiles:
The native selector and regression expectations now reproduce those observed Core outcomes rather than introducing an independent token/password policy.
Fail-before evidence
4e35b1caf03; both now match the isolated Core runtime outcomes.Historical current-main revalidation (2026-09-03)
openclaw/openclaw:main:9d6f5d218884b00a50746353c40170f5ab46e4db.4e35b1caf03687853b8cc9dd47f8d5c6ea81bb93.git merge-tree --write-tree origin/main refs/remotes/audit/pr128175completed cleanly.$ENV/${ENV}string forms, but still lacks the typed SecretRef object flow and matching credential-selection semantics covered by this PR.PR context and evidenceresult was caused by malformed heading presentation; this body restores the authored sections explicitly.AI assistance was used to investigate, implement, test, and review this change. The final diff and proof were inspected against current Core behavior.