Repository navigation
fix(observability): settle retired owners and batch writes - #3179
Merged
Merged
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A persistence timeout during project retirement could permanently poison the registered store even after its producer had stopped. Later opens, including linked checkouts sharing that store, failed with
application.runtime.owner_faileduntil daemon restart.Separate completed shutdown from successful persistence. Retire the owner only after its worker joins and its writes have settled; preserve the original error and incomplete coverage. A completed final write followed by successful maintenance provides that proof without waiting behind unrelated writers. Otherwise, use the existing writer authority within the original shutdown deadline. Unfinished shutdowns remain closed to replacement. When the producer completed its coverage-settlement attempt and all workers joined but the writer fence times out, retain the exact owner as retiring and use the existing task tracker for one bounded recheck on the next mount demand. Preserve this typed retryable state through real project composition so a degraded core cannot cache it permanently. The mandatory terminal receipt still precedes optional rollup maintenance. Aborts before final coverage remain failed closed because fencing cannot reconstruct their unrecorded queue. A durable final carrier records the proof needed to recover from a later maintenance timeout after the worker joins.
Batch ordinary observation replay lookups and inserts with the existing bounded SQL helpers, preserving IDs, deduplication, scope isolation, and transaction rollback.
Validation through Bazel: 72 application unit tests, 32 application integration tests, 14 daemon integration tests, one real same-project reopening test, and 12 database tests passed. Coverage includes durable terminal proof, refusal before final coverage, mount-triggered fence retry, exact-store isolation, terminal-rollup freshness, replay/duplicate IDs across batch boundaries, and conflict rollback. Independent and hosted review findings are resolved. Bazel Clippy passed for all seven affected application, daemon, database, and MCP targets. The official installed-release sweep follows publishing.
Fixes #3178