Skip to content

refactor(agents): reuse canonical model runtime facts - #177651

Merged
steipete merged 1 commit into
mainfrom
deslop/r08-10-model-runtime-facts-20261015
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/r08-10-model-runtime-facts-20261015

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Model execution repeats existing thinking-block, prototype-key, and credential-mode classification. Session forks also maintain two copies of the supported API roster, one for admission and another for disabling hosted tools.

What Changed

Reuse the existing thinking-block and blocked-object-key owners, and the exact-mode normalizer in the route-auth owner. One private fork descriptor now supplies both API membership and the provider's disabled tool-choice shape. Both unsupported-API checks stay, along with every live-authority, hosted-tool denial, cancellation, prefix, replay and recovery check.

This model-runtime area split removes 21 net production lines in five files, plus the exact obsolete two-cast assertion-baseline row. No tests are changed. The retired thinking predicate is core-private with no SDK/public-package consumer; no SDK symbol, public signature, config, schema, protocol or dependency change.

Best-effort tradeoffs accepted

  • Synthetic accessor-backed thinking blocks now use the canonical predicate's single captured type value instead of two property reads. Ordinary provider JSON/serialized blocks are unchanged; the recovery provenance (fix(agents): keep compacted sessions recoverable across retries #123484) does not establish a human getter-interleaving incident. Thinking recovery and signature checks stay.

Evidence

  • Route-auth and model-parameter owner suites: 31/31 pass. Thinking owner suite: 46/46 pass, including compaction signatures, terminal errors, completion, and no retry after output.
  • The initial combined plan reached fork-suite cold worker compilation and was stopped/joined before fork assertions. The thinking suite was then selected alone and completed; no fork-suite pass or full local build is claimed.
  • The extra-parameter consumer also reached cold worker compilation and was stopped/joined before assertions. The queued local prompt-prefix selection was retired before execution because it uses the same uncovered runtime setup; hosted CI must cover both gaps. No consumer/prefix pass is claimed.
  • Existing canonical prototype-key contract 1/1 passes and PR-wrapper source-closure contracts 3/3 pass. Targeted five-root native typecheck and focused syntax lint pass. Runtime-value and Madge cycles both zero. Independent P0–P2 full-owner review is scoped-clean, no actionable findings. Staged changed-check dry-run selected exactly six paths; its broad proposed commands were not run locally. Commit-hook formatting is recorded before publication. Exact-head hosted CI is the broad gate.
  • Suppression audit: 13 pass, 1 inherited failure, the unchanged src/gateway/session-row-scope.ts|unicorn/no-new-array|1 baseline mismatch (98 received/97 expected), matching the coordinator's open main-flake signature. No suppression or allowance was added.

Unify thinking and prototype classification with existing owners and share the fork API descriptor without weakening hosted-tool denial or authority checks. Synthetic accessor-backed blocks use one captured type value; serialized provider data is unchanged.
@clawsweeper

clawsweeper Bot commented Oct 19, 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.

@steipete
steipete marked this pull request as ready for review October 19, 2026 19:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T19:34:10.899975Z 911c623 Draft marked ready
ℹ️ 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

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: 911c62346d9b8b354a4fe13d50cf4939963beb8a
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/provider-model-route-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 merged commit 17c7c4e into main Oct 19, 2026
198 of 200 checks passed
@steipete
steipete deleted the deslop/r08-10-model-runtime-facts-20261015 branch October 19, 2026 19:44
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
Unify thinking and prototype classification with existing owners and share the fork API descriptor without weakening hosted-tool denial or authority checks. Synthetic accessor-backed blocks use one captured type value; serialized provider data is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant