Repository navigation
fix(streams): refuse completed terminal for unrecorded tests - #4850
ScriptedAlchemy wants to merge 16 commits into
Conversation
|
|
Actionable exact-head CI diagnosis — no source change in this review. CI 42700273167 at |
Refs #4450. Add a real service-level regression opening the same root and request in two independent daemon compositions. The first owner's cancellation and expired-frontier cleanup must not cancel or remove the second owner's active run. Keep the existing distinct-root test and all lifecycle assertions.
New #4450 lifecycle regression — 2026-11-09,
|
|
New exact-head Linux CI blocker (2026-11-09 23:50 UTC), no speculative source change. Run 42718580170, Linux fleet job 129507551564, head Narrow source diagnosis: The fixture emits 65 genuine Cursor stop events to populate >64 delivery receipts; those events also admit separate producer-work obligations. It then drains the receipt files promptly and assumes the entire hook replay owner must be Repository gates, strict Clippy, Dashboard, Feature gates passed at this exact head; macOS was skipped, Windows was still running when inspected. Linux summary is red. The new service-level daemon-isolation test is committed but this fleet failure prevents green integration acceptance. Keep PR #4850 OPEN/UNMERGED, #4450 OPEN/Refs only; full HTTP/MCP/LSP/advisory/shutdown lifecycle acceptance remains outstanding. |
Refs #4450. The 65-stop backlog fixture introduced independent producer-work obligations and could report a truthful backpressured status after all receipts settled. Exercise the real receipt writer and daemon settlement with 65 validated, distinct hook delivery receipts but no unrelated producer events. Preserve the 10-second bound, exact 65-receipt assertion, full drained status and independent capture/replay tests. No production code or timing/backoff limits changed.
|
Published a concrete non-model test isolation repair for the verified current-head Linux failure, without masking either receipt or producer-work state: commit Exact preceding-head CI 42718580170 ran 183 Linux Bazel targets, 182 passed, with The test now constructs 65 distinct validated Hook-delivery source receipts with the existing production Verification boundary: This is a committed, independently diff-reviewed Rust regression adjustment, not yet an executed new-head passing Rust/Bazel test. New exact-head CI 42734412375 was QUEUED on inspection; macOS native is skipped by this workflow. Keep #4450 OPEN ( |
Refs #4450 The pinned rustfmt check reports import ordering and an over-long assert_eq! call in the spool-drain regression. Apply exactly those hunks without changing any assertion. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Exact-head Clippy repair — November 9, 2026 (
cbf262c)Previous-head run #42691002146 on
24fabccpassed Repository gates and Dashboard but failed actual strict Clippy incrates/tracedecay/src/mcp/server.rs:810:-D clippy::redundant-closure-for-method-callsrejected the new daemon owner access.map(|service| service.operation_events()). Clippy reported the same diagnostic across production and test-transport configurations. Commitcbf262cuses exactly the compiler-suggestedDaemonInvocationService::operation_eventsmethod reference, preserving the existingOption/default behavior. The commit changes one line in one production file, has one parent and was published by exact-old-headforce=falseguarded fast-forward; the PR head and remote branch independently match. No assertions, authorization, stream lifecycle or test scope changed.Verification boundary: The previous-head Clippy result is red; a fresh exact-head passing Clippy/Bazel matrix is not yet observed. The older Linux fleet was still in progress at inspection; native macOS was skipped. Do not merge or close #4450 until completed new-head Rust/Bazel/Clippy, independent review and full daemon/HTTP/MCP/LSP/advisory/shutdown isolation, resume, restart and cancellation acceptance. Refs #4450, not Fixes.
Current-head owner propagation CI repair — 2026-11-09 (
24fabcc)Exact preceding-head CI #42680244918 failed nonzero Linux Bazel compilation/Clippy with Rust
E0061:build_http_application_routernow requires the daemon-ownedOperationEventAuthority, butmount_http_application_routerand the native-poll regression still supplied three arguments. Repository gates, Dashboard and Feature gates succeeded on that preceding head; Linux fleet and Clippy failed, the Linux summary failed, Windows was in progress, and macOS was skipped. Not green.Commit
24fabccthreads the same existing daemon invocation authority through the live project-composition HTTP mount to the router builder, while the standalone poll regression owns an explicit test-scoped authority. This is a two-file, one-parent, non-force expected-head fast-forward, independently verified on the PR ref and GitHub comparison. No assertions, HTTP authorization, event-capacity, resume, or durable-settlement semantics were loosened.New exact-head CI #42691002146 is PENDING. No claimed current-head Rust/Bazel/Clippy/macOS or full HTTP/MCP/LSP/restart/resume proof. This PR remains ready for review, Refs #4450, NOT MERGEABLE ON CURRENT EVIDENCE; #4450 stays open pending end-to-end lifecycle acceptance.
Latest exact-head Bazel formatter repair — 2026-11-09 (
7bb060c)CI #42676742347 on the preceding head
2897268ran eight repository script checks successfully but failed Repository gates at exactly four Rustfmt hunks intracedecay-daemon-service/src/invocation.rs,tracedecay-application/src/operation_stream.rs,tracedecay/src/daemon/project_open_owners/advisory_runtime.rs, andtracedecay/tests/mcp_suite/mcp_handler_test/affected_tests_behavior_test.rs. Its Feature gates failed downstream, and its Clippy/Linux/Dashboard jobs were cancelled after supersession; ordinary macOS was skipped. These are not passing Rust/Bazel acceptance results.The focused commit
7bb060capplies the exact four emitted Rustfmt edits with no behavior, assertion, test-target, or protection changes. Its four-file patch and one-parent expected-head, non-force branch fast-forward were independently verified against the GitHub commit. Current-head CI #42680244918 is QUEUED and has not yet established format, Clippy, nonzero Rust/Bazel or native macOS success. The separate full daemon-owned operation-stream isolation, shutdown/cancellation, HTTP/MCP/LSP and restart/resume acceptance remains subject to current-head tests/review. Refs #4450; keep this non-model PR ready for review but unmerged, and keep #4450 open.Full owner cutover: compile and isolation regression repair — 2026-11-09 (head
2897268)The existing non-model #4450 PR now carries the daemon-owned authority cutover published at
f71fc27. This follow-up reviewed its actual new branch code and repaired two concrete gaps left by that cutover, without rewriting any other contributor work:92d25a0: existing registered-store settlement regression fixtures were missing the new requiredManagedTestRunRecording.eventsfield. Both now explicitly reuse the exactOperationEventAuthorityowning the already-subscribed emitter, rather than constructing a detached authority. All three constructors in the fixture were statically inspected; none lacks the required field.347b1b7and2897268: retired the stale integration test's removed process-global accessor. The replacement uses the actual composed daemon owners exposed by the existing test-only production harness, requires both independent compositions to admit the same request identity, then shuts down one and requires the other's already-accepted stream to publish its first result and terminal unchanged. The obsolete singleton import is removed.GitHub guarded, non-force fast-forwards were verified; exact three-commit compare changes exactly three files. This is a compilation/behavioral regression repair based on real source tracing, NOT a claim of passing Rust tests. Exact-head hosted CI #42676742347 was QUEUED at last read. Bazel, Clippy, rustfmt, HTTP/MCP/LSP integration, Linux fleet and native macOS on this head are not yet verified. Do not merge or close #4450 before current-head nonzero test acceptance, review, and owner lifecycle proof. Refs #4450 only.
Refuse unverified completion for a managed test operation — Refs #4450
Daemon-owned operation stream cutover — f71fc27 (November 9, 2026)
Commit f71fc27 is a guarded, single-parent, non-force update of the existing issue PR. It removes the application-global
OPERATION_EVENTS/operation_event_authority()and daemon forwarding accessor, constructs a fresh authority in eachDaemonInvocationService, and propagates that exact clone through cold HTTP/SSE routing, project-open advisory cycles, MCP managed-test producer/dispatch (including explicit per-standalone-server ownership), and registered LSP managed-test projection. The daemon's own shutdown now visits only its authority; it still retains accepted live producers during drain. The existing bounded stream, tokens, generation semantics, durable test-run record, and authorizations remain unchanged.A new nonzero Tokio behavioral regression admits the same managed-test request ID into two separately constructed daemon services, expires the first owner, and requires a live test-result publication through the second. Under the old process-global singleton, admitting the duplicate ID into the second service fails. Direct affected-test test fixtures now explicitly construct their own owner rather than using ambient lookup. Exact compare confirms 18 affected production/test files and no deleted assertions.
Verification / HOLD: The full 18-file diff was independently reviewed with GitHub's commit comparison; no local Bazel, rustfmt, Clippy, native macOS, or real HTTP/MCP/LSP integration suite is available in this execution environment. Hosted exact-head CI has not reported applicable results yet (it may not be queued immediately). Previous-head green evidence does not cover this cutover. Required before merge/closure: Bazel nonzero operation-stream, managed-test, daemon shutdown and HTTP/MCP/LSP acceptance; two real composition isolation/restart/resume/cancel lifecycle proof, then current-head CI and review. Refs #4450 only; do not merge/close on partial evidence.
Latest review repair — 4c209dc (November 9, 2026)
Commit 4c209dc fixes an independently confirmed, unresolved review observation: if the registered outcome write AND the failed-terminal publication both refuse, the former
recorded?path correctly preserved the primary typed Database error but silently discarded the second publication failure. The outcome path now logs the operation ID, the durable-store refusal, and the independent terminal-publication refusal before returning the storage error; successful durable records still propagate publication failure normally.The existing real registered-store/Tokio double-failure regression was extended to subscribe to the authenticated operation, verify the previously published Completed terminal remains the only terminal, and require the original Database refusal. This is a falsifiable stream/settlement regression, not a source-shape test. The exact two-file one-parent commit was reviewed and pushed with
force=falseand expected old head21e5e01dc31a.The previous head CI #42651633957 now verifies Repository gates (including Bazel Rustfmt), Clippy, Dashboard, Feature gates, and Linux fleet all passed; its log reports
//crates/tracedecay-mcp:unit_test PASSEDand 183/183 Linux Bazel targets passed, with Windows still running when checked and the ordinary macOS job skipped. These passing results apply to21e5e01, not this commit. New exact-head CI #42662741792 is pending; the new regression and warning have not yet been executed in hosted Rust/Bazel. The broader daemon-owned authority migration/acceptance remains unfinished; this PR isRefs #4450and must not merge or close #4450 on this partial evidence.Current-head CI repair — 21e5e01
Previous-head CI #42644720150 executed 8 repository script tests successfully but failed Bazel rustfmt_check_2024 and Clippy on the new managed-test fixture. The Rust formatter required a wrapped cancellation binding; Clippy rejected an unused
futures_util::StreamExt as _import inherited from the parent module. Commit 21e5e01 applies both exact reported corrections inaffected_tests_tests.rs, with no production or assertion changes, via an expected-head non-force fast-forward. The new exact-head CI #42651633957 is pending; no passing current-head Rust/Bazel/Clippy/native test result is claimed. #4450 remains open pending full daemon/HTTP/MCP/LSP/advisory/shutdown ownership migration, isolation and lifecycle verification. Do not merge on this partial fix.Follow-up: preserve the authoritative storage refusal during double failure
Current head
864e982cf6189af95586f39305bcc8b5a2f73d42adds the independently reviewed commit51c71ffc89b9f75f90b3b589fa278cb638bbd567and a bounded Rust formatting follow-up. A second real error-precedence defect was present: when registered-store start/outcome persistence failed and its already-terminal/shutting-down operation stream refused publication,publish_test_run_terminal(...).await?replaced the primary typedTraceDecayError::Databasewith a secondary lifecycleConfigerror.record_startnow logs a secondary terminal failure without hiding its durable-store refusal.finishattempts publication and then returns the storage error first, while a successful storage write still propagates publication failure.Added a nonzero-path registered-store/Tokio regression that deliberately pre-terminates the authenticated authority, attempts to settle an unstarted global-DB run, and requires the database refusal to win over the independently rejected second terminal. Reorganized the prior regression imports to module scope per review and applied exact Rust formatting from the previous-head Repository gates failure (CI run
42635759877,rustfmt_check_2024). No committed Rust/Bazel test or current-head format/Clippy/native macOS result has been verified; all new head checks are pending. This remains partialRefs #4450, open for review but not eligible to merge or close without full daemon-ownership acceptance.An admitted MCP managed-test run can finish its test process successfully while its registered-store outcome UPDATE fails (for example, the start row is absent or the writer refuses the update). Previously
ManagedTestRun::finishpublished a Completed operation-stream terminal before propagating that database error. HTTP/live subscribers could therefore observe successful completion with no durable outcome, and LSP readers could find an unsettled record. This violates #4450's requirement to preserve truthful live-stream terminals and durable effect receipts.Focused correction: keep the canonical recorded outcome as the authority. Publish the successful receipt only after a successful registered-store settlement; when storage refuses, publish a terminal with
Failedtermination/receipt and the actual consumed-byte count before returning the original typed storage error. The existing success path and stream-close behavior are preserved. No second event store or transport is added.Falsifiable Rust regression committed:
refused_durable_test_result_cannot_publish_a_completed_live_terminaluses a real registered-global-DB lease, the productionManagedTestRun::finish, a real authorizedOperationEventAuthoritysubscription andStreamEventKind. It intentionally attempts to settle a never-started run (zero UPDATE rows). It requires a typed DB refusal, the accepted event, then a Failed terminal carrying the consumed bytes, followed by stream completion. Before the production fix, the same scenario emits Completed.Evidence / limitations
AGENTS.mdread; code and unchanged issue requirements checked against master8d6fe6791a1b9983a066f9ada990d70cb6eb451a. Two source/test files only. Commits2bc57afb46da107a536580cfa23f602544fd5769and3df8d6301a67fcc312f4a66527f4ab2085e4e1b0pushed by exact-parent non-force, expected-old-head updates and independently checked.completed, while the new path reportsfailed, with the accepted path unchanged. This is NOT an executed Rust regression.bazel test //crates/tracedecay-mcp:unit_test --test_output=errors(target verified in generatedcrates/tracedecay-mcp/BUILD.bazel), Bazel format/Clippy and native macOS. Local Rust/Bazel checkout unavailable. Hosted current-head CI must be inspected; queued/skipped jobs are not a passing suite.OPERATION_EVENTSsingleton and forwarding accessor, pass one daemon-owned handle through invocation/HTTP/MCP/LSP/advisory/shutdown, support explicit standalone test owners, and verify multi-composition isolation, shutdown, resume expiry, cancellation and nonzero Bazel/native tests. This PR covers only a verified integrity prerequisite, not the complete ownership migration. Do not merge or close simplify(streams): make operation-event lifetime belong to its daemon instead of a process-global singleton #4450 merely for this slice.This is
Refs #4450, notFixes #4450.