Repository navigation
fix(models): scope models auth list SecretRefs to selected provider - #10
Conversation
For `models auth list --provider <id>`, scope model-provider SecretRef resolution to the selected provider before config resolution. Preserve the current unfiltered behavior when --provider is omitted. This fixes the issue where an unrelated configured provider with an unresolved SecretRef would block `models auth list --provider openai --json`. Related: slyckmb/projects#28, #8
ObjectiveImplement the fix for slyckmb/projects#28: scope Scope
Acceptance Criteria
Based-On
Capability-MinimumStrong policy/SOP editing with precise agent-role and execution-selection semantics; TypeScript/Node.js CLI implementation with config resolution and secret scoping Effort-Mediummedium Selection-ExamplesClaude Sonnet 5 medium; GPT-5.6 Terra medium Verification Requirements
Expected Report
|
…etIds The load-config.ts now uses a variable for targetIds that is assigned from getModelsCommandSecretTargetIds()/getModelsCommandSecretTargetIdsForProvider(). The coverage test regex needs to match this pattern.
Status report — implementation present, NOT ready for reviewReviewed-Head: State: BLOCKED on independent review. Two acceptance criteria are unmet and I am not asking for acceptance yet. Provenance correction (supersedes my earlier summary)Both commits were authored by this manager session's direct
What actually changed (4 files, +31/-3)
Acceptance criteria: 2 of 4 code criteria UNMET
The only test change is a regex in a source-text coverage test. It asserts the file mentions a Correctness concern for the reviewer to weigh
Test resultsLocal (
Hosted CI (run Red hosted jobs and classification:
Defects in my own handoff (superseding it)The
I am superseding it here rather than leaving it actionable. What is blocking reviewExact-head reviewer binding fails closed: Cause, verified: the Exact unblock action (one item, owner = this manager): reconcile the worker workspace to the exact head — rebase/reset Next steps I will take on resume (not done, not requested yet)
USER ACTION REQUIRED: NONE — all four are manager-owned. I am not requesting acceptance, and I will not merge until (2) and (3) are genuinely done and independently reviewed at one exact head. |
|
Cross-link only; no scope/ownership change requested. Myclaw openclaw#251 reproduced the same root class on the deployed runtime for openclaw#251 will not duplicate or modify this PR's active helper work. Its planned follow-up is to consume the provider-scoped model-secret primitive after this PR's helper/API is corrected and exact-head reviewed, then add Tracking owner: slyckmb/myclaw#251. |
Use registered wildcard target IDs with concrete allowed paths so provider-scoped models auth listing resolves the selected provider without touching unrelated provider SecretRefs. Canonicalize provider aliases against the loaded config and cover selected/unselected resolution behavior. Agent: ChatGPT Agent-Model: GPT-5.6 Sol Agent-Surface: ChatGPT/Remote Desktop Commander
Scope selected-provider SecretRef resolution across configured model provider keys that canonicalize to the same auth provider, so plugin auth aliases cannot bypass or misdirect the provider filter. Add direct and load-config regression coverage. Agent: ChatGPT Agent-Model: GPT-5.6 Sol Agent-Surface: ChatGPT/Remote Desktop Commander
Exact-head review reconciliationReviewed-Head: The independent reviewer completed read-only review at the exact candidate head. I adjudicated every reported item against the owning contracts and adjacent callers:
Candidate proof
No code changed after the independent exact-head review. Final-head hosted CI is still running; merge remains gated on exact-head required CI and native landing checks. |
Remove the duplicate mock declaration flagged by Autoreview and keep one default canonicalization implementation for model config tests. Agent: ChatGPT Agent-Model: GPT-5.6 Sol Agent-Surface: ChatGPT/Remote Desktop Commander
Prove that a provider filter with no configured provider paths is a clean no-op and does not touch unrelated unresolved model SecretRefs. Agent: ChatGPT Agent-Model: GPT-5.6 Sol Agent-Surface: ChatGPT/Remote Desktop Commander
Exact-head ZERO review reconciliation — current candidateReviewed-Head: The reviewer raised two medium questions plus lower-priority comments. I inspected the missing owner code and adjudicated them without changing the candidate head:
Exact-head proof
No code changed after this exact-head independent review. Merge remains gated on completion of exact-head hosted CI and the repository-native |
Keep a non-empty provider filter scoped even if auth-provider canonicalization unexpectedly returns empty, preventing fallback to broad model SecretRef resolution. Tighten provider target typing and regression coverage. Agent: ChatGPT Agent-Model: GPT-5.6 Sol Agent-Surface: ChatGPT/Remote Desktop Commander
Exact-head review status — RETRY-HOLD on required Autoreview capacityHead: The independent ZERO reviewer completed read-only review on the exact head and reported no correctness defects. The remaining comments were adjudicated against the implementation and tests:
Local proof on this head
Hosted CIExact-head CI is running. Patch-owned type/lint/model-command lanes observed so far are green. Current gateRepository policy requires a fresh State: RETRY-HOLD until that required Autoreview can execute successfully and exact-head hosted CI completes. |
Exact-head ZERO review reconciliation —
|
Exact-head closeout — code-ready, native landing blocked by base CIReviewed-Head: PR #10 is frozen at the reviewed head above. No code changed after the final independent reviews. PR-owned proof
Independent review
Native landing resultRepo-native review artifacts validate as:
However: correctly fails closed because there is no successful exact-head CI workflow: The operation lock was verified idle and recovered using the exact emitted recovery token. Exact blocker classificationHosted The same production audit was reproduced on untouched base The red parent A release-gate redispatch cannot clear the dependency blocker: Durable blocker owner: slyckmb/projects#32 — OpenClaw: unblock base CI security audit. StateBLOCKED — no PR #10 code action remains. Do not modify or merge this head until the base security audit is repaired. After Projects openclaw#32 restores a successful base CI gate, rerun |
resume handoff: land #10 after the audit baseline is fixed (slyckmb/projects#28)Handoff-ID: projects28-pr10-resume-20261003-v1 HOLD until #15 (slyckmb/projects#31) is merged on main. Starting earlier fails the same security-fast audit again. When it is merged:
|
|
Coordination update: merged Myclaw openclaw#295 / issue openclaw#294 now temporarily unblocks the downstream Myclaw openclaw#187 OpenAI proof path. Live acceptance showed Terra can project as eligible with exact Therefore #10 is no longer a blocking dependency for openclaw#187 to continue its remaining live projection/dogfood acceptance. #10 remains OPEN as the permanent OpenClaw repair and as the removal dependency for the temporary Myclaw shim. Its own landing/CI blocker chain through Projects openclaw#31 is unchanged. Do not treat openclaw#295 as the upstream fix. |
|
Phase: prm-tenure |
|
Phase: prm-continuation |
|
Phase: independent-review |
|
Phase: independent-review |
|
Phase: prm-continuation |
|
Phase: prm-tenure |
|
Phase: prm-continuation |
Agent: ChatGPT PR manager Agent-Model: GPT-6 Agent-Surface: chatgpt-web via Remote Desktop Commander Agent-Client: chatgpt-web Agent-Session: 3d2efbdb-54ab-4436-9b1e-6733a4d25ceb
PR #10 resumed — reviewed finding repaired, current main integrated, NEW head awaits review/CIHead: Independent prior-head finding — confirmed and fixedClinePass DeepSeek V4 Pro via native Airo Hosted CI failure analysis on OLD headExact old-head run: https://github.com/slyckmb/openclaw-upstream/actions/runs/38025133363 — FAILURE:
Post-integration validation at NEW head
Not yet accepted or mergeable by policy: NEW |
|
Phase: independent-review |
|
Phase: prm-continuation |
2026-10-10 07:45 EDT — exact-head CI failure classification; reviewer pendingReviewed-Candidate-Head: Fresh hosted CI run https://github.com/slyckmb/openclaw-upstream/actions/runs/38048879712 remained IN_PROGRESS at 07:45 EDT, with one already-FAILED job:
Independent NEW exact-head reviewer Claude Sonnet 5/high launched through native pr-agent: durable RTB task Manager has made NO source/code branch or live configuration changes during this check. No merge. |
|
Phase: prm-continuation |
|
Phase: prm-continuation |
Fresh independent review PASS — exact current head 6bbb80fReviewed-Head: |
|
Phase: prm-continuation |
|
Merged via merge commit.
|
|
Phase: prm-tenure |
Post-merge WRAP reconciliation — terminal PASS, 2026-10-10Target: slyckmb/openclaw-upstream PR #10 Integrity and terminal evidenceGitHub PR #10 is CLOSED/MERGED; Canonical one-PR terminal cleanup was PREVIEWED then Bounded retroactive WRAP audit of other terminal PRs explicitly referenced in this chatOperator expressly requested every referenced merged/closed item WRAP. These additional merged PRs were independently checked against native GitHub terminal head and
Conversation semantic delta audit and remaining ownership
CONVERSATION CLOSEOUT: PASS |
…eway regressions (#10) Address the independent review of the forward-port: profile summaries resolve the stored provider with storedCredential: true so endpoint-conditioned model-route aliases (e.g. a configured arcee -> openrouter endpoint) do not re-home a stored direct credential; the requested --provider filter keeps the config endpoint canonicalization. Adds a regression that fails without the fix (mutation-checked) and carries #10's two model-provider gateway regressions (unselected provider SecretRef ignored; unconfigured selected provider is a no-op). 75 focused tests pass. Agent: claude-code/manager-m34 Agent-Model: claude-sonnet-5-5 (operator/client-selected) Agent-Surface: claude-code CLI Agent-Client: claude-code Agent-Session: 4f397dc9-c0e7-4e24-8358-cb6106c1745c Provenance: chatrap-provenance/v1 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
) Use ProviderAuthAliasLookupParams for the resolveProviderIdForAuth mock and override so config and storedCredential are both represented; fixes the TS2345 error reported by check-test-types-core-4 and the Sol re-review. Behavior unchanged, 10 tests pass. Agent: claude-code/manager-m34 Agent-Model: claude-sonnet-5-5 (operator/client-selected) Agent-Surface: claude-code CLI Agent-Client: claude-code Agent-Session: db57ce95-c5b6-40e7-a99a-8b1041e2f307 Provenance: chatrap-provenance/v1 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Outcome
For
models auth list --provider <id>, resolve only model-provider SecretRefs that belong to the selected auth provider before command config resolution. Preserve the current unfiltered behavior when--provideris omitted.This fixes the case where an unrelated configured provider with an unresolved SecretRef blocks
models auth list --provider openai --json.Changes
allowedPathsfor the selected provider.loadModelsConfig/loadModelsConfigWithSource.models auth listuse the same provider-alias context for config loading and profile filtering.Validation
origin/main: the overdue plugin-boundary compatibility ratchet and the localui/vite.config.tsmissing-pakodeclaration intsgo:core:test. Hosted exact-head CI remains authoritative for those lanes.Scope
This PR intentionally owns
models auth list --provider <id>. The analogous provider-filteredmodels listfollow-up is already durably owned byslyckmb/myclaw#251; it is not duplicated here.Related
agent execchains)Landing blocker
Repository-wide hosted CI is currently blocked by
security-fast: the exact PR head and untouched currentmain(01fdec31291493666e6866f04806bf943eea8fd8) both report the same 17 HIGH production-dependency advisories. This PR changes no dependency manifest or lockfile.Durable blocker owner:
slyckmb/projects#31— restore the OpenClaw dependency-audit baseline. Nativescripts/pr prepare-runremains gated until that baseline is repaired and fresh exact-head hosted CI succeeds.