Skip to content

refactor(agents): trust prepared provider facts - #174388

Merged
steipete merged 2 commits into
mainfrom
deslop/z04-5-provider-facts-20261015
Oct 16, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/z04-5-provider-facts-20261015

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Agent model preparation repeats internal envelope integrity checks and revalidates facts already admitted by config and provider owners.

User Impact

No intended user-visible change. Credential authority, request correlation, bounded worker reuse, normal shutdown settlement, provider selection, and shared immutable snapshots remain. A passive read crossing successive overlapping reloads may fail visibly and succeed on the next request.

Why This Change Was Made

Use the existing worker task correlation instead of a second whole-payload/request/reconstruction fingerprint protocol. Keep plugin-context cache identity and request-local credentials. Trust typed provider/config facts and keep read-only auth ordering genuinely read-only rather than cloning usage statistics to hide housekeeping mutations.

This is the provider/catalog area of the preserved agents cleanup. Publication-retirement recovery is deliberately separate while its first-signin regression is diagnosed. The coordinator-owned W6c residue and protected Phase E session backend are excluded.

Best-effort tradeoffs accepted

Evidence

Applied against fresh main f0025b1f9e2c124423adbd333bb5d1360c067912: 50 paths including two shrink-only test inventories and one assertion-safety baseline shrink; 36 agents production files, +112/-343, 231 net lines removed, plus one orphaned CI inventory line. Main already owned part of the model-metadata cleanup, so its route/parameter-count behavior is preserved rather than replacing that file with the parked version.

  • Fresh independent review of the full applied slice against f0025b1f9e2c124423adbd333bb5d1360c067912: scoped-clean through P2, no findings. The published report/status and final source verification were independently inspected; source is unchanged since review.
  • test/scripts/lint-suppressions.test.ts: 3/3 passed, 113.97s Vitest / 178.02s wrapper on the loaded shared host. No new suppressions.
  • Formatter: all 47 remaining files passed (46 original paths plus the final one-line inventory shrink). git diff --check passed.
  • Focused auth-order, models-merge, worker-authority and worker-input tests were stopped after more than 11 minutes of cold common-worker preparation, before assertions. This is neither a product failure nor passing proof. No local whole-graph typecheck, cycle check, build or E2E is claimed under the coordinator's proof budget. Exact-head PR CI owns the broad and remaining focused proof.

Initial exact-head CI run 38928564243 completed: selected runtime tests, production/test types, lint and security passed. Its ratchet job correctly required shrinking models-config.merge.ts's assertion-safety allowance from two to one after removal of its cast. The repair changes only that baseline row; production and test sources are identical to the reviewed head. Prior suppression proof is reused because the changed .txt baseline is outside the guard's code roots/extensions. This is a CI-caused fix push, not a rerun for green.

That initial attempt also found unrelated incoming-main defects: duplicate-scan coverage omitted the tracked root cli-parent-lifetime.mjs, and the mock-export guard named src/flows/doctor-plugin-source-captures.test.ts:32. Neither is a changed provider path. The final exact-head attempt will be attributed independently; the first attempt is not advertised as green.

GitHub then reported CONFLICTING, authorizing a conflict-only rebase onto 04d8503ee8ab97218b3283968293d079b1a8b219. Its sole conflict was the worker callback changed by #174361. Resolution preserves the upstream active-request retained-memory instrumentation, final clearing, and settled-predecessor release; it removes only the already-reviewed private request validation. Full worker, base-relative diff and range-diff were inspected; formatting and whitespace checks passed. Other reviewed cleanup hunks and the one-row ratchet fix are unchanged. Current signed head is ec368f3de9f76dde188163217398e00045e63c68; old-head CI remains historical evidence, with current exact-head CI required. The sparse conflict-repair checkout cannot run the complete worker graph locally; no new runtime or typecheck pass is claimed.

The preserved wide candidate had a genuine first-signin assertion at setup-inference.first-signin.integration.test.ts:240, not an inherited or startup-timeout failure. Its local single-file replay could not reach assertions without the prohibited broad runtime build, and the remote attempt obtained no lease within budget. Source traces have not established its causal hunk. This area excludes publication-retirement recovery; it is not advertised as fixing first-signin. Exact-head CI will decide this slice, with any failure attributed to its precise changed area.

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts agents Agent runtime and tooling size: L labels Oct 16, 2026
@steipete
steipete marked this pull request as ready for review October 16, 2026 16:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T16:30:14.903809Z ec368f3 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 16, 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: ec368f3de9f76dde188163217398e00045e63c68
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/auth-profiles/order.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/model-auth-availability.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/model-auth-env.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/model-auth-provider-config.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/model-auth-provider.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/models-config.providers.secret-helpers.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/plugin-model-catalog-auth.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/prepared-model-runtime.catalog-auth.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.

@steipete
steipete force-pushed the deslop/z04-5-provider-facts-20261015 branch from 45455d2 to ec368f3 Compare October 16, 2026 16:25
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 16, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head landing evidence for ec368f3de9f76dde188163217398e00045e63c68.

The complete paginated commit check-run census has 152 completed checks: 95 successful, 56 legitimately skipped, and one neutral advisory check. There are no failed, cancelled, or pending checks. Exact-head PR CI 38931900655 is green; the watcher completed GREEN. Combined commit statuses for dependency review, security-sensitive review, and the CI gate are successful. Current PR metadata reports the same head, ready, open, and mergeable, with no outstanding enforced review decision.

The original attempt 38928564243 was not green. Its own finding was an assertion-baseline allowance requiring a 2→1 shrink; that was repaired. Its unrelated mock-export/duplicate-scan findings are historical, not exceptions needed for this final successful head. The conflict-only rebase preserved #174361's retained-memory instrumentation and settled-predecessor release; reviewed cleanup semantics and baseline repair are unchanged. Fresh final-head CI, not old-head evidence, is the broad proof.

Independent full-slice review was scoped-clean through P2. Root inspected the complete conflict worker and base-relative/range diffs; only existing reviewed request checks disappeared, while upstream callback and active-request cleanup remain. Normal signed commits and local formatting/whitespace checks passed. The focused local worker command remained incomplete during cold preparation under shared load; no local runtime or semantic-type pass is claimed. CI supplies that proof.

Coordinator rule 10 authorizes the exact-SHA fallback after two genuine native infrastructure failures. Both occurred during review-init, before any merge intent: the first shared origin/main compare-and-swap collision in operation 89247, and the second in operation 50006 (ref had advanced to aded33b0cef1a063fa68e6fb4e1fc4b099d04241 while the fetch expected 01d207b301ee6cbd045c428394abc598edafbeb4). The intentional cancellation of an obsolete-head attempt is not counted. Both exact retained operation locks were recovered with the supported command after verifying no owned tools remained. There is no native merge-outcome ref or accepted/uncertain merge request to replay.

The fallback preserves the same squash method and pins the API's sha precondition to this exact reviewed, green head. This bypasses the broken orchestration tool, not any code, CI, review, or security gate. Production reduction: 231 net lines across 36 agents production files. Phase E and coordinator W6c are untouched.

@steipete
steipete merged commit 7e680fc into main Oct 16, 2026
155 checks passed
@steipete
steipete deleted the deslop/z04-5-provider-facts-20261015 branch October 16, 2026 16:41
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit 'a4c73619a5c': (29 commits)
  test: align model and Discord fixtures with runtime owners
  perf(sessions): reuse startup deletion discovery (#174408)
  fix(gateway): attribute ephemeral connections in normal logs (#174406)
  test(telegram): consolidate duplicate coverage (batch d117) (#173112)
  perf(doctor): avoid redundant backup and transcript reads (#174416)
  fix(update): avoid redundant reads for closed SQLite generations (#174426)
  fix(ui): Activity page tabs collapse to a few pixels on desktop (#173856)
  fix(decisions): skip prefilter for empty tool surfaces (#174269)
  perf(sqlite): retain unchanged database proofs across schema updates (#174409)
  refactor(test): remove duplicate export collision checks (#174391)
  fix: clear unused MCP and identity helper exports (#174421)
  fix(test): supply SQLite reliability fixture catalog
  refactor(mattermost): use the guarded transport directly (#174419)
  refactor(agents): trust prepared provider facts (#174388)
  fix(control-ui): open submenus immediately on click (#174292)
  test(anthropic): synchronize the late-send fixture with initialization
  refactor(ui): scope Plugins page state to Solid owners (#174281)
  perf(chat): pace board history refreshes and reuse cursors (#174407)
  perf(sqlite): bound session receipt scope publication (#174395)
  refactor(openrouter): share key budget test fixtures (#174340)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…157433

* commit '2e8bfec53fc1cf06c9e438f42b027a82e04ace9a': (29 commits)
  test: align model and Discord fixtures with runtime owners
  perf(sessions): reuse startup deletion discovery (#174408)
  fix(gateway): attribute ephemeral connections in normal logs (#174406)
  test(telegram): consolidate duplicate coverage (batch d117) (#173112)
  perf(doctor): avoid redundant backup and transcript reads (#174416)
  fix(update): avoid redundant reads for closed SQLite generations (#174426)
  fix(ui): Activity page tabs collapse to a few pixels on desktop (#173856)
  fix(decisions): skip prefilter for empty tool surfaces (#174269)
  perf(sqlite): retain unchanged database proofs across schema updates (#174409)
  refactor(test): remove duplicate export collision checks (#174391)
  fix: clear unused MCP and identity helper exports (#174421)
  fix(test): supply SQLite reliability fixture catalog
  refactor(mattermost): use the guarded transport directly (#174419)
  refactor(agents): trust prepared provider facts (#174388)
  fix(control-ui): open submenus immediately on click (#174292)
  test(anthropic): synchronize the late-send fixture with initialization
  refactor(ui): scope Plugins page state to Solid owners (#174281)
  perf(chat): pace board history refreshes and reuse cursors (#174407)
  perf(sqlite): bound session receipt scope publication (#174395)
  refactor(openrouter): share key budget test fixtures (#174340)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…/decision-onnx-v2-proof-20261016

* commit '2e8bfec53fc1cf06c9e438f42b027a82e04ace9a': (29 commits)
  test: align model and Discord fixtures with runtime owners
  perf(sessions): reuse startup deletion discovery (#174408)
  fix(gateway): attribute ephemeral connections in normal logs (#174406)
  test(telegram): consolidate duplicate coverage (batch d117) (#173112)
  perf(doctor): avoid redundant backup and transcript reads (#174416)
  fix(update): avoid redundant reads for closed SQLite generations (#174426)
  fix(ui): Activity page tabs collapse to a few pixels on desktop (#173856)
  fix(decisions): skip prefilter for empty tool surfaces (#174269)
  perf(sqlite): retain unchanged database proofs across schema updates (#174409)
  refactor(test): remove duplicate export collision checks (#174391)
  fix: clear unused MCP and identity helper exports (#174421)
  fix(test): supply SQLite reliability fixture catalog
  refactor(mattermost): use the guarded transport directly (#174419)
  refactor(agents): trust prepared provider facts (#174388)
  fix(control-ui): open submenus immediately on click (#174292)
  test(anthropic): synchronize the late-send fixture with initialization
  refactor(ui): scope Plugins page state to Solid owners (#174281)
  perf(chat): pace board history refreshes and reuse cursors (#174407)
  perf(sqlite): bound session receipt scope publication (#174395)
  refactor(openrouter): share key budget test fixtures (#174340)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…ision-accounting-native

* commit '2e8bfec53fc1cf06c9e438f42b027a82e04ace9a': (29 commits)
  test: align model and Discord fixtures with runtime owners
  perf(sessions): reuse startup deletion discovery (#174408)
  fix(gateway): attribute ephemeral connections in normal logs (#174406)
  test(telegram): consolidate duplicate coverage (batch d117) (#173112)
  perf(doctor): avoid redundant backup and transcript reads (#174416)
  fix(update): avoid redundant reads for closed SQLite generations (#174426)
  fix(ui): Activity page tabs collapse to a few pixels on desktop (#173856)
  fix(decisions): skip prefilter for empty tool surfaces (#174269)
  perf(sqlite): retain unchanged database proofs across schema updates (#174409)
  refactor(test): remove duplicate export collision checks (#174391)
  fix: clear unused MCP and identity helper exports (#174421)
  fix(test): supply SQLite reliability fixture catalog
  refactor(mattermost): use the guarded transport directly (#174419)
  refactor(agents): trust prepared provider facts (#174388)
  fix(control-ui): open submenus immediately on click (#174292)
  test(anthropic): synchronize the late-send fixture with initialization
  refactor(ui): scope Plugins page state to Solid owners (#174281)
  perf(chat): pace board history refreshes and reuse cursors (#174407)
  perf(sqlite): bound session receipt scope publication (#174395)
  refactor(openrouter): share key budget test fixtures (#174340)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…158510

* commit '26cbd409b9753a9318a6dc09f97b2f0b4b776a09': (29 commits)
  test: align model and Discord fixtures with runtime owners
  perf(sessions): reuse startup deletion discovery (#174408)
  fix(gateway): attribute ephemeral connections in normal logs (#174406)
  test(telegram): consolidate duplicate coverage (batch d117) (#173112)
  perf(doctor): avoid redundant backup and transcript reads (#174416)
  fix(update): avoid redundant reads for closed SQLite generations (#174426)
  fix(ui): Activity page tabs collapse to a few pixels on desktop (#173856)
  fix(decisions): skip prefilter for empty tool surfaces (#174269)
  perf(sqlite): retain unchanged database proofs across schema updates (#174409)
  refactor(test): remove duplicate export collision checks (#174391)
  fix: clear unused MCP and identity helper exports (#174421)
  fix(test): supply SQLite reliability fixture catalog
  refactor(mattermost): use the guarded transport directly (#174419)
  refactor(agents): trust prepared provider facts (#174388)
  fix(control-ui): open submenus immediately on click (#174292)
  test(anthropic): synchronize the late-send fixture with initialization
  refactor(ui): scope Plugins page state to Solid owners (#174281)
  perf(chat): pace board history refreshes and reuse cursors (#174407)
  perf(sqlite): bound session receipt scope publication (#174395)
  refactor(openrouter): share key budget test fixtures (#174340)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…esafe-decision-native

* commit '26cbd409b9753a9318a6dc09f97b2f0b4b776a09': (29 commits)
  test: align model and Discord fixtures with runtime owners
  perf(sessions): reuse startup deletion discovery (#174408)
  fix(gateway): attribute ephemeral connections in normal logs (#174406)
  test(telegram): consolidate duplicate coverage (batch d117) (#173112)
  perf(doctor): avoid redundant backup and transcript reads (#174416)
  fix(update): avoid redundant reads for closed SQLite generations (#174426)
  fix(ui): Activity page tabs collapse to a few pixels on desktop (#173856)
  fix(decisions): skip prefilter for empty tool surfaces (#174269)
  perf(sqlite): retain unchanged database proofs across schema updates (#174409)
  refactor(test): remove duplicate export collision checks (#174391)
  fix: clear unused MCP and identity helper exports (#174421)
  fix(test): supply SQLite reliability fixture catalog
  refactor(mattermost): use the guarded transport directly (#174419)
  refactor(agents): trust prepared provider facts (#174388)
  fix(control-ui): open submenus immediately on click (#174292)
  test(anthropic): synchronize the late-send fixture with initialization
  refactor(ui): scope Plugins page state to Solid owners (#174281)
  perf(chat): pace board history refreshes and reuse cursors (#174407)
  perf(sqlite): bound session receipt scope publication (#174395)
  refactor(openrouter): share key budget test fixtures (#174340)
  ...
vincentkoc added a commit that referenced this pull request Oct 16, 2026
…/decision-tool-v2-proof-20261016

* commit '26cbd409b9753a9318a6dc09f97b2f0b4b776a09': (29 commits)
  test: align model and Discord fixtures with runtime owners
  perf(sessions): reuse startup deletion discovery (#174408)
  fix(gateway): attribute ephemeral connections in normal logs (#174406)
  test(telegram): consolidate duplicate coverage (batch d117) (#173112)
  perf(doctor): avoid redundant backup and transcript reads (#174416)
  fix(update): avoid redundant reads for closed SQLite generations (#174426)
  fix(ui): Activity page tabs collapse to a few pixels on desktop (#173856)
  fix(decisions): skip prefilter for empty tool surfaces (#174269)
  perf(sqlite): retain unchanged database proofs across schema updates (#174409)
  refactor(test): remove duplicate export collision checks (#174391)
  fix: clear unused MCP and identity helper exports (#174421)
  fix(test): supply SQLite reliability fixture catalog
  refactor(mattermost): use the guarded transport directly (#174419)
  refactor(agents): trust prepared provider facts (#174388)
  fix(control-ui): open submenus immediately on click (#174292)
  test(anthropic): synchronize the late-send fixture with initialization
  refactor(ui): scope Plugins page state to Solid owners (#174281)
  perf(chat): pace board history refreshes and reuse cursors (#174407)
  perf(sqlite): bound session receipt scope publication (#174395)
  refactor(openrouter): share key budget test fixtures (#174340)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* refactor(agents): trust prepared provider facts

* chore(agents): shrink provider assertion baseline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. scripts Repository scripts security-sensitive-changed size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant