Repository navigation
Conversation
Add the object row-store port (create-only putIfAbsent, version-pinned ranged get, exact-version delete, probe), host-allowlisted object bindings with confined key templates and hashed account segments, the fenced write-intent upload path bounded by the obligation lease, verified object reads with physical-digest checks before decompression, a filesystem provider and a provider conformance runner. Stage 1 PR 8 of the shared persistence spec (adcontextprotocol/adcp#7996). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| context | ||
| ) | ||
| ); | ||
| if (put.created) { |
There was a problem hiding this comment.
Medium: The object is created on the provider before it is recorded in the write intent — putIfAbsent returns created: true, then onCreated records it. If onCreated throws (intent taken over or swept, STATE_UNAVAILABLE), the object exists physically but is never in created_objects. The provider has no list, so the intent sweep can only delete keys it finds in created_objects — this one is unreclaimable. It self-heals only if a later writer for the same rowSetId+content re-prepares and adopts it; a permanently-abandoned row set leaks the chunk forever. Narrow window, but it contradicts the changeset's "records every object the upload created ... left for the intent sweep." Record the planned key in the intent before the create, or document this as a known bounded leak.
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — object-storage row bindings for reporting rows.
Checked:
- No schema drift: base migration already carries every column + write-intents table.
- Witness contract holds: every object read verifies physical digest + logical chunk/segment digests before release; no fabrication or re-shaping.
- Fencing is sound: lease-fenced create-only uploads with per-chunk adoption; adoption never records into created_objects and commit deletes the intent atomically, so a sweep can never delete an object a committed revision references.
- Keys confined to owned prefix with hashed account segment (never raw ID); filesystem traversal guard present.
- All provider I/O deadline-bounded and maxBytes-capped.
- Changeset present and correctly minor (additive).
Medium findings (1):
- src/lib/reporting/ledger/row-storage.ts:380 — Object created before intent-record: bounded orphan leak on onCreated failure.
One medium finding, no blocking issues, no escalation triggers (high_risk false, gated_paths false, no team gate, no prior decision). Falls through to row 9 → approve.
Medium findings
- src/lib/reporting/ledger/row-storage.ts:380 — Object created before intent-record: orphan leak on onCreated failure
108403d
into
bokelley/reporting-inline-row-migration
Add the object row-store port (create-only putIfAbsent, version-pinned ranged get, exact-version delete, probe), host-allowlisted object bindings with confined key templates and hashed account segments, the fenced write-intent upload path bounded by the obligation lease, verified object reads with physical-digest checks before decompression, a filesystem provider and a provider conformance runner. Stage 1 PR 8 of the shared persistence spec (adcontextprotocol/adcp#7996). Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat(reporting): resumable migration of inline revision rows Add PostgresReportingLedgerStore.migrateInlineRows, which moves legacy inline revision and adjustment rows into verified row storage in bounded, cursor-resumable batches under the account lock, quarantining documents whose rows no longer reproduce their binding. Stage 1 PR 7 of the shared persistence spec (adcontextprotocol/adcp#7996). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(reporting): object-storage bindings for revision rows (#3160) Add the object row-store port (create-only putIfAbsent, version-pinned ranged get, exact-version delete, probe), host-allowlisted object bindings with confined key templates and hashed account segments, the fenced write-intent upload path bounded by the obligation lease, verified object reads with physical-digest checks before decompression, a filesystem provider and a provider conformance runner. Stage 1 PR 8 of the shared persistence spec (adcontextprotocol/adcp#7996). Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(reporting): cover inline adjustment row migration Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This is PR 8 of 16 for Stage 1 of the shared persistence spec (adcontextprotocol/adcp#7996, §3.2–§3.5). It is stacked on #3159.
Revision and adjustment rows can now live in object storage.
Port (
row-storage-object.ts)ReportingRowObjectProviderV1has five operations:validateLocation, a closed schema with no paths or secrets;probe;putIfAbsent, a create-only write that returns{created, nativeVersion}and never replaces an object;get, pinned to an exact native version, with an optional byte range and a hardmaxBytes;delete, which removes only the exact version and is idempotent.{prefix}/{namespace_key}/and include{content_sha256}and{chunk_index}. The account segment issha256(JCS(["adcp.account_key.v1", namespace_key, account_id])), never a raw ID. Rendered keys are confined to the owned prefix, and./..segments are refused.createFilesystemReportingRowObjectProviderV1({ roots }): bindings name a root and never a path, and writes go through temp file →fsync→link().runReportingRowObjectProviderConformanceV1lets adopters qualify custom providers.Engine and store
STATE_UNAVAILABLE) if it is unconfigured or differs. Registering a binding whose identity or namespace changed fails withUNSAFE_BINDING.writeDeadlineMillisecondsplus 5 s (DEADLINE_EXCEEDED);WHERE state='open' AND owner_token=$owner. A swept or taken-over intent rolls the commit back.maxOutputLength, then verify segments, chunks and the binding. Uncompressed objects are range-read per page.PROVIDER_UNAVAILABLE/DEADLINE_EXCEEDED/ABORTED, never raw provider errors.row-storage-errors.ts. Configuration errors areSTATE_UNAVAILABLE, separate from data errors (INVALID_INPUT), somigrateInlineRowsquarantines only bad data. It also gains abindingIdoverride.Tests
reporting-row-storage-object-pg.test.jscovers:ROWS_INTEGRITY_FAILED;ROWS_UNAVAILABLE/SERVICE_UNAVAILABLE;DEADLINE_EXCEEDEDwith nothing committed;CONTENT_CONFLICT;🤖 Generated with Claude Code
Open workspace in Conductor