Skip to content

fix(epub): avoid partial report on occupied provenance receipt - #304

Merged
andy-zen-dev merged 4 commits into
masterfrom
scrip-epub-dual-output-preflight
Oct 24, 2026
Merged

andy-zen-dev merged 4 commits into
masterfrom
scrip-epub-dual-output-preflight

Conversation

@andy-zen-dev

Copy link
Copy Markdown
Collaborator

User-visible regression fix — private EPUB dual-output safety

Follow-up to merged #296 / closed #289. When scriptorium epub ... --output report.json --provenance-output receipt.json was run with an already occupied receipt, the Reader created the new report first and then returned a failure, leaving an unexpected partial result.

  • Preflight both destinations before the first create-only write. Reject an occupied sidecar (including a dangling symlink) and report/receipt aliases resolved through relative path components or existing parent symlinks.
  • Keep existing exclusive-create writes and path-free errors; no clobbering, temporary copies, source text publication or extraction/analysis profile changes.
  • Add negative regression coverage for existing receipt, aliased filenames and dangling symlink; retain the existing positive two-output Reader integration test.
  • Document that preflight is not cross-file transactional under races or late I/O failure, and update the single queue with feat(site): show real literary metrics on Pages and link Reader from README #303's confirmed merge and this pending regression unit.

Verification

  • Original base: d934473e417627a2e6b1e6fb36e033112f9764cc (current master at authoring).
  • Source/readback hashes verified for 4 changed files; ahead by 4, behind by 0.
  • Full exact-head hosted CI and installed-wheel regression NOT_RUN yet; must pass before later-run acceptance and merge.
  • No changes to output schema, 29 metrics, scientific/parity gates, corpus, licenses, GitHub Pages admin/deployment settings, or other repositories. M2 remains 0/5.

PR_CREATED only; no same-run approval/merge.

@andy-zen-dev
andy-zen-dev merged commit 366de1b into master Oct 24, 2026
27 checks passed
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.

Adopt the deferred private EPUB ingestion prototype into the canonical Reader

1 participant