Skip to content

refactor(secrets): run secret settings metadata writes in workers - #164020

Merged
steipete merged 7 commits into
mainfrom
dbasync/secretmeta
Oct 3, 2026
Merged

steipete merged 7 commits into
mainfrom
dbasync/secretmeta

Conversation

@steipete

@steipete steipete commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Ordinary secret settings metadata reads and set/delete/rollback operations still execute SQLite on the Gateway thread. Moving them into workers also requires preserving save-before-answer ordering for store-bound credential questions and save-before-config ordering during token provisioning.

Why This Change Was Made

Use the existing shared-state writer and lazy reader registry. Capture the physical store and inputs before yielding, recheck host authority at transaction and commit, retain exact-writer rollback, and register transferred secret values with the host redaction owner. Prepare the existing lazy secret schema once per admitted database backend before its first ordinary write.

Await persistence through settings RPCs, provider persistence, CLI/Doctor callers, and token provisioning. Store-bound questions publish their safe stored marker only after acknowledgment. Reset immediately hides in-flight entries while their private settlement remains owned, so completion cannot affect a replacement using the same ID.

User Impact

No schema version, stored format, retention, configuration, or update-contract change. Runtime value/exec reads, hidden GitHub credential operations, and the CLI-only allowed-host setter retain their existing owners. The merged onboarding trusted-proxy/Funnel protections remain intact.

Production: 31 files, +856 / -377, net +479; 1,233 changed lines. Original-base static main-thread SQL measurement: T1 1,339 → 1,331 (-8). This is a placement count, not a latency benchmark.

Released SDK surface check: compared with v2026.9.7 and rechecked against the newer v2026.9.8 tag during landing. The transitively exported QuestionManager.resolve() and reset() remain synchronous with their released signatures; the internal async path is additive. Other changed synchronous helpers are not exported through released SDK/runtime surfaces. No compatibility adapter or deprecation record is needed for an unchanged released signature.

Coordinator-approved incidental overlap with #163945 in shared-state read-command plumbing. The validator change only adds the new command case in the existing style; it does not restructure the validator.

Evidence

  • Full focused run: 464 tests across 26 files passed, using pnpm test <changed test files> --maxWorkers=1; 839.18 seconds wall time on the loaded host.
  • Final owner rerun after mechanical lint corrections: 91 tests across four files passed in 69.39 seconds.
  • Both requested regressions failed on the original WIP for the intended reasons (9.78 seconds), then passed: premature stored acknowledgment and reset visibility/reused-ID isolation.
  • Real-worker boundary proves zero caller-thread SQL for set/list/delete/rollback, FIFO writes, exact-writer compensation, atomic batch rejection, validation error classes, and transaction/commit revocation.
  • Six added cases took 4.077 seconds of test-body time in the final run, excluding shared setup/compilation. Hosted CI timing is not yet available.
  • Onboarding security, token provisioning, CLI kind inheritance, provider rollback, Doctor repair, and question authority regressions passed.
  • Core and core-test typechecks passed. Madge: 0 cycles. Worker ratchet passed against 6aa12006ff81ee0ba2c72eaafc41ea196c8600e7. Original validation recorded the environment-name budget at 477/477; this PR introduces zero new names.
  • P2 Codex autoreview: scoped-clean, pinned to the same merge base; no accepted/actionable findings.
  • Full pnpm build passed, including SDK exports and runtime-load verification: 1,456.49 seconds wall time. It emitted a nonfatal UI startup gzip diagnostic of 373,475 B versus 373,454 B (+21 B); this PR does not modify UI sources.
  • Final node scripts/check-changed.mjs --base 6aa12006ff81ee0ba2c72eaafc41ea196c8600e7 passed: 1,130.90 seconds wall time. Full core lint reported only three pre-existing max-lines warnings in untouched files; runtime import cycles were also zero.

Initial validation exposed and repaired WIP import/schema omissions, test routing for the host-owned broker, and a provider assertion that needed to check the preserved revocation cause.

Landing validation

Initial CI run 37095271879 exposed two PR-caused test integration omissions. The new Gateway database-worker inventory entry was not alphabetically ordered, breaking the CI planner and CLI ownership assertions. The managed-auth real-Gateway fixture also needed to await the now-asynchronous credential write before startup closes parent-side database admissions. The landing correction 94dc8bd33662a04eb15ccdad5121de4d810f11a1 changes only those two test files and preserves all assertions.

Both tooling files failed consistently in five single-worker runs on the approved head, while each passed five times on merge base 6aa12006ff81ee0ba2c72eaafc41ea196c8600e7. After the ordering correction, the two files passed together: 533 tests, 147.99 seconds wall time, using node scripts/run-vitest.mjs test/scripts/ci-node-test-plan.test.ts test/vitest-cli-ownership.test.ts --maxWorkers=1. The two-file correction received a fresh P2 Codex autoreview with no accepted/actionable findings.

ClawSweeper completed the approved-head review without a correctness or security finding. Its data-model compatibility checklist was triggered by Doctor path changes. Those hunks only await the existing metadata reads; no schema or migration file, stored representation, retention, or update contract changes. The existing Doctor/token-repair regression proof and full build are recorded above.

Changed-file validation for the two-file correction passed in 302.50 seconds: formatting, all root test typecheck shards, lint, common guards, and dead-export scans. No new test cases or production changes were added.

The real-Gateway comparison completed on Blacksmith Testbox; detailed results are recorded below.

Main integration

The corrected head 94dc8bd33662a04eb15ccdad5121de4d810f11a1 passed CI run 37096767018, including all three previously failing Node jobs. Main then introduced a real conflict through the state cleanup in 0146d9b7ac1b7. Merge commit 76c039e613931905e2022d579636660c5df99b2d incorporates main 8bb7fb2f0fb33fbb74ede9243f4488a9b10a354f without rebasing. The resolution adds secrets.metadata to main's consolidated structured-clone command group; the managed-auth fixture and secret mutation implementation remain unchanged.

Affected integration proof passed: 544 tests across the secret metadata worker, shared-state read worker, CI planner, and CLI ownership suites, in 204.66 seconds wall time. The earlier successful CI run remains prior-head evidence; that merge head subsequently passed CI run 37098061123.

Full P2 review of the merged candidate raised one suggestion: refresh runtime secrets after an acknowledged write even if caller authority has expired. This was not accepted: reloadReference also performs retention writes and runtime activation, so these follow-up effects retain the existing current-authority boundary. The documented committed-answer recovery contract preserves a successful save as terminal and reports an unavailable refresh with instructions to retry secrets.reload, rather than resubmit the answer. The guards and that recovery behavior remain intact.

Blacksmith Testbox baseline managed-auth E2E comparison passed five times at the pinned original merge base. The original head failed five times with the same missing-secret and read-admission-closed errors; the single-await repair then passed.

Final validation and review

Blacksmith Testbox run 37097133490 reproduced the managed-auth flow using node scripts/run-vitest.mjs test/system-agent-managed-auth.e2e.test.ts --maxWorkers=1: baseline 5/5 passed, original PR head 5/5 failed, and only the missing await added: passed. The returned fixture bytes match this PR's repaired fixture. Warm baseline runs took 33.902–34.641 seconds, warm original-head runs 32.221–32.521 seconds, and the repaired run 34.550 seconds (7.438 seconds test-body time). The first baseline and original-head invocations included fresh runtime builds, taking 605.160 and 561.403 seconds respectively. The remote command exited successfully, and both task-owned leases are stopped.

Head 76c039e613931905e2022d579636660c5df99b2d passed complete changed-file validation in 1,621.04 seconds, including all core test type graphs, storage/schema guards, lint, and zero runtime import cycles. Main advanced again during validation, producing one concurrent type-union conflict. Merge commit 3336b68e006cce24e1455ba41636d4ec6d14e04e incorporates 9d5c37cf80a9bf6c50833c405f0ae5a5b31298a1 without rebasing and retains both the secret-store validation and session-goal error variants.

Second-merge affected proof: 61 tests across three worker/error files passed in 317.81 seconds; core and state test types passed in 58.99 seconds, with formatting, targeted lint, and diff checks passing. Fresh full P2 Codex autoreview of this candidate is scoped-clean, with no accepted/actionable findings. Earlier valid proof is retained for unchanged inputs; the published merge head receives fresh required GitHub CI.

Gateway cleanup integration

Head 3336b68e006cce24e1455ba41636d4ec6d14e04e passed CI run 37100621968 with a successful overall check rollup. Main advanced during native preparation and introduced an incidental overlap with the merged gateway cleanup #163919 (cd09e8848e785). Merge commit 795a76bf2c1ed52b9aa2d4647b3b5c2bb87c6581 incorporates main 1fa3920cb54f12798948da2f3684c8c293fc07e8 without rebasing.

The resolution retains main's shared mutation-response helper. Its private callback now awaits the worker mutation, records a committed result only after acknowledgment, and applies the existing current-authority check before refresh. Set/delete keep their existing error messages and distinguish failed persistence from a committed write whose refresh cannot proceed. Public handler and released SDK signatures are unchanged.

Affected proof: 20 secrets handler/lifecycle tests passed in 380.67 seconds (cold compiled-worker preparation included); core and Gateway-method types passed in 46.37 seconds. Targeted lint, formatting, and diff checks passed. Fresh full P2 Codex autoreview is scoped-clean, with no accepted/actionable findings. Previous proof remains valid for unchanged inputs; current-head required CI is enforced by native landing.

Independently inherited CI failure

Final-head CI run 37103925805, attempt 1 has one failed test job (checks-node-changed-compact-small-5, job 111148878370) and its downstream CI aggregate. All other jobs passed or were intentionally skipped, including security-fast; no jobs were cancelled. CI remains recorded as failed.

The sole root is 21 failures in the unchanged src/flows/doctor-health-contributions.test.ts fixture. Its mocked config snapshots omit required sourceConfig; main's webhook migration change c7c937abfea22 (#162759) dereferences that field before the Gateway-auth contribution this PR changes. The exact 21-case set reproduced in 5/5 PR-head runs, 5/5 merge-base runs, and an actual current-main run at 843c05384d66d16f237786e51a95ff46c233f873. The test, snapshot-projection owners, ordering/support files, package manifest, and lockfile are byte-identical between CI's main parent and tested merge; the primary failing sources remained unchanged through checked main e52c9a89197f4ce00507386e6c6443bec6eb2a1d.

CI checked out e1b8868e805921bd90919bcae1137e9f4d069f9b, whose ordered parents are main 7d2e0fded0ad4ae04770c8d1b587e39f0fa18fd6 and PR head 795a76bf2c1ed52b9aa2d4647b3b5c2bb87c6581. Its tree was independently verified against Git's merge of those parents. Native landing will use the explicitly authorized pre-existing-failure admin route with hashed logs, exact cases, source identities, checkout binding, and scoped passing proof. This is an inherited-fixture exception, not a claim of green CI.

…ity overlap in configureGatewayForSetup; store-bound question callbacks need async authority)
Move ordinary settings metadata reads and set/delete/rollback through the shared-state workers. Await acknowledged persistence before settings and credential-question success, retain private question settlement across reset, and preserve exact-writer compensation and released synchronous SDK methods.
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 795a76bf2c1ed52b9aa2d4647b3b5c2bb87c6581
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/auth-token-store-ref.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server-methods/secrets.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/audit-store.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/audit.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/store/secret-store-metadata.kernel.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/store/secret-store-mutations.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/store/secret-store-validation-error.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/store/secret-store-validation.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/store/secret-store-write.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/store/secret-store.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/secrets/store/secret-store.types.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling size: XL labels Oct 3, 2026
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 3, 2026, 3:21 AM ET / 07:21 UTC (Revision 6).

ClawSweeper review

What this changes

Moves secret-settings metadata reads and mutations into database workers and awaits persistence before credential answers, token configuration, and provider-auth publication.

Merge readiness

⛔ Blocked before merge - 1 item remains

The worker cutover remains useful and is absent from current main. No actionable introduced defect was found; the previous migration-proof blocker does not apply because stored contracts are unchanged.

Priority: P2
Reviewed head: 795a76bf2c1ed52b9aa2d4647b3b5c2bb87c6581

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent worker cutover with focused lifecycle coverage and no actionable correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Recorded worker and real-Gateway validation supports the changed persistence path; inspected revocation coverage establishes no additional unresolved authority-proof requirement. No stored-data contract changes trigger migration proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Recorded worker and real-Gateway validation supports the changed persistence path; inspected revocation coverage establishes no additional unresolved authority-proof requirement. No stored-data contract changes trigger migration proof.
Evidence reviewed 8 items Pinned worker cutover: Reviewed the introduced base-to-head hunks. Mutations capture inputs and the physical store, use the existing shared-state worker, register secret values for host redaction, and retain exact-writer compensation.
Previous compatibility blocker resolved: Schema SQL, schema version, and the additive secret-table installer have no introduced changes. The worker invokes the existing installer once per backend; row fields, kind inheritance, repair predicates, deletion semantics, and rollback predicates remain intact. Doctor hunks await existing operations rather than introduce a migration.
Authority and settlement coverage: The real-worker tests inspect zero caller-thread SQL, FIFO writes, atomic rejection, exact-writer rollback, queued revocation, and transaction/commit revocation with no persisted rows. Question regressions cover delayed acknowledgment and reset/reused-ID isolation; existing handler tests reject aborted or replaced requesters before credential writes. These tests were inspected, not executed during this read-only review.
Findings None None.
Security None None.

How this fits together

The secret store holds credentials and environment settings used by Gateway configuration and providers. Settings requests now use the existing database workers before publishing acknowledgments or refreshing runtime credentials.

flowchart TD
  A[Settings and credential requests] --> B[Capture store and caller authority]
  B --> C[Database worker]
  C --> D[Check authority before commit]
  D --> E[Existing secret store]
  E --> F[Acknowledged result]
  F --> G[Safe answer and runtime refresh]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +479, Tests +301, Docs +8, Other +17. Total +805 across 63 files.

View PR surface stats
Area Files Added Removed Net
Source 31 856 377 +479
Tests 29 583 282 +301
Docs 1 10 2 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 2 17 0 +17
Total 63 1466 661 +805

Review metrics

Metric Value Why it matters
Worker lifecycle growth Production net +479 lines; test files net +285 lines Production growth has a stated purpose: awaited persistence, retained settlement, authority checks, and worker dispatch.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-gateway-auth-token.ts, migration/backfill/repair: src/commands/doctor-security.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Use the existing database workers while preserving committed outcomes, current caller authority, and released synchronous question contracts.

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

Not applicable to a reported bug: source confirms synchronous metadata access on current main, and the PR records worker-boundary validation. This read-only review ran no target tests.

Is this the best way to solve the issue?

Yes. Reusing the existing reader and writer owners, with awaited acknowledgments and unchanged stored contracts, is a focused solution.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded database-placement improvement without an established urgent user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored PR. Recorded worker and real-Gateway validation supports the changed persistence path; inspected revocation coverage establishes no additional unresolved authority-proof requirement. No stored-data contract changes trigger migration proof.

Evidence

What I checked:

  • Pinned worker cutover: Reviewed the introduced base-to-head hunks. Mutations capture inputs and the physical store, use the existing shared-state worker, register secret values for host redaction, and retain exact-writer compensation. (src/secrets/store/secret-store-mutations.ts:24, 795a76bf2c1e)
  • Previous compatibility blocker resolved: Schema SQL, schema version, and the additive secret-table installer have no introduced changes. The worker invokes the existing installer once per backend; row fields, kind inheritance, repair predicates, deletion semantics, and rollback predicates remain intact. Doctor hunks await existing operations rather than introduce a migration. (src/state/openclaw-state-db-schema-additive.ts:76, 795a76bf2c1e)
  • Authority and settlement coverage: The real-worker tests inspect zero caller-thread SQL, FIFO writes, atomic rejection, exact-writer rollback, queued revocation, and transaction/commit revocation with no persisted rows. Question regressions cover delayed acknowledgment and reset/reused-ID isolation; existing handler tests reject aborted or replaced requesters before credential writes. These tests were inspected, not executed during this read-only review. (src/secrets/store/secret-store-metadata.worker.test.ts:121, 795a76bf2c1e)
  • Released synchronous signatures preserved: GitHub source at v2026.9.8 confirms synchronous QuestionManager.resolve() and reset(). The reviewed branch retains those signatures and adds the separate awaited commit path. (src/gateway/question-manager.ts:317, fc23bc864e45)
  • Still necessary on current main: Fetched main still implements metadata listing synchronously using the caller-side SQLite reader. The related merged storage and Gateway cleanup PRs supplied incorporated refactors, rather than this metadata cutover. (src/secrets/store/secret-store.ts:123, e17e653e8dea)
  • Complete captured discussion body: Read the complete GitHub body and confirmed SHA-256 acfda770c72ad5f6aad94682b2f514d7593d600bdaff2dd75fb2fcb552cb651a, matching the captured snapshot and recovering its omitted tail. It records real-Gateway Testbox comparison, scoped validation, and the intentionally retained current-authority boundary before post-commit refresh. A saved answer remains terminal when refresh is unavailable. (795a76bf2c1e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • zachisfine: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (5 earlier review cycles)
  • reviewed 2026-10-03T04:12:16.032Z sha 688fdfa :: blocked before merge. :: none
  • reviewed 2026-10-03T04:35:31.340Z sha 94dc8bd :: blocked before merge. :: none
  • reviewed 2026-10-03T04:58:13.329Z sha 76c039e :: blocked before merge. :: none
  • reviewed 2026-10-03T05:47:39.415Z sha 3336b68 :: blocked before merge. :: none
  • reviewed 2026-10-03T06:50:46.182Z sha 795a76b :: blocked before merge. :: none

Await protected credential seeding before Gateway startup closes parent-side database admissions. Keep the Gateway worker inventory sorted for canonical CI and CLI selection.

The original routing failures reproduced in five runs per file and passed five times per file on the merge base. The corrected tooling tests pass all 533 cases; changed-file checks and P2 review are clean.
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Merge current main to resolve the structuredClone dispatch conflict. Retain main consolidation and include secrets.metadata in the captured command group.

Affected worker and routing proof passes 544 tests. Full P2 review completed; the suggested post-revocation refresh change was not accepted because refresh includes retention and runtime activation, while committed-answer recovery explicitly requires a later authorized secrets.reload.
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Resolve the concurrent ErrorIdentity union additions by retaining both secret-store-validation and session-goal-operation. Focused worker/error tests pass all 61 cases; core and state types, formatting, lint, and fresh full P2 review pass.
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Retain the shared mutation response helper from main, await the worker mutation before recording a committed outcome, and preserve current authority before runtime refresh. Existing set/delete response and recovery semantics remain unchanged.

Affected secrets handler/lifecycle tests pass all 20 cases. Core and Gateway-method types, targeted lint/formatting, and fresh full P2 review pass.
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit 31806d8 into main Oct 3, 2026
170 of 173 checks passed
@steipete
steipete deleted the dbasync/secretmeta branch October 3, 2026 08:02
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
…enclaw#164020)

* wip(secrets): settings metadata worker cutover (parked: openclaw#150992 security overlap in configureGatewayForSetup; store-bound question callbacks need async authority)

* refactor(secrets): finish worker metadata cutover

Move ordinary settings metadata reads and set/delete/rollback through the shared-state workers. Await acknowledged persistence before settings and credential-question success, retain private question settlement across reset, and preserve exact-writer compensation and released synchronous SDK methods.

* test(secrets): await fixture writes and preserve worker routing order

Await protected credential seeding before Gateway startup closes parent-side database admissions. Keep the Gateway worker inventory sorted for canonical CI and CLI selection.

The original routing failures reproduced in five runs per file and passed five times per file on the merge base. The corrected tooling tests pass all 533 cases; changed-file checks and P2 review are clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant