Skip to content

feat(item-delivery): reload persisted ledgers after restart - #110

Closed
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/bc-4ca6321a-fb35-4a1c-ad31-94ece7f9f9d8-b17c
Closed

feat(item-delivery): reload persisted ledgers after restart#110
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/bc-4ca6321a-fb35-4a1c-ad31-94ece7f9f9d8-b17c

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Superseded

Close this predecessor without merge. The restart/reload product slice moved through #186/#216 and is now carried by #224; the unrelated inbox recovery fixture has its own bounded vehicle on #177.

Fresh evidence immediately before closure:

Do not merge this predecessor in parallel with the successor line.

cursoragent and others added 2 commits August 16, 2026 15:20
Reconstruct the stored tenant, release, locale, digest, allowed item
set, and monotonic delivery prefix so a later deliver continues the
same form. Exact replay stays Duplicate. Tenant rebinding and gapped
sequences fail closed. Recovery COPY/restore covers the delivery tables.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@cursor
cursor Bot requested a review from seonghobae August 16, 2026 15:21

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Item-delivery reload is the right buyer slice: persist already exists on main, and a restart must reconstruct the stored prefix so a later deliver cannot invent a new form. Domain from_durable_evidence / from_durable_events, load_item_delivery_ledger under READ COMMITTED, tenant mismatch as ConflictingReplay, and recovery COPY of item_delivery_ledger / item_delivery_event match the persist contract.

Do not merge this draft. Exact-head Runtime CI, 100% owned line/branch coverage, and an independent last-push review are still required. This review is not that approval.

Must-fix before merge: is_canonical_sha256 is new production code and the contract tests only feed sha256:not-a-digest (prefix present, length != 64). The strip_prefix miss path and the 64-byte non-hex .all() path are unexercised. This repository fails closed on incomplete branch coverage, so Production branch coverage will reject 75bacee until those cases exist.

Keep out of this PR: session item-set authority (#99 / #94), HTTP delivery, and instrument_version_ref on the ledger header.

Operator next action: add the two digest-reconstruction cases, re-run cargo test --test item_delivery_contract and the coverage jobs on the unchanged head, then request an independent last-push review. After merge, call load_item_delivery_ledger before deliver so a restarted worker continues the stored form.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

Comment thread src/item_delivery.rs

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (COMMENT)

This slice is real: persist exists on main, and a restart must reconstruct already-shown items. Prefer #186 60ca077 as the landing vehicle instead of merging this head in parallel.

#186 keeps the same buyer outcome and adds:

  • FOR SHARE on the ledger header, with honest rustdoc that persist still does not take FOR UPDATE
  • exact-spelling session/tenant aliases (whitespace padding fails closed)
  • tenant-scoped event load, not session-only
  • dedicated restart-reload fixtures plus the recovery COPY/restore identity proof that started here
  • ADR-0015 / ERD / UML / as-built schema updates

Do not merge #110 and #186 together. Independent last-push review still gates #186. Do not self-approve.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

cursor Bot pushed a commit that referenced this pull request Aug 16, 2026
Prefer the exact-spelling successor over #186 and #110 until the reviewed
head is integrated.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded for item-delivery restart reload by #216 4634523.

#216 keeps restart reconstruction and adds exact stored spelling so a padded alias cannot become another session or item. Prefer #216 over this head. Do not merge in parallel. Do not self-approve.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

cursor Bot pushed a commit that referenced this pull request Aug 16, 2026
Prefer #224 over #216, #186, and #110 so persist exact-spelling is the
reload landing instead of reconstruction-only heads.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Processing consumption rows now require claim_deadline_at after #81.
Seed the wall-clock deadline and prove binary restore preserves it.
@seonghobae

Copy link
Copy Markdown
Contributor

Exact-head cbba9a2b recovery fixture is locally green: clean_restore_preserves_provenance_deduplication_and_fencing_state now inserts claim_deadline_at and satisfies integration_consumption_claim_deadline_shape. Item-delivery persist/reload contracts also passed locally (17 persist + 13 contract + error contract).

The previous Runtime CI fail was on 75bacee7 (null claim_deadline_at). The fixture-head Runtime CI on cbba9a2b was cancelled in the queue, not re-run here. Do not merge until exact-head rust/coverage and independent last-push approval succeed. Never self-approve.

@seonghobae seonghobae closed this Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants