Skip to content

fix(observability): settle retired owners and batch writes - #3179

Merged
ScriptedAlchemy merged 6 commits into
masterfrom
fix/observability-retirement
Oct 8, 2026
Merged

ScriptedAlchemy merged 6 commits into
masterfrom
fix/observability-retirement

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

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_failed until 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

@changeset-bot

changeset-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b4d17d9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@ScriptedAlchemy
ScriptedAlchemy merged commit 97491c3 into master Oct 8, 2026
11 of 15 checks passed
@ScriptedAlchemy
ScriptedAlchemy deleted the fix/observability-retirement branch October 8, 2026 07:52
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.

Observability retirement deadline leaves project reopen permanently failed

1 participant