Repository navigation
fix(secrets): keep unaffected owners live during reload failures - #110779
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 12:55 PM ET / 16:55 UTC. Summary PR surface: Source +1037, Tests +1739, Docs -2, Generated 0. Total +2774 across 53 files. Reproducibility: no. high-confidence live reproduction is included. The inline review provides a source-level path: an auth profile with Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Normalize each auth profile to its effective credential shape before computing the owner contract, preserve stale state only for that normalized unchanged contract, and attach redacted live Gateway reload proof for healthy, stale, and cold owners before merge. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction is included. The inline review provides a source-level path: an auth profile with Is this the best way to solve the issue? No: owner-scoped retention is the right direction, but hashing the raw profile before ignored plaintext is normalized is not the narrowest correct boundary; use the effective normalized profile instead. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 837db49ebb24. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1037, Tests +1739, Docs -2, Generated 0. Total +2774 across 53 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
Review history (2 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8ff4a881e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (normalizeOptionalLowercaseString(candidateId) ?? candidateId) === providerId, | ||
| ); | ||
| return { | ||
| profile: structuredClone(profile), |
There was a problem hiding this comment.
Exclude ignored auth plaintext from stale-owner contracts
When an auth profile has keyRef/tokenRef plus a plaintext key/token, the collector warns that the plaintext is ignored and clears it before resolution, but the new owner contract hashes structuredClone(profile) before that normalization. If a user edits only that ignored plaintext while the SecretRef provider is unavailable, the contract digest changes even though the effective ref and provider config are unchanged, so classifySecretOwnerDegradationState marks the account cold instead of stale and drops the last-known-good auth credential. Build the contract from the normalized effective profile or omit plaintext fields when a ref is present.
Useful? React with 👍 / 👎.
e8ff4a8 to
656ebf3
Compare
|
Merged via squash.
|
…nclaw#110779) * fix(secrets): isolate reload failures per owner * refactor(secrets): split runtime activation helpers * fix(secrets): export web warning type * fix(secrets): reject unsafe degraded config writes * fix(secrets): derive reload defaults type * fix(secrets): defer reload state publication * fix(secrets): preserve partial refresh state * fix(secrets): retry superseded reload preflight * fix(secrets): bind stale credentials to owner contracts * fix(secrets): scope degraded credential contracts * fix(secrets): restore source ownership guards * fix(secrets): recover provider-only degradation * fix(secrets): enforce degraded reload contracts * fix(secrets): preserve scoped reload state * fix(secrets): reconcile deferred descendant state * fix(secrets): commit reload state atomically * fix(secrets): preserve source transaction lineage * test(secrets): use non-secret lineage marker * chore(plugin-sdk): refresh API baseline * fix(secrets): canonicalize web owner contracts * fix(plugin-sdk): preserve legacy secret owner contracts * fix(secrets): satisfy startup activation types * test(secrets): align reload fixtures with owner contracts * refactor(secrets): move source recovery scope helper * fix(secrets): preserve owner contracts on web failures * fix(secrets): bind legacy web resolution contract * fix(secrets): retry stale auth publication
…nclaw#110779) * fix(secrets): isolate reload failures per owner * refactor(secrets): split runtime activation helpers * fix(secrets): export web warning type * fix(secrets): reject unsafe degraded config writes * fix(secrets): derive reload defaults type * fix(secrets): defer reload state publication * fix(secrets): preserve partial refresh state * fix(secrets): retry superseded reload preflight * fix(secrets): bind stale credentials to owner contracts * fix(secrets): scope degraded credential contracts * fix(secrets): restore source ownership guards * fix(secrets): recover provider-only degradation * fix(secrets): enforce degraded reload contracts * fix(secrets): preserve scoped reload state * fix(secrets): reconcile deferred descendant state * fix(secrets): commit reload state atomically * fix(secrets): preserve source transaction lineage * test(secrets): use non-secret lineage marker * chore(plugin-sdk): refresh API baseline * fix(secrets): canonicalize web owner contracts * fix(plugin-sdk): preserve legacy secret owner contracts * fix(secrets): satisfy startup activation types * test(secrets): align reload fixtures with owner contracts * refactor(secrets): move source recovery scope helper * fix(secrets): preserve owner contracts on web failures * fix(secrets): bind legacy web resolution contract * fix(secrets): retry stale auth publication
Carry the selected Gateway ambient policy into initial config auto-enable, matching reload preparation. Require that policy at the startup config boundary and classify explicit channel presence from authored source rather than generated runtime enablement. Remove duplicate detector defaults. Preserve explicit channel configuration and both ambient opt-in flags. Document that the policy also applies to reloads and managed services. Release-note context: env-only channel activation bypassed the documented opt-in in stable releases through v2026.9.6. Affected operators must add channels.<id> configuration or use --ambient-channels. Existing suppression warnings explain the enablement path; no config migration should infer operator consent from environment credentials. Completes the policy work from #112011 and #123174 across the loader extracted in #110779. Validation: 440 focused tests passed. Before the fix, the new suite had two expected failures (suppression bypass and generated consent) and three passes; after the fix all five pass. The authored-config/prior-release corpus run had 24 passes and five 120-second timeouts, all in the first Doctor checkpoint before Gateway config loading. No causal connection to this fix was found; migration/worker timing remains a separate follow-up. A standalone replay was stopped while waiting for the legitimate artifact lock held by check-changed, before it reached Vitest. The changed-check aggregate passed production typing, all 25 test-type graphs, formatting, config docs, plugin boundaries and earlier guards, but failed on the full-tree Knip export scan's 600-second timeout. The same scan timed out when run alone with its unchanged limit; production/script export scans passed. Changed-file lint passed with zero warnings/errors. The native-state schema guard passed. The supplemental database-first scan was stopped after over 16 minutes under host load around 179; later media, sidecar, import-cycle, webhook and pairing guards were not run. Full changed-check validation is not claimed green.
…7387) Carry the selected Gateway ambient policy into initial config auto-enable, matching reload preparation. Require that policy at the startup config boundary and classify explicit channel presence from authored source rather than generated runtime enablement. Remove duplicate detector defaults. Preserve explicit channel configuration and both ambient opt-in flags. Document that the policy also applies to reloads and managed services. Release-note context: env-only channel activation bypassed the documented opt-in in stable releases through v2026.9.6. Affected operators must add channels.<id> configuration or use --ambient-channels. Existing suppression warnings explain the enablement path; no config migration should infer operator consent from environment credentials. Completes the policy work from #112011 and #123174 across the loader extracted in #110779. Validation: 440 focused tests passed. Before the fix, the new suite had two expected failures (suppression bypass and generated consent) and three passes; after the fix all five pass. The authored-config/prior-release corpus run had 24 passes and five 120-second timeouts, all in the first Doctor checkpoint before Gateway config loading. No causal connection to this fix was found; migration/worker timing remains a separate follow-up. A standalone replay was stopped while waiting for the legitimate artifact lock held by check-changed, before it reached Vitest. The changed-check aggregate passed production typing, all 25 test-type graphs, formatting, config docs, plugin boundaries and earlier guards, but failed on the full-tree Knip export scan's 600-second timeout. The same scan timed out when run alone with its unchanged limit; production/script export scans passed. Changed-file lint passed with zero warnings/errors. The native-state schema guard passed. The supplemental database-first scan was stopped after over 16 minutes under host load around 179; later media, sidecar, import-cycle, webhook and pairing guards were not run. Full changed-check validation is not claimed green. Co-authored-by: Peter Steinberger <[email protected]>
…nclaw#157387) Carry the selected Gateway ambient policy into initial config auto-enable, matching reload preparation. Require that policy at the startup config boundary and classify explicit channel presence from authored source rather than generated runtime enablement. Remove duplicate detector defaults. Preserve explicit channel configuration and both ambient opt-in flags. Document that the policy also applies to reloads and managed services. Release-note context: env-only channel activation bypassed the documented opt-in in stable releases through v2026.9.6. Affected operators must add channels.<id> configuration or use --ambient-channels. Existing suppression warnings explain the enablement path; no config migration should infer operator consent from environment credentials. Completes the policy work from openclaw#112011 and openclaw#123174 across the loader extracted in openclaw#110779. Validation: 440 focused tests passed. Before the fix, the new suite had two expected failures (suppression bypass and generated consent) and three passes; after the fix all five pass. The authored-config/prior-release corpus run had 24 passes and five 120-second timeouts, all in the first Doctor checkpoint before Gateway config loading. No causal connection to this fix was found; migration/worker timing remains a separate follow-up. A standalone replay was stopped while waiting for the legitimate artifact lock held by check-changed, before it reached Vitest. The changed-check aggregate passed production typing, all 25 test-type graphs, formatting, config docs, plugin boundaries and earlier guards, but failed on the full-tree Knip export scan's 600-second timeout. The same scan timed out when run alone with its unchanged limit; production/script export scans passed. Changed-file lint passed with zero warnings/errors. The native-state schema guard passed. The supplemental database-first scan was stopped after over 16 minutes under host load around 179; later media, sidecar, import-cycle, webhook and pairing guards were not run. Full changed-check validation is not claimed green. Co-authored-by: Peter Steinberger <[email protected]>
Related: #101265
Follow-up to #109792
What Problem This Solves
Fixes an issue where users reloading configuration with one temporarily unavailable SecretRef could lose unrelated resolved credentials, publish stale degraded state, or accept an unsafe config write while the reload transaction was still unsettled.
Why This Change Was Made
Secret reload degradation is now isolated by owner and bound to canonical reference, provider, and complete owner-config contracts. Publication and rollback use activation lineage and compare-and-swap ownership; config writes reject unsafe degraded transitions; provider-auth descendants and web-tool owners preserve only unchanged last-known-good state. Existing plugin SDK callers that omit the new owner contract remain compatible and conservatively start cold.
User Impact
Operators can reload around a temporary secret-provider outage without unrelated channels, providers, web tools, or auth profiles losing healthy credentials. Changed owners still fail closed, and recovery/status warnings reflect only committed runtime state.
Evidence
origin/mainate34ee002e8a2(confidence 0.78).