inspector/core/react
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall fdeffa1f00 fix(auth): address Copilot review round 6 on the secret-store PR
Four findings, all suppressed, all real. Three are the same mistake in
different places: a state that was never established being reported as a
confident answer.

- **`readOnDiskEncryption` conflated "no file" with "unreadable file".**
  Both answered `null`, and the descriptor falls back to the configured
  write policy on `null` — so a passphrase-configured install reported
  "File (encrypted)" about a file whose envelope had never parsed, and
  which `set` was in fact about to refuse rather than overwrite. It now
  returns a four-state result, and only `absent` falls back to the policy
  (honestly: the first write really will create it that way). `unreadable`
  produces `encryptionUnknown` on the descriptor, `plaintext` is omitted
  entirely so nothing can read a default out of it, and the label, caveat,
  tone and footer all carry "unreadable" rather than guessing a mode.

- **The loose-mode warning overstated exposure for an encrypted file.**
  "Anyone who can read it can read the secrets in it" is false when the
  file is ciphertext — a reader gets the bytes and still needs the
  passphrase. Both the caveat and the footer tooltip now branch on
  encryption: the passphrase becomes the only protection, which is the
  real consequence. Overstating it is not harmless, because a warning that
  cries wolf is discounted on the occasion it is literally true.

- **The keychain hand-off could invert its own keychain-wins rule.**
  `SecretStore.get` answers `null` both for a missing entry and for a
  keychain it could not read, and the migration *writes* on `null` — so a
  transient read failure would overwrite a newer keychain value with the
  older file copy. Added an optional `getStrict` (throws instead of
  swallowing) implemented by `KeyringSecretStore`, with
  `secretStoreGetStrict` falling back to `get` for stores whose reads
  cannot fail. A throw now aborts the hand-off with the file left in
  place, so the next run retries.

Writing the tests turned up one more, in code the review had passed:
`parseOwner` recorded a garbled pid as `-1`, and `process.kill(-1, 0)` is
a *wildcard* asking about every process this user can signal — it answers
"alive" almost always, which would have made a lock with a corrupt stamp
permanently unstealable. Only a positive pid is usable now; anything else
is treated as no pid at all and the mtime decides.

Tests: the four envelope states kept distinct; the descriptor refusing to
guess, with the genuine no-file case as the control; strict-read abort
without a write and with the file preserved, plus a store whose `get` and
`getStrict` disagree so the test proves which one the migration consults;
encryption-aware wording asserted in both directions in the caveat and the
band; three unusable owner stamps and a wildcard pid; and the descriptor
shapes that must now be rejected — neither half of the encryption question
answered, or both. Full `npm run ci` green — 5,750 tests under the
coverage gate.

Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-22 14:40:29 -04:00
..
useClientSettingsDraft.ts chore: close quality-gate coverage gaps (#1689) (#1766) 2026-07-24 17:20:12 -04:00
useEmaIdpLoginState.ts fix(auth): guard OAuth-storage async paths against unhandled rejections 2026-07-08 10:59:40 -04:00
useFetchRequestLog.ts feat(core): port v1.5 hook layer (#1243) (#1300) 2026-05-13 17:43:07 -04:00
useInitialConfig.ts fix(auth): address Copilot review round 6 on the secret-store PR 2026-08-22 14:40:29 -04:00
useInspectorClient.ts fix: salvage a list result's valid entries when one is malformed (#1909) 2026-08-15 16:52:11 -04:00
useListError.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
useManagedPrompts.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
useManagedRequestorTasks.ts SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
useManagedResources.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
useManagedResourceTemplates.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
useManagedTools.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
useMessageLog.ts feat(core): port v1.5 hook layer (#1243) (#1300) 2026-05-13 17:43:07 -04:00
usePagedPrompts.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
usePagedRequestorTasks.ts Address @claude review: format core/, typed output-validation error, document progress heuristic 2026-07-15 11:08:54 -04:00
usePagedResources.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
usePagedResourceTemplates.ts SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
usePagedTools.ts fix: surface list-fetch failures in paginated mode (#1998) 2026-08-17 20:40:23 -04:00
usePendingClientRequests.ts feat(web): render pending sampling/elicitation requests (#1407) (#1411) 2026-06-02 17:52:20 -04:00
useResourceSubscriptions.ts Resources: subscriptions/listen model on modern servers (era fork) (#1630) (#1730) 2026-07-20 19:33:40 -04:00
useServers.ts fix(web): accept CRLF-delimited SSE frames on the servers events stream 2026-08-16 20:07:16 -04:00
useSettingsDraft.ts fix(servers): make settings form re-render on every keystroke (#1361) (#1362) 2026-05-26 13:42:14 -04:00
useStderrLog.ts feat(core): port v1.5 hook layer (#1243) (#1300) 2026-05-13 17:43:07 -04:00