You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5a45b9b
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cloud-connection): LocalManifestSource.read() says WHICH of the two things its null meant (#5426) (#5439)
`read()` answered `null` to two different questions at once — "this manifest was
never installed" and "it was installed, but its ledger file cannot be read" —
and its own comment (`null when absent or unreadable`) says the merge was
deliberate. The consequence was not: two admin endpoints call `has()` first, so
absence is already ruled out by the time they read, and both could only answer
`500 MARKETPLACE_STORAGE_FAILED / "Failed to read manifest cache."` — a sentence
whose only content is that the thing it just did failed, one line after `has()`
said the file is there. `Unexpected end of JSON input` / `EACCES` / `EISDIR` had
already been dropped in an un-bound `catch`, and nothing reached the log either.
Option A of the decision point, aligned with `list()` (#5413): `read()` returns
`{ entry, failure }`, `failure` being the same `SkippedManifestEntry` shape with
the thrown object carried unwrapped, and present ONLY when a file exists that
would not parse. `failure === undefined` with `entry === null` now means "not
installed" — the fact the merged null erased.
Wiring, per triage:
- the ADR-0120 D5e posture gate reads `.entry` and is behaviourally UNCHANGED:
a corrupt entry still counts as "no attestation on record", so the one-time
ceremony is asked again rather than skipped. Conflating the two nulls is the
right call at that call site; it is now made there, in the open, instead of by
the ledger for everyone.
- reseed and purge keep `code: 'MARKETPLACE_STORAGE_FAILED'` — the same failure,
newly explained, so a client branching on the code is unaffected — and their
message now names the ledger file and quotes the cause (#5390 house style),
with a matching `warn` line on the server.
`read()` still does not validate the parsed value's shape; `list()` still throws
when the directory itself cannot be enumerated. Both deliberately unchanged.
Claude-Session: https://claude.ai/code/session_016FNvXhtSdnEGEfLEsMmvxh
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments