Repository navigation
simplify(diagnostics): publish compiler status through the project owner - #4545
Open
ScriptedAlchemy wants to merge 11 commits into
Open
ScriptedAlchemy wants to merge 11 commits into
ScriptedAlchemy wants to merge 11 commits into
Conversation
The TypeScript producer recorded each run into a process-global, path-keyed LAST_RUNS map that nothing ever removed, and availability reads joined it by pathname. A successor owner at the same path could therefore report its predecessor's run as its own. Each project owner now creates one TypeScriptProducerStatusHandleV1 at open. The producer publishes into it and the owner's primitive runtime reads from it; the global map, last_record, last_producer_run and the path-only status API are deleted. Teardown retires the status with the owner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This was referenced Oct 25, 2026
Rebuild configuration-bound primitive ports when a retained route reopens against a changed configuration, while preserving its producer status and operation capacity. Compare the installed dispatch with the captured one before replacement so late preparations cannot overwrite a successor. Exercise unchanged and changed configuration reopen through real daemon route eviction, a leased sibling, the configuration surface and pinned tsc.
ScriptedAlchemy
enabled auto-merge (squash)
October 27, 2026 02:50
Route eviction can retain a project's Work runtime while a sibling commits new configuration. Reopening the route previously refused that same store authority before the compiler producer could register. Refresh the policy, topology, routing and evidence admission together under the captured runtime and canonical current-configuration fence. Keep exact store, actor, scope, grant and Work authority checks. Refresh the retained fan-out recovery view without replacing recovery owners or their signal. Extend the real compiler route journey to verify stable grant identity, current Work authority, stale and sibling rejection, and retained authority after refusals. Preserve all existing assertions and budgets. Validation: pinned rustfmt and diff checks passed; independently reviewed. Native tests were not run locally because of disk and memory constraints. Hosted CI must verify the repaired route journey.
Hold the canonical configuration writer lane while validating and publishing a changed retained Work runtime. Refuse stale candidates without replacing the incumbent or waiting for a new owner. Exercise the real route journey with a newer durable configuration committed while refresh is paused, then admit the current revision.
This branch has not been deployed
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.
Fixes #4433. Parent link: none (stack S5 link 1, base master).
Problem
diagnostics_producer.rscopied each producer run into a process-globalLAST_RUNS: Mutex<BTreeMap<PathBuf, ..>>with no removal path; availability reads joined it by pathname, so a successor owner at the same path would report its predecessor's run.Fix
TypeScriptProducerStatusV1+TypeScriptProducerStatusHandleV1(immutableArcsnapshot behind a lock). One handle is created per project owner at open, passed to the producer (viaTypeScriptProducerStateV1::new) and to the owner'sOwnedPrimitiveRuntime(viaProductionPrimitiveOpenRequestV1).typescript_diagnostics_availabilityand the two diagnostics-absence problem builders read from the owner's handle.LAST_RUNS,last_runs,last_record,last_producer_run,record_producer_run. Teardown retires the status with the owner; a superseded producer can only publish into its own handle.Publishedalready carries the generation; nothing reads another).Verification
bazel test //crates/tracedecay-application:unit_test --test_arg=diagnostics_producer: 5 passed, incl. newa_successor_owner_does_not_inherit_the_predecessors_statusanda_status_handle_publishes_to_its_owner_only; existingprimitives::runtimediagnostics tests pass.bazel build --config=clippy //crates/tracedecay-application/... //crates/tracedecay:allsucceeds.🤖 Generated with Claude Code
Retained Work configuration follow-up
The retained Work configuration repair from #4546 applies to the same five source/test files here, which were byte-identical before the repair. This follow-up carries those exact reviewed file versions into this branch; it does not claim a separate observed CI failure on #4545.
When a route is reopened after a sibling commits new configuration, Work registration now refreshes policy, topology, routing, and evidence admission under a captured-incumbent and canonical current-configuration fence. Exact store, actor, grant, scope, and Work authority remain required. The retained fan-out recovery view receives the admission update while preserving its owners and signal.
The real route-eviction/compiler journey keeps its existing assertions and budgets and additionally checks stable grant identity, current registration, stale and sibling refusal, and retained current authority after refusal. Pinned formatting, whitespace checks, normal pre-commit/commit-msg hooks, and independent source review passed. The transplanted blobs exactly match the reviewed Work repair. Complete native execution remains a hosted CI requirement because local disk and memory limits prevent the full build.
Configuration publication race follow-up
A changed retained Work runtime now verifies and publishes its configuration under the configuration store's existing canonical writer lane. The store reads durable current state through a registered immediate transaction, revalidates its retained authority, and invokes a synchronous registry transition before releasing the lane. The captured-incumbent comparison remains in place to prevent a delayed registrar from replacing a newer installed runtime.
The registry transition only reconciles an existing component; missing, reserved, closed, or fenced slots are refused. It performs no new owner build or asynchronous wait. Complete routing and recovery admission are refreshed together. The read-only transaction is dropped synchronously after the callback, using the existing rollback-before-writer-release contract, with no post-publication await.
Initial and unchanged retained pins preserve their existing lifetime. Work settings retain their daemon-restart semantics: a durable commit after successful publication is allowed, while a superseded candidate cannot claim to be current at publication.
The existing real route-eviction/compiler-status journey now pauses candidate B, commits C through the actual configuration surface, resumes B and requires its typed refusal with installed A unchanged, then installs and verifies C. Existing assertions and budgets remain intact. Pinned formatting, whitespace checks, normal commit hooks, and independent source/authority/lock-order review passed. The complete native journey was not executed locally and must pass hosted CI.