-
Notifications
You must be signed in to change notification settings - Fork 1
fix(maintenance): harden durable schema currency gate (#3856) #3856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,6 +182,9 @@ def resolve_or_start_daemon_bulk_rebuild_transaction( | |
| generation directory, so both must fail closed against a foreign/rotated | ||
| archive location before touching disk, not just the eventual write pass. | ||
| """ | ||
| from polylogue.maintenance.rebuild_index import require_rebuild_schema_currency | ||
|
|
||
| require_rebuild_schema_currency(root) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This unconditional gate breaks Useful? React with 👍 / 👎.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If this call waits for an existing archive owner and that owner advances a durable schema before releasing the lock, this pre-lock check observes the old version, but the function acquires ownership and proceeds to transaction resolution without checking currency again. The post-lock provenance validation does not compare the live user/audit versions, so this can create or resume daemon generation bookkeeping under a package that no longer owns the durable schemas; repeat the currency check immediately after Useful? React with 👍 / 👎.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in follow-up PR #3858. Commit 61ba5bf rechecks durable currency immediately after assert_owns_archive_location; commit b28a8f8 adds the later check before page selection and source-row consumption. The focused ownership tests passed with 2 passed and 2 deselected, and the page-selection race passed with 1 passed and 8 deselected. |
||
| _validate_rebuild_provenance_receipt(root, schema_inference_receipt_path) | ||
| # This must precede transaction resolution, because retiring a terminal | ||
| # transaction and creating its replacement also creates generation state. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a schema-current archive contains no raw rows, the local non-plan path now reaches
rebuild_index_from_source_sync, which returns anempty-sourcereceipt with an emptyreplaymapping. Its serialized payload therefore lacksclassified_full_count,replayed_logical_source_count, andquarantined_raw_count, so the default plain-output formatting below raisesKeyErrorinstead of reporting the empty archive. Preserve an empty-source branch after the currency guard or render this receipt status without assuming replay counters.Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in follow-up PR #3858, commit 61ba5bf. The local CLI handles the real empty-source receipt before replay-counter formatting. Its exact plain-output regression passes.