Repository navigation
fix(feedback): isolate local diagnostics from remote refresh - #4817
ScriptedAlchemy wants to merge 12 commits into
Conversation
Retain explicit GitHub/CI refresh while keeping editor and hook feedback independent of unrequested provider reads. Keep configured-but-unqueried CI distinct from an absent CI binding so policy cannot imply success. Preserve the original two barrier regressions and test both configured and unconfigured local admission. Supersedes #4816 without rewriting its published commit or changing another contributor's branch. Refs #4423
|
Keep repeated incomplete local feedback from consuming the bounded durable publication ledger. Preserve incomplete coverage when an atomic record race coalesces an incomplete result rather than returning completed DuplicateNoop. Add nonzero SQLite publication-store repetition and feedback-service record-race regressions; Rust/Bazel CI is required. Refs #4423.
Compare incomplete publications against stable result coverage and runtime watermark, not only the content dedupe key. Preserve changed remote verdicts and generation evidence in the durable ledger while bounding identical saves. Refuse reusing a result identity with a conflicting runtime or scope receipt. Extend the registered SQLite behavioral test for provider and watermark transitions and add a duplicate-identity rejection regression. Refs #4423.
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| // Coalesce only unchanged incomplete evidence, not merely | ||
| // an unchanged content key with a newer provider verdict. | ||
| || same_incomplete_publication_evidence(stored, &publication) |
There was a problem hiding this comment.
🔴 Recovered provider verdict stays stale
When an incomplete verdict returns to an earlier state, same_incomplete_publication_evidence matches its older publication. publication_order keeps the intervening verdict newest, so readers never see the recovery.
Learn more
The publication ledger retains incomplete results even after a different verdict arrives for the same key. The duplicate check searches every stored publication, so a later return to an old verdict matches history and never becomes the latest result. Reads select publications by the publication_order timestamp, leaving the intervening verdict visible. This also applies to other evidence that changes and then returns to its earlier value.
Example: Save incomplete Unavailable at time 10, Failed at time 20, then Unavailable again at time 30 under the same key. The third save matches the time-10 entry and is dropped; latest-committed reads still return Failed from time 20.
Recommended fix: Coalesce an incomplete publication only when the newest stored publication for its dedupe key has equivalent evidence. Retain older history, but append a fresh publication when evidence returns after an intervening change; cover the A→B→A sequence in the store test.
Was this helpful? React with 👍 or 👎 to provide feedback.
Coalesce incomplete results only when the newest durable publication for the same dedupe key has equivalent evidence; a returned provider state must become inspectable after an intervening failure. Preserve distinct grant, policy, trigger and runtime evidence. Verify A-to-B-to-A against the real registered SQLite publication and latest-reader path and move fixture imports to module scope. Refs #4423. The separate missing-read-handles problem remains a merge blocker.
Exact-head correctness repair — Refs #4423Published Fixed source defect: the previous incomplete-publication coalescer compared every historical record. After an Unavailable → Failed → Unavailable recovery, an old Unavailable suppressed the new result, leaving readers on stale Failed evidence. Dedupe now compares only the latest committed result for the same key; it still does not consume the completed-result key. Coalescing also distinguishes grants, policy, trigger, budget, runtime and admitted scope, without rewriting existing durable result identities. Extended the actual SQLite store test to check the A→B→A transition and Current CI: run 42754863027 queued at handoff. Superseded run 42754817367 was cancelled; neither is pass evidence. Local Rust/Bazel and native macOS checks were not available. Still blocking: identical incomplete cycles currently return |
Return the actual durable incomplete publication on an atomic coalescing write, preserving inspectable identity without claiming remote success. Move comparison to the canonical contract, delete the duplicate helper, migrate production and test callers, and repair the Bazel rustfmt gate. Refs #4423
Run the concrete feedback service twice with distinct cycle identities, assert the original durable incomplete result is reused, and read the published diagnostics through the actual response handle authority. Correct the contract rustfmt whitespace in the same focused change. Refs #4423
Exact-head handoff — Refs #4423 — DRAFT / HOLD MERGEPublished non-force fast-forward fixes: Concrete fix and API cutover: The former Authored (not yet executed) behavioral regressions: 64 identical SQLite-backed saves retain one ledger entry and return its exact committed record; A→B→A remote verdict recovery, runtime watermark transitions, and conflicting durable identity are preserved. The contract service test executes two cycles with distinct identities and requires reuse without false complete coverage. The real LSP-advisory/response-handle integration now executes the feedback service again, checks committed incomplete result reuse and reads its diagnostics through the mounted response-handle authority. The earlier Bazel rustfmt diagnostic was corrected. Validation: Latest-head hosted CI run #42761963446 is QUEUED at this handoff; not a pass. Earlier run #42754863027 FAILED the repository rustfmt check; superseded #42761527046 was cancelled. Local Bazel/native macOS and browser/SDK tests were not run. Do not approve or merge. Still required before acceptance: Rust compiler/Bazel and nonzero behavioral test results at the exact head, independent review, all production/local editor/hook/explicit refresh callers and obsolete orchestration/API deletion, retained remote validity and authorization, cancellation/restart/read-handle durability, and explicit provider operation attribution. #4423 remains OPEN. PR maintenance owns eventual merge eligibility; no protected model or release authority is granted. |
#4423 current-head handoff — DRAFT / HOLD MERGEVerified non-force fast-forward commits (Refs #4423):
Validation: new exact-head hosted CI #42767834564 was QUEUED at handoff. Rust/Bazel, named nonzero tests, native macOS, and cross-host behavioral acceptance not verified; authored tests must not be treated as passes. Local checkout/Bazel unavailable in this run. Outstanding acceptance: full local editor/hook/agent-stop/explicit-refresh caller and transport inventory; delete remaining remote-refresh orchestration fields/legacy branches rather than leave dual API paths; retained GitHub/CI evidence scope, generation, freshness, grant and policy checks; cancellation isolation, read-handle/replay after restart, actual provider-call attribution, and compiler/Bazel/native regression proof. #4423 remains OPEN. No merge approval; PR maintenance owns eligibility. |
Refs #4423 Use stable timestamp ordering so the durable ledger never promotes a lexically larger historical result over a later equal-timestamp verdict. Exercise the subsequent recovery and stored ledger order in the SQLite regression and apply the exact hosted rustfmt diagnostics.
Exact-head correction — Refs #4423 — DRAFT / HOLD MERGEPublished Correctness fix: CI #42767834564 failed the Validation: exact-head CI #42774480226 was QUEUED at handoff, not passed. No local Bazel/rustfmt binary exists in this environment, so Rust compilation and named nonzero behavioral-test results are not yet verified. Existing historical ledger order is preserved; older ties whose original insertion order was already lost cannot be reconstructed from result IDs. No data is dropped or rewritten. Still open: full LSP/hook/explicit refresh API deletion and caller inventory, retained remote evidence authorization/freshness/generation, isolated cancellation and restart/replay, hosted and native Bazel integration. No merge approval, issue closure, or weakening of checks. Coordinate with dedicated PR maintenance on this exact head. |
Compare the complete durable publication on result-ID replay rather than only selected identity fields. A different revalidation receipt must be a typed corruption refusal, never an accepted incomplete replay. Add SQLite-backed regression for attempted receipt rebinding. Refs #4423
Exact-head correctness handoff — Refs #4423 — DRAFT / HOLD MERGEPublished Durable integrity fix: a result-ID replay previously compared only selected publication fields. An otherwise identical incomplete publication with a different Validation: exact-head CI #42781164494 was QUEUED, not passed, at handoff. No local Bazel/native macOS compiler or nonzero test result is claimed. Still blocking #4423 acceptance: production editor/hook/agent-stop and explicit-refresh API/caller cutover, obsolete remote orchestration deletion, retained provider evidence scope/freshness/generation/policy checks, independent cancellation, restarts/replay and multi-host nonzero Bazel tests. Keep this PR DRAFT / HOLD MERGE; no issue closure or merge authorization. PR-maintenance owns eligible merges. |
Scope
Refs #4423 — partial, DRAFT. Supersedes closed PR #4816 because its original 77-character commit header failed the 72-character CI commitlint gate. This replacement copies the complete production change and existing barrier regressions unchanged and adds a provider-state correctness regression. No force-push or rewrite of the prior contributor commit.
Source changes
Regression evidence and validation
Three authored nonzero Rust tests: (1) local feedback cannot even poll a forbidden CI read and excludes GitHub refresh; (2) unconfigured local feedback cannot poll CI and stays NotConfigured; (3) an explicitly requested remote read cannot complete until its barrier releases and propagates Denied. Existing assertions are preserved.
Reviewed exact one-commit diff from master
91c72aba7750a398dd28e83d64bf0c6d6fef4172: two source/test files only, 155 insertions/19 deletions. Commitcb2fa59dc18aee0771a52bf4dd7b8030099520bahas a conforming 58-character header. Source changes were transferred without force from closed #4816, and a new typed-state regression was added.The new-head Rust/Bazel tests have not executed. Hosted CI is mandatory:
//crates/tracedecay:unit_test, owning advisory/runtime/LSP/hook integration, Clippy and repository gates. Native macOS acceptance remains unavailable here. Do not mark ready/merge from diff review alone.Remaining acceptance
Already-retained remote evidence must attach only under exact authorization, scope, generation, configuration and freshness; remote-required policy must remain fail-closed; test full editor/hook/explicit-refresh journeys and cancellation separation; measure actual provider calls; remove obsolete provider waits/fields only when all consumers are migrated. No issue closure or performance benchmark claim.
Protected #4776 and release #4763 untouched.
CI correction — 2026-11-08
Hosted Repository gates confirmed the Bazel
rustfmt_check_2024rule failed on five formatting hunks (two source regions and two test regions; the source map change appears as two rustfmt diffs). Commit2cc04d4applies those exact reported changes. Its independently reviewed diff changes formatting only; all existing regression assertions and production behavior remain intact. The branch was advanced by non-force fast-forward after exact old-head verification. Exact-head CI #42493863604 is queued, not passed. Rust/Bazel behavior and native macOS acceptance remain unverified. Keep the draft unmerged and #4423 open.Native verification
At
2cc04d4854, all 26 macOS Bazel advisory-runtime tests passed. They cover local feedback with and without CI configuration, explicit remote discovery, ownership retirement and pending replay. Hosted repository gates also passed. The PR remains draft for independent review and the outstanding acceptance work on #4423.