fix(vault): describe the accepted clientInfo shape in vault set help - #302
Conversation
Since openclaw#288 the validator accepts RFC 7591 registration arrays and timestamps, but the help text still lists clientInfo as client_id alone, which reads as the whole contract and is the expectation issue openclaw#286 arrived with. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JeEyXV4E6bT9jTSmmWpWmu
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 7:09 PM ET / 23:09 UTC. ClawSweeper reviewWhat this changesExpands Merge readinessThis PR remains necessary: current main accepts the expanded OAuth client metadata but its Priority: P3 Review scores
Verification
How this fits togetherThe vault command imports OAuth tokens and client registration metadata from stdin or a JSON file into MCPorter’s local credential store. Its help output guides headless operators before input validation and persistence. flowchart LR
A[Headless operator] --> B[vault set command]
B --> C[CLI help output]
B --> D[Payload validation]
D --> E[OAuth credential vault]
C --> F[Correct registration payload]
F --> D
Before merge
Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Merge the narrow help and regression-test update so headless users can discover the OAuth registration payload shape already supported by MCPorter. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect reproduction: the PR includes a direct before-and-after real CLI transcript for the changed help output. Is this the best way to solve the issue? Yes. Updating the command’s own help text and pinning it with a focused CLI test is the narrowest maintainable way to expose the already-supported payload contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e404ed575a47. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
Summary
mcporter vault set --helpstill presentsclientInfoasclient_idalone. Since #288 the validator accepts the RFC 7591 dynamic client registration shape —redirect_uris,grant_types,response_typesandcontactsarrays, theclient_id_issued_at/client_secret_expires_attimestamps, and provider metadata outside the spec — so the only place a headless operator looks before writing a payload now under-describes what the command takes.That gap is not hypothetical. Issue #286 was filed with exactly the expectation this line creates, and the reporter's payload was a full registration response.
Current output
src/cli/vault-command.ts:224docs/config.md:259documents the payload as{ "tokens": { ... }, "clientInfo": { ... } }without naming fields, so nothing else in the project contradicts the help text either way.Fix
Four lines appended under
Payload:, naming the field groups the validator now accepts. The existing one-line example is unchanged, so the shortest usable payload still reads first.The wording deliberately names field groups rather than restating the whole rule table:
OAUTH_CLIENT_STRING_FIELDSalone is 15 entries, and a help text that enumerates a validator is a second copy free to drift from it. "Provider metadata outside RFC 7591" is the one behavior a reader cannot infer from the spec —validateOAuthClientInfoiterates its own field lists rather than the payload, soregistration_client_uriandregistration_access_tokenreach the vault untouched.No validator, payload, or persistence behavior changes.
Behavior proof
Real CLI through
tsx src/cli.ts.Tests
tests/cli-vault-help.test.tsis new, in the shape of the existingtests/cli-auth-help.test.ts: it drivesrunCli(['vault', '--help'])and asserts the named field groups reach the output.vaulthad no help coverage before, so this also pins theUsage:line and theexitCode0 the help shortcut sets.Reverting only
src/cli/vault-command.tsto main and keeping the test fails it on thedynamic client registration responseassertion — 1 failed of 1.Gates
Windows 11, Node 22.20.0, pnpm 10.34.5.
pnpm exec vitest run tests/cli-vault-help.test.ts tests/vault-command.test.ts— 7 passed.oxfmt --checkandoxlint --type-aware --deny-warningson both touched files — clean.tsc --noEmit— clean.pnpm checkreports formatting intests/cli-list-stdio-logs.test.tsandtests/list-inline-stdio.test.ts, which this branch does not touch and which report identically on unmodifiedmainat e404ed5 on this machine. This box is below the engine floor the repo declares (node >=24); CI settles it.CHANGELOG.mdis untouched.