Repository navigation
fix(work): make each selection its own Work version line - #4994
Merged
Merged
Conversation
Work's covered_prefix stopped at the first journal event outside the request's selection, so one repository-scoped event permanently froze every later no-Git mutation under SelectionCoverageIncomplete. The authorization rules forbid widening the selection, so there was no remedy. Each scope set is now its own version line over the one owner journal. An event carries the relation scopes it was admitted under, and its published version is keyed by that scope set, so a graph version is only ever read together with the line it belongs to. A reader folds the events native to its selection plus the narrower events that are still its base, and skips the rest, so an unrelated scoped event neither advances nor breaks the line it does not belong to. Line membership is decided by the event's scope set, never by its version number: versions are per-line counters, so two lines both produce version 2 and a version match proves nothing about which line an event is on. A narrower event is a line's base only until that line folds an event of its own; after that it is a sibling written against a head the line has moved past. A change that genuinely depends on an entity only another line holds fails the graph's own validation as an unknown task, which names no hidden entity. Optimistic concurrency is per line, so two writers on one line still conflict while an event on another line does not stale either. A journal written before version lines were keyed by scope set is refused as a typed reset rather than shimmed. Removes WorkGraphSelectionCoverageV1 and SelectionCoverageIncomplete, with no remaining caller, and regenerates the dashboard schema, decoders, types and TypeScript SDK from the canonical generators. Refs #4215
|
ScriptedAlchemy
enabled auto-merge
November 27, 2026 09:22
An earlier release installed the Work product journal into every registered store, the profile authority included, although only a project's session store hosts Work. Refusing that earlier shape whenever the table existed turned an upgrade into a reset of the whole profile authority, losing its project registry, accounting and remote-deletion records for tables nothing ever wrote. An earlier-shape journal holding no row records no Work, so its tables are now replaced by the current shape and the store keeps serving, the same settlement the session temporal schema gives an empty earlier schema. A journal holding any row stays the typed reset and is left exactly as found; no row is converted. Refs #4215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A selection naming the project and its repository covers both the repository line and the no-Git line. When both advanced from the same base, its fold applied one sibling and then refused the other, which still expected the shared base, so the combined read and its first write were unavailable for good. A line that holds no event is now rooted on its widest narrower line that holds one, the newest of equally wide ones, and a line that holds events ends at its own last one. Readers fold exactly the chain that head ends at, paired with each event's publication by line and sequence, so no hidden or sibling event is ever folded or paired. Graph versions are per-line counters, so the event draft now carries the exact verified head it was written against, and the writer matches the head's journal sequence and recovered digest inside the transaction rather than a version number another line can also publish. The writer no longer decodes and replays the owner's whole journal. It reads the line head from a per-line index, folds only the line's events since its checkpoint, counts checkpoint distance in the line's own events, and hands the recovered graph to attempt admission instead of folding it twice. A sequence index on publications keeps the invalidation triggers from scanning the owner's history on every append. Refs #4215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #4215
Problem
Work's
covered_prefixstopped at the first journal event outside the request's selection. One repository-scoped event therefore froze every later no-Git mutation underSelectionCoverageIncomplete, permanently, and the authorization rules forbid widening the selection, so there was no remedy.Change
Each scope set is now its own version line over the one owner journal.
Removes
WorkGraphSelectionCoverageV1andSelectionCoverageIncomplete, with no remaining caller, and regenerates the dashboard schema, decoders, types and TypeScript SDK from the canonical generators.Acceptance criteria
an_unrelated_scoped_event_does_not_freeze_a_no_git_mutationa_scoped_event_beside_no_git_work_does_not_poison_the_no_git_selectiona_cross_scope_dependency_is_refused_without_disclosing_the_hidden_entity; CLI journey asserts no hidden proposal or scope in the serialized refusaltwo_writers_on_one_line_conflict_even_with_a_scoped_event_beside_thema_wider_selection_reads_the_narrower_head_until_it_takes_rootselection_aggregate_boundaries_survive_a_registered_store_restarta_work_product_journal_predating_selection_lines_is_refused_as_a_resetVerification
All via Bazel, counts confirmed non-zero:
//crates/tracedecay-rusqlite-runtime:rusqlite_suite— 158 passed//crates/tracedecay-contracts:contracts_suite— 278 passed//crates/tracedecay-contracts:unit_test— 461 passed//crates/tracedecay-global-db:unit_test— 586 passed//crates/tracedecay-daemon-service:unit_test— 437 passed//crates/tracedecay-cli:work_route_exposure_conformance— 5 passedDashboard:
contracts:checkreports up to date,check:embeddedreports artifacts current,typecheckclean,vitest2333 passed across 235 files.rustfmt_check_2024clean for every touched crate. Commitlint passes.Historical selection read follow-up
Commit
eb5795a441cd916357e292403394b193ed624ad1chooses a reader's chain head from publications visible at the request's observation time. Exact evidence readers also use the verified token's inclusive event-sequence bound, so later sibling writes—even with the same observation timestamp—cannot replace the named graph's ancestry. Scope containment and complete verified-identity checks are retained. The indexed writer query, current compare-and-swap, and ancestry sequence bounds are unchanged.The registered-store regressions
historical_combined_reads_survive_later_sibling_and_own_line_writesandexact_evidence_survives_sibling_writes_at_the_same_observationcompare identical historical reads and rooted/evidence results before and after later writes. They also assert that current reads advance, a sibling scope cannot read the exact token, and a missing publication cannot silently reveal an older head.Merge
4b78b121dcc630ffeac7a93278599258120f3ae4integrates master4baa310, including the already validated history-fixture and grammar corrections.Commit
d4b371c77f2f1c9357603bd03d4a055fc49cee1ealso orders proposal comparisons by the owner journal's event sequence. Graph version counters belong to individual selection lines and cannot order sibling snapshots. Independent exact evidence reads, full identity verification, and TaskId checks remain intact. The registered-store regressionproposal_comparisons_follow_journal_order_across_selection_linesaccepts chronological comparisons with equal or decreasing local counters, verifies the exact added dependency relation, and refuses reversed or identical event sequences.Validation: canonical Bazel
rustfmt_check_2024targets for bothtracedecay-contractsandtracedecay-rusqlite-runtimepassed, andgit diff --checkpassed. A focused local//crates/tracedecay-rusqlite-runtime:rusqlite_suiteattempt on the preceding integrated head stopped while compilingtracedecay-contracts__dev: the compiler action exited unsuccessfully without a Rust diagnostic. Zero runtime tests executed in that local attempt. Hosted CI run 45985733601 for published headd4b371c7passed all 181 Linux test targets (119 executed, 62 cached). In the completed fleet job,//crates/tracedecay-rusqlite-runtime:rusqlite_suitefreshly passed in 175.6 seconds, covering all three new registered-store regressions. Clippy, repository gates, feature gates, dashboard, benchmark harness checks, and the Linux aggregate also passed. Windows validation is running. The original suite counts above predate these follow-ups.