Repository navigation
feat: inspect and edit plugin credentials in settings - #149286
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 16, 2026, 6:56 PM ET / 22:56 UTC (Revision 11). ClawSweeper reviewWhat this changesAdds masked plugin credential controls and administrator-only secret-reference inspection and editing, with acknowledged saves and field-specific cancellation. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this remains useful work absent from current main, with no blocking defect found. The previous migration checklist is not applicable: the added schema describes RPC messages, while saved configuration retains its existing format. Priority: P2 Review scores
Verification
How this fits togetherPlugin Settings combines plugin-declared metadata with Gateway configuration to render credential controls. Inspection returns reference metadata without resolving secrets, while edits pass through the existing Settings writer. flowchart TD
A[Plugin credential metadata] --> B[Settings credential controls]
C[Administrator and config revision] --> D[Gateway inspection]
D --> E[Reference metadata only]
E --> B
B --> F[Shared Settings writer]
F --> G[Saved configuration]
G --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1213, Tests +1231, Docs +18, Other +5. Total +2467 across 63 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Retain one Settings writer and the canonical SecretRef contract, with metadata-only inspection and acknowledged, field-scoped recovery. Do we have a high-confidence way to reproduce the issue? Not applicable to the primary feature request. The rejected-save cancellation sequence has concrete regression coverage and reported before/after results; this review did not execute it. Is this the best way to solve the issue? Yes: the patch extends existing plugin metadata and Settings ownership, reuses SecretRef validation, and avoids a second credential store or write path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 57beb816a813. 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)
|
2460fdc to
1aff7a6
Compare
8db3bf4 to
abc3686
Compare
|
Addressed the canceled-reference finding and matching rank-up move in b1ad363. Cancel now withdraws the rejected field intent through the shared configuration draft owner, preserving unrelated edits. The existing writer queue, snapshot/conflict replay, submission observer and sanitizer own reconciliation; there is no second writer. Pending Save cannot be dismissed with Cancel or Escape. The actual rejected Save → Cancel → sibling save sequence fails before repair and passes afterward at 390px and 1174px. Coverage includes missing ancestor cleanup, concurrent edits, acknowledgments, read failure/retry and unknown writes: 150 shared config cases, 18 Chromium credential cases and four built routes pass. The small follow-up fbc944f uses the existing deferred helper for browser-test target compatibility. When the existing Gateway cannot confirm an uncertain write, the dialog retains the draft and explains that it could not discard it; cancellation is not falsely reported as successful. No stored schema, runtime default or new config option is introduced. The flagged plugin-credentials schema describes an additive request/response contract, not a database migration. Before/after proof and the concrete production-growth justification are in the body. The final owner extraction in abc3686 keeps queue and admission in the coordinator, moves unchanged replay/conflict logic and full-draft discard into focused modules, and reuses one autosave hold. All 242 config cases and four built credential routes pass after extraction; typed lint passes without file-size suppressions. |
abc3686 to
a43e1e8
Compare
|
Compatibility proof for the remaining data-model checklist: There are no tables, indexes, storage-format changes, schema-version bumps, migrations, new configuration keys, or new credential write RPCs. Saving retains the existing configuration writer and canonical SecretRef shape; cancellation now withdraws only rejected local intent through that same owner. The final owner extraction passes 242 configuration cases plus four built credential routes, including preserved sibling edits and unchanged persisted references after a rejected Save → Cancel. The real authenticated Gateway proof in the PR body covers existing literal/environment/reference shapes, redacted reads, stale revisions, and read-only access. No persisted-data migration is needed. |
e9cbc04 to
987a6b1
Compare
3b3e5e7 to
6973f05
Compare
Use the shared deterministic listener pool and omit filesystem watching from the HTTP/WebSocket transport fixture. Preserve all eight transport assertions and the canonical worker pool. Punchcard-Session: crisp-summit-lantern-qk
Keep the append-only literal descriptor table at its canonical path for historical release-train validation. Derive lookup, authorization, startup, and handler descriptors in one sibling and migrate internal callers and generators. Punchcard-Session: crisp-summit-lantern-qk
Bind Vite's exposed native HTTP server directly so the kernel allocates and retains the port. Preserve Vite initialization, watcher cleanup, and all transport assertions. Punchcard-Session: crisp-summit-lantern-qk
3100d9e to
e724660
Compare
|
The previous credential-head CI run had one The original 79-case file passes in the same order on the exact candidate locally (89.00s; affected case 1.36s). The already-green parent Linux job also passed all 79 cases (107.05s; affected case 1.52s), and all seven relevant test/request/config-write/runtime-application owner files are byte-identical. Parent Linux proof. No timeout or assertion was weakened, and no product repair is justified by this evidence. The stalled await is still unknown because the test suppresses Gateway logs. Named follow-up: Investigate the intermittent config.patch runtime-application timeout in the Gateway test, adding owner-stage diagnostics if it recurs. The required parent-merge rebase preserves identical credential-layer patch bytes and has started fresh current-head CI at e724660. The obsolete run was canceled by the existing per-PR workflow; no extra rerun or cancellation was requested. This note does not waive current-head CI or claim the timing cause is proven. |
|
Current-head CI diagnosis for The focused simulator run passed70 of71 tests. The root agent independently compared the test, voice implementation and CI workflow across parent1710, currente724, CIbaseb8dd and actual CI merge8d208; every compared source hash matches. This PR’s native delta is an optional generated plugin-inspection credential field. The parent iOS job was skipped, so it is not a passing baseline. The failed fixture selected the owned-run reply and reached tool-result tracing. It never starts its realtime session or assigns its synthetic channel to the session; the send helper returns before RTC readyState/sendData. The remaining status path has no await. The logs do not timestamp Listening entry/fulfillment, so they cannot distinguish a missing callback from late fulfillment or establish the cause of the deadline miss. The isolated canonical four-suite run passed71/71 tests, with the previously failed case completing in0.370seconds. The root independently parsed its xcresult and checked the original-order log. This ran at exacte724 with no source, timeout, assertion or test-order changes; the owned simulator was removed afterward. Both use Xcode26.6, but local simulator iOS26.5 differs from hosted26.4.1. The first local attempt stopped before tests at missing Rust; the canonical pinned toolchain was then installed only inside the task-owned clone. Hosted attempt2 stopped before compilation or tests because SwiftPM could not connect to github.com while cloning swift-cmark; it does not repeat or resolve the original voice-test result. Named diagnostic follow-up: capture consult Listening callback entry/fulfillment timing relative to the XCTest deadline if this recurs. The current evidence does not justify a production repair or a longer timeout. Attempt2’s distinct build failure (job104983165605): SwiftPM failed to clone Attempt 3 (job104986353127) repeated the same Listening timeout: 70/71 tests passed, affected case 7.541 seconds. Required CI gate failed. Root independently parsed the exact new xcresult artifact10470449151. The log narrows the delay: the same synchronous trace emits GatewayDiag “chat result ready” at +622ms and its TalkRealtimeWebRTC counterpart at +5521ms, a 4.899-second interval before the result-send/status path. No await separates those sinks. Root inspected the installed Swift OSLog interface and independently ran a controlled subprocess probe: with developer logging enabled and a prefilled stderr pipe held for two seconds, actual Logger.info blocked for 2.014 seconds; the same call with a draining pipe took 0.000244 seconds. A sampled probe stack locates the wait in libtrace’s stderr mirror/writev. This proves a synchronous dependency hazard, not the exact hosted syscall or environment. Investigation is now testing the original iOS flow; no further hosted rerun or timeout/source change has been made. Contemporaneous controls remain useful but do not waive this failure: UI job104978521241 and progress job104978455133 each passed all71 canonical voice tests on the original Xcode26.6/iOS26.4.1 combination (affectedcase0.602s/0.855s), with an identical apps/ios source tree. Deterministic reproduction and isolated repair: the unchanged original71-test suite passes with normal output, but an eight-second downstream output stall reproduces the same Listening assertion failure (70/71; affected case8.696s). Applying only the two production-file changes in #150338 makes the same stalled run pass71/71, with the affected case0.355s; the repaired normal run also passes71/71. No test timeout/assertion/order or XCTest environment changes. The actual-owner OSLog probe also returns before drain and persists afterward. This confirms the reproduced owner-boundary defect; it does not claim a sampled blocked thread from the original hosted runner. The separate repair is awaiting its own current-head CI/native landing, after which this layer will be refreshed so its required CI includes the fix. No fourth retry of the unchanged failing head is planned. Fresh CI 35159492410 completed successfully:164 jobs passed,9 skipped, required This PR merged as |
|
Merged via squash.
|
* feat: inspect and edit plugin credentials in settings Punchcard-Session: crisp-summit-lantern-qk * fix: discard rejected credential edits through the config owner Punchcard-Session: crisp-summit-lantern-qk * test: use the shared deferred helper for credential saves Punchcard-Session: crisp-summit-lantern-qk * refactor: separate configuration draft discard and replay Punchcard-Session: crisp-summit-lantern-qk * test: scope dev gateway fixture ports and watchers Use the shared deterministic listener pool and omit filesystem watching from the HTTP/WebSocket transport fixture. Preserve all eight transport assertions and the canonical worker pool. Punchcard-Session: crisp-summit-lantern-qk * refactor(gateway): separate core method lookup policy Keep the append-only literal descriptor table at its canonical path for historical release-train validation. Derive lookup, authorization, startup, and handler descriptors in one sibling and migrate internal callers and generators. Punchcard-Session: crisp-summit-lantern-qk * test(ui): retain the dev Gateway fixture listener port Bind Vite's exposed native HTTP server directly so the kernel allocates and retains the port. Preserve Vite initialization, watcher cleanup, and all transport assertions. Punchcard-Session: crisp-summit-lantern-qk
…9287/openclaw#149286/openclaw#148070/openclaw#146672) Adds missing GatewayMethod entries for protocol parity with upstream openclaw: - PluginsSkillsRead (plugins.skills.read) [openclaw#149287] - PluginsCredentialsInspect (plugins.credentials.inspect) [openclaw#149286] - ControlUiSessionPullRequestsChecks (controlUi.sessionPullRequests.checks) [openclaw#148070] - CanvasDocumentPreview (canvas.document.preview) [openclaw#146672] SessionsActivitySummaryEnsure / ComputerStatus / ComputerInvoke were already present. version 2026.9.17.9
What Problem This Solves
API-key fields do not explain their credential source, and SecretRef values cannot be inspected or edited. A rejected reference Save also leaves its draft behind, allowing a later sibling save to persist a value the user canceled.
User Impact
Credentials use ordinary settings rows. Literal keys stay masked; replacements do not expose stored values, and the signup link stays with the input. References show their source and open an editor for source, provider and identifier. Save remains pending until acknowledged; Cancel/Escape cannot dismiss an outstanding write. After rejection, Cancel removes only that field’s unsaved intent and preserves other edits.
Why This Change Was Made
Plugin-owned metadata identifies credentials. Administrator-only inspection returns source/reference metadata at the current configuration revision without resolving secrets or activating the plugin. Reads and actions are fenced to the connection and field. Environment credentials show management guidance; SecretRefs remain atomic while closed nested settings flatten into readable rows.
The shared config owner serializes cancellation behind existing writes, holds trailing autosaves, refreshes authoritative state and replays surviving edits. Overlapping edits or connection changes retire cancellation. Existing empty-container sanitization avoids a redundant save. Pure replay/conflict and whole-draft discard helpers are separated from queue ownership; no second writer or store is introduced.
If a transport failure leaves the outcome unknown, cancellation requires authoritative confirmation. Credential reads redact reference identifiers and writes may stamp metadata, so a lost credential acknowledgement normally retains the draft and visible recovery error until operator reload. Numeric fixture recovery is not claimed as live credential timeout recovery.
This follows grouped Settings. Production +1,376/−166 (net +1,210), including existing-function moves, adds private inspection and field-scoped draft lifecycle. No defaults, permissions, validation or storage schema change; the RPC method appends to preserve existing advertised positions.
Evidence
Real Control UI with the same isolated synthetic Gateway; phone/desktop captures have no page errors or overflow. Browser/mock-Gateway proof is separate from the authenticated server roundtrip.
Cancel→edit sibling→reload: before, the canceled fixture reference
/search/cancelledis saved; after,/search/apiKeyis preserved. The sibling saves in both cases, and the harness checks complete submitted configuration.Tracks CLAW-880, Cycle 3.
Punchcard-Session: crisp-summit-lantern-qk
Complete production browser→real authenticated Gateway proof: reference before → saved identifier reopened after reload. An ordinary sibling save preserves the exact reference. Three real config.set acknowledgements across the combined flow; no resolved credential bytes, user message, install or enablement change; fixture cleanup completes. Tested build cf4b66819ade; the only later production change is the separately tested numeric keyboard predicate.
Final landing validation
The method registry's append-only literal table remains in
core-descriptors.ts; derived lookup, authorization, startup and dispatch policy move together tocore-method-policy.ts. Callers and code generators use that single owner. All nine function bodies and the table are unchanged; all 462 method-policy records and the generated protocol JSON match byte-for-byte. The existing protocol-since parser and enforcement remain unchanged.The previous line-cap failure now passes. All 533 focused tests, the complete changed-file static plan, protocol:check and fresh P0 review pass. A full default build with this repair and the preceding manifest extraction passes, including 52 built control-plane import checks. No permissions, method order, protocol version, schema or operator settings change. Production growth is two lines of module import wiring after discounting moved code.
The generated storage-migration checklist does not apply: this layer inspects credential metadata and edits existing configuration through its existing owner; it adds no SQLite schema or storage migration. Hosted CI for the refreshed head remains pending.