Skip to content

slice(#1602 PR A): define an immutable completed-analysis identity and typed integration failures #1765

Open

Description

@EffortlessSteven

Parent and consumers

Problem

RIPR needs one immutable identity for a completed analysis result. The earlier issue framed that type as a public riprAgent SnapshotHandle paired with a custom protocol error enum. The durable need is transport-neutral:

completed analysis identity
+ typed application failure/recovery

Standard LSP maps the completed result into diagnostic resultId and stale/current presentation. Standard MCP may expose the canonical snapshot identity in tools/resources. Neither transport owns the identity algorithm.

Required outcome

Add a provider-neutral type equivalent to:

CompletedAnalysisSnapshotId

binding the applicable canonical inputs:

identity algorithm version
portable analysis input identity
root/config/base/saved revision/profile/language identity
completed typed AnalysisOutcome
canonical evidence-set identity
budget/selection identity only where it defines the result

Do not use scheduler generation, process ID, timestamp, absolute checkout path, or request order as semantic identity.

Typed failures

Define or reuse a transport-neutral closed failure/recovery vocabulary for lifecycle and retrieval, including the applicable:

no_completed_analysis
analysis_in_flight
stale_snapshot
workspace_ambiguous
config_invalid
item_not_found
static_limitation
unsupported_profile
cancelled
superseded
result_too_large

Adapters map these facts to:

  • standard LSP diagnostics/status/log/command errors;
  • standard MCP tool/resource errors;
  • CLI/VS Code presentation.

Do not name the domain type RiprAgentError or bake JSON-RPC/LSP-specific fields into it.

Required proof

  • equivalent checkout roots produce the same semantic snapshot identity;
  • concrete root evidence remains separately available and cross-root use is rejected where required;
  • revision/config/base/profile/language/input movement changes identity appropriately;
  • generation counter changes do not alter an unchanged completed snapshot;
  • cancelled/in-flight work cannot create a completed identity;
  • deterministic serialization and semantic digest;
  • transport adapters preserve kind/recovery without string parsing;
  • removal experiment replacing the identity with generation makes the tests fail.

Acceptance

Proof

cargo test -p ripr --lib analysis_snapshot -- --nocapture
cargo test -p ripr --lib evidence_state -- --nocapture
cargo xtask check-output-contracts
cargo xtask check-static-language
cargo xtask check-traceability
cargo xtask check-pr
git diff --check

Non-goals

  • no standard LSP handler wiring;
  • no MCP transport/tool implementation;
  • no custom public request/error envelope;
  • no source edit or command execution;
  • no support promotion.

Claim boundary

Completion establishes shared completed-analysis identity and failures. It does not prove any transport, editor, or agent client.

Activity

  1. added
    vscode
    on Jul 18, 2026
  2. coderabbitai commented on Jul 18, 2026

    @coderabbitai
    🔗 Related PRs

    #3071 - test(release): verify and receipt negative cases complete the corpus (#2824) [open]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. added
    status/needs-work
    on Jul 18, 2026
  4. EffortlessSteven commented on Jul 19, 2026

    @EffortlessSteven
    MemberAuthor

    Scope clarification

    Keep this issue focused on the immutable SnapshotHandle core type. Consume the canonical wire-visible error contract from #1896/#1926 rather than defining a second independently evolving RiprAgentError vocabulary.

    #1927 owns migration of current generation-based snapshot_id fields and compatibility consumers. #1932 owns the cross-surface identity taxonomy. Compile-time types should prevent AttemptId, legacy snapshot ID, SnapshotHandle, diagnostic result ID, and continuation ID from being interchanged.

  5. EffortlessSteven commented on Aug 2, 2026

    @EffortlessSteven
    MemberAuthor

    Earnest review (2026-08-02)

    Slice(#1602 PR A): SnapshotHandle type (content-addressed, not generation counter) + typed RiprAgentError enum. Content-addressed (not generation-counter) is the correct immutability choice for snapshot handles.

    Action: keep open; this is the foundational type for #1602/#1603. Track to landing.

  6. EffortlessSteven commented on Aug 2, 2026

    @EffortlessSteven
    MemberAuthor

    Deep re-review (2026-08-02)

    STATUS: partially
    EVIDENCE: SnapshotHandle is NOT landed — grep for SnapshotHandle across crates/ripr/src returns zero hits; the current identity is still the generation counter (backend.rs:843 referenced in the issue) and LspAnalysisInputIdentity (state.rs:241), neither promoted to a content-addressed handle. HOWEVER, the RiprAgentError half IS substantially present: crates/ripr/src/lsp/agent_protocol.rs:268 defines RiprAgentErrorKind, line 367 RiprAgentErrorStatus, and lines 382-387 list RESERVED_ERROR_KINDS (NoSnapshot, AnalysisInFlight, StaleSnapshot, StaleContinuation, WorkspaceAmbiguous, ...).
    PLAN QUALITY: good. The "content-addressed semantic hash of LspAnalysisInputIdentity — NOT the generation counter" distinction is the load-bearing correctness property (a counter can be reused across different inputs; a content hash cannot).
    ACTION: keep. The RiprAgentError enum half can be marked resolved; the SnapshotHandle half is the real deliverable and is the critical unblock for #1766, #1767, #1775. Dependency on #1713 (input authority status) should be confirmed before starting.

  7. changed the title [-]slice(#1602 PR A): SnapshotHandle type (content-addressed, not generation counter) + typed RiprAgentError enum[/-] [+]slice(#1602 PR A): define an immutable completed-analysis identity and typed integration failures[/+] on Aug 9, 2026
  8. EffortlessSteven commented on Sep 28, 2026

    @EffortlessSteven
    MemberAuthor

    Verified prerequisite plan — existing #1765 (2026-09-28)

    This is source-only planning, not implementation or acceptance proof. Source inspected at 60e5d7aa41305e4e42c66e119c6a45308b7ce190; current bodies of #1599/#1602/#1765/#1927/#1897/#3089 govern over older custom-request comments. No equivalent current candidate was found. Cache #4466 remains the active implementation lane.

    Actual producers and identity composition

    Use the existing AnalysisOutcome from analysis/pipeline.rs (validated, sorted/deduplicated limitations; typed semantic digest), together with the actual AnalysisResult findings/language/partial-scope records before rendering. Its input commitment is currently SHA256 of the loaded diff; immutable-candidate mode additionally supplies resolved base/candidate tree IDs and exact diff commitment. A diff digest alone does not bind unchanged source/test context.

    For the Rust corpus, seam_inventory already collects producer source bytes and produces RepoSeamCacheKey.files_content_hash through sorted workspace-relative file paths/content hashes; its complete cache key also contains root hash, schema generation and host toolchain state, so do not hash/rebrand the full cache key. Capture the portable content/config/manifests/lockfile/policy/feature inputs from the actual analysis invocation; do not invoke a fresh second scan after analysis and label it provenance. Reuse the content-hash derivation at collection time. Other enabled-language input coverage must be explicit; absent commitments yield a typed unavailable identity, never a fabricated portable ID.

    Bind canonical typed Finding and, when produced, ClassifiedSeam/TestGripEvidence, language/partial/component/harness completeness facts, with workspace-relative locations and deterministic item order. Do not hash diagnostics, transport JSON, Markdown, or validated report-file artifacts as evidence authority. Full evidence identity precedes adapter selection; include budget/selection only when it defines the result, with its completeness/overflow facts. Missing/limited evidence must remain distinguishable from a complete empty set. AnalysisOutcome.identity.snapshot_identity must be absent from its pre-ID commitment to avoid self-reference; installing the ID later cannot change its own digest.

    Current LspAnalysisInputIdentity.stable_id includes absolute effective_root and session saved revision; preserve it as concrete session/currentness evidence, not the portable input commitment. Saved content/revision semantic commitment must come from analyzed bytes/resolved Git objects, not that process counter. Keep host-root binding and authority epoch separate so identical portable IDs never authorize cross-root use.

    Real mint boundary and coherent scope

    workspace_diagnostics_with_config calls the same saved-worktree producer as CLI check --worktree, then constructs the private LSP snapshot. run_refresh_request rejects obsolete/cancelled requests before and after preparation; under workspace_root_transition it checks authority again before publication and final commit_refresh_snapshot. The latter commits an Arc<AnalysisSnapshot> and the already-prepared immutable delivery selection.

    #1765 requires a narrow private producer connection at this real completed-result commit boundary, not unused DTOs and not new LSP handlers. Compute portable candidate commitments while producing analysis, but only expose/mint completed authority after actual transaction/currentness/cancellation checks succeed. Test prepared/in-flight and superseded/cancelled transactions through the actual scheduler/transaction route; a test that merely passes a Cancelled enum to a constructor is insufficient. Clarify whether final mint is atomic with last authority/cancellation admission; do not create an ID then discard it and call that no-mint.

    Reconcile the acceptance wording: #1765 establishes shared type/commit authority and pure typed adapter mapping proof; it does not complete public LSP/MCP consumption. #1927 owns semantic-ID migration; #1766 owns standard LSP lifecycle projection; #1897 shared refresh terminal behavior; #3089 MCP tool/resource wiring. Keep parent acceptance open until those consumers exist. No custom public LSP request/error envelope or second scheduler.

    Discriminating proof

    Start with two ordinary, distinct spaced/Unicode Git roots containing actual Rust production and test code plus a saved boundary change. Run the actual worktree check/full evidence producer; require nonempty findings or classified seams and known distinct evidence values. Derive both completed commitments through the production connection, requiring same portable ID and distinct concrete bindings. Replay unchanged analysis with different generation/time: same ID. Mutate analyzed source/test context, base, effective config, profile/language, outcome limitation and one evidence field independently: intended ID changes. Reordering input traversal preserves it; duplicate/conflicting canonical item identities reject rather than silently overwrite.

    Extend real refresh transaction characterization (refresh_transaction_does_not_replace_snapshot_before_commit, failed_refresh_retains_last_snapshot_and_reports_stale_health, supersession route) so preparation cannot expose a completed ID, actual cancellation/supersession leaves the prior committed ID and stale state, and success publishes exactly one new ID. Existing superseded_transaction_leaves_document_state_unadvanced only leaves preparation uncommitted: add actual superseding/cancelling request stimulus before claiming no-mint. Removal experiments restoring generation identity, omitting outcome/evidence, or bypassing final admission must fail these controls. Complete-zero versus incomplete-zero must differ without relying on count alone.

    Failure/API/compatibility boundaries

    Use a closed domain failure kind plus typed recovery action/identity fields. Reuse applicable AnalysisRecoveryKind meanings; lifecycle NoCompletedAnalysis/InFlight/Stale/Cancelled/Superseded are typed domain states, not prose parsing or an LSP-shaped RiprAgentError. Pure exhaustive mappings can prove no kind/recovery is lost; actual CLI/LSP/MCP transport presentation remains later proof. Public schemas/capabilities/resultIds stay unchanged in this prerequisite; no snapshot_handles=true or support promotion. If private connection changes current externally rendered state, split/explicitly revise compatibility acceptance before implementation.

    ADR0022 permits only static MCP startup status today and requires official SDK migration/dependency/lockfile/conformance evidence before MCP protocol growth. #1765 adds no MCP method and does not bypass that trigger. Proposed SPEC0131's older custom vocabulary needs a focused source-truth reconciliation under #1599; do not use it to expand custom handlers.

    Rollback: revert the internal producer/type connection while retaining legacy generation values as compatibility/attempt telemetry; no cache/storage migration, new execution authority, provider configuration, source edits or public release claim. Planned proof is NOT RUN. Final design still needs verified all-enabled-language input provenance and mint-admission atomicity before implementation-ready status.

  9. EffortlessSteven commented on Sep 28, 2026

    @EffortlessSteven
    MemberAuthor

    Source-only follow-up: prerequisite ownership and final admission

    Existing owners found: #1932 owns identity taxonomy including complete InputIdentity and portable/session scope; #3094 owns focused shared services; #1897 explicitly owns cancellation/supersession/publication-safe refresh. #3019 owns behavior-preserving RefreshOrchestrator extraction and is blocked on #2941/#2942; its D2 covers publication eligibility. Do not bypass those boundaries by moving the entire backend or fixing an unproved race inside #1765. #1671 is merged and #2000 closed: they preserve LSP/session Git input authority, not all-language portable analyzed-content provenance. Bounded open/all-state searches for portable input/content, analyzed inputs, corpus identity, source digest and language provenance found no dedicated all-enabled-language commitment producer claim. #1932 is an overlapping taxonomy owner, not proof that capture is implemented. Reconcile with that owner before considering a separate narrow prerequisite; no new issue filed here. #4464 Rust origins may offer future captured-byte reuse, but its active PR must not grow into shared identity.

    Exact final-admission trace at source60e: run_refresh_request holds workspace_root_transition during publication/finalcommit, serializing root transitions. Its final refresh_request_is_current calls RefreshScheduler::is_current_generation, which takes and releases scheduler state mutex and checks only !stopping && next_generation == generation. Then lens identity/component cloning and commit_refresh_snapshot follow. Commit acquires last_diagnostic_uris, last_diagnostics, latest_analysis, diagnostic_result_ids, documents in that order; it does not hold/recheck scheduler state or token. Request/cancel/stop/invalidate_input mutate independent scheduler state; execution_gate covers only blocking analysis and is released before commit. Cancel clears active/pending and signals token without incrementing next_generation, so generation equality alone is not token/active membership. The cancellation guard drops when the refresh future is dropped, which often prevents continuation; this observation alone does not demonstrate a continuing cancelled request or user-visible stale publication.

    Required proof before any change: drive actual run_refresh_request, establish a deterministic after-final-guard/before-commit phase via a narrow test barrier or proven lock contention, then request real supersession/cancellation/input invalidation; observe committed authority and terminal outcome. A direct call to commit_refresh_snapshot, or merely abandoning a prepared transaction, bypasses this seam. If reproduction shows admission needs strengthening, coordinate #1897/#3019 and the live LSP writer. A scheduler-guarded synchronous commit closure is only a possible design: audit scheduler→diagnostic/document lock order against every document mutation and root transition; never hold a std mutex across await or introduce reverse acquisition. No production fix is asserted here.

    #1765 is not implementation-ready until actual portable input commitments and final mint-admission proof are settled. Missing content must yield typed unavailability, never a partial fabricated portable ID. No transport JSON hashing or post-completion filesystem rescan. No native tests run.

  10. EffortlessSteven commented on Sep 28, 2026

    @EffortlessSteven
    MemberAuthor

    Source-only design refinement at immutable496efff6e0fbc5b814d0c199f8205bf48924a397 (main51a88a63 integrated); no implementation or identity mint proof yet.

    The input commitment must attach to actual LanguageDiffResult/LanguageRepoResult and have a real pipeline/commit consumer. Verified capture owners:

    • Rust: exact committed_source loaded bytes before cache, plus manifest/package/role/config inputs; preserve absent/failed source dispositions.
    • Python: discovery membership/errors and bounded source results consumed by extraction. Silent read_dir/entry/file_type omissions cannot establish complete-empty identity.
    • TypeScript: discovery/shared capped-source cache, selected ts/jsconfig bytes and resolution outcome, actual package.json observations and existence-only workspace/lock markers. Do not hash unconsumed lockfile contents as stronger provenance.
    • Perl: exact external fact packet plus source freshness reads inside validate_ingestion. Absent/unreadable files currently skip freshness validation; packet digest alone cannot establish current-source authorization.

    Repeated incompatible observations of the same authority/path must reject coherent completed admission. File-fact cache inputs are captured before hit; a full seam cache early return must carry original valid producer commitments or explicitly make identity unavailable. No provenance-only post-analysis rescan or rebranded root/toolchain cache key.

    Effective semantic config, selected scope and typed missing/partial membership are separate from concrete root/session currentness. Capture/commit tests must reach real adapters, nonempty context evidence, cold/warm parity, selected-config changes, skipped membership and conflicting reads; removal of a commitment must fail an actual producer control.

    Final admission remains a proof/design prerequisite under existing1897/3019: task.abort intent is not itself admitted scheduler cancellation. Trace real invalidation callers and lock ordering, then test an actual surviving refresh after completed cancellation/supersession before commit. Direct constructor/commit tests and arbitrary task aborts cannot establish the claimed no-mint rule. No proven user-facing race is asserted by this source audit. Existing standard LSP/MCP boundary and ADR0022 SDK-growth trigger remain unchanged.

  11. EffortlessSteven commented on Sep 28, 2026

    @EffortlessSteven
    MemberAuthor

    Source-confirmed prerequisite: analyzed saved-content identity must come from the producer

    Read-only audit at 496efff6e0fbc5b814d0c199f8205bf48924a397; no runtime reproduction or implementation claimed.

    lsp/backend.rs:869 prepares pending document identities after analysis through DocumentStore::pending_analyzed_digests. lsp/state.rs:1168–1180 calls read_saved_digest(uri) again, falling back to didSave-tracked state. note_refresh_analyzed:1191 then installs this digest alongside the already-produced snapshot; buffer quarantine compares the buffer to that installed digest. The comment that these are the same bytes analysis read is not enforced by a producer-carried commitment.

    Concrete discriminator: actual analysis consumes saved A and produces nonempty A-specific findings; after that producer returns but before real preparation, disk changes to distinct B and the normal didChange handler records buffer B (no didSave/new refresh). didChange intentionally does not generation-invalidate. Preparation now reads B and can attribute A findings to B. This is a source-confirmed authority gap, not executed race proof. Historical A snapshots may remain inspectable; they must stay quarantined/obsolete for B, never become current line-local authority.

    Ownership disposition: keep this producer-identity prerequisite under existing #1765, with #1932 input identity taxonomy and #1897 final publication admission coordination. The existing closed #1970 / merged #2146 document contract explicitly includes edit while analysis runs and save followed by edit before commit, and supplies regression acceptance; do not duplicate/reopen its full delivery scope by assumption. Open #1931 owns the broader guarded-WorkspaceEdit lifecycle and does not replace this source-byte capture seam. Bounded searches found no exact active candidate (search hits are not proof of live writer ownership). Do not expand active source-origin #4464 or add custom lifecycle protocols.

    Builder-ready proof: extend existing real refresh fixture/Client harness with one per-Backend test-only barrier after the actual producer returns and before prepare. Establish actual A diagnostics, then write B and invoke real didChange with B/version advance; release the real run_refresh_request. Require the committed analyzed source identity remains A (or the transaction refuses as obsolete), document stays quarantined, pull/push line-local diagnostics and executable actions cannot become current for B, and no A finding is relabeled B. Positive A/no-change refresh must publish; an actual later B refresh must produce B authority and lift quarantine only on matching producer content. Include read failure/missing producer-origin input: unavailable identity must fail closed, never fall back to didSave/current-disk digest as analyzed authority. Removing the producer commitment or restoring preparation reread must fail the actual negative.

    Target seam: captured bytes/source authority in saved-worktree analysis → WorkspaceDiagnostics/AnalysisSnapshot private producer provenance → prepare pending document comparison → existing snapshot/document commit. Reuse actual adapter reads; do not post-analysis rescan. Rust-only initial regression is a bounded safety prerequisite, not all-enabled-language #1765 completion. Config/root/cancel admission remains separate proof under existing owners.

    Non-goals: analysis of unsaved buffers, automatic save, blanket prohibition on historical snapshots, new public snapshot protocol, editor/guarded-edit expansion, global IO collector, cache migration, source-origin4464 changes or release qualification. Native RED/GREEN and implementation are NOT RUN. Rollback is the narrow producer-provenance connection while retaining the safe regression and explicit unavailable disposition.

  12. EffortlessSteven commented on Sep 29, 2026

    @EffortlessSteven
    MemberAuthor

    Builder-ready consumed-source witness refinement

    Source-only audit against exact 3297c7034b867557476e7c16298b768a35f4d3d6; no runtime reproduction, implementation, or identity-mint proof. This refines the existing producer-source prerequisite, without creating another owner.

    Target: crates/ripr/src/lsp/backend.rs::run_refresh_request receives the actual successful producer result, validates root containment, then calls prepare_refresh_transaction; preparation obtains DocumentStore::pending_analyzed_digests in lsp/state.rs, which rereads saved bytes and falls back to didSave-tracked state. Normal did_change records buffer changes without advancing workspace generation. Producer A and preparation B are therefore not source-bound by this path; a user-facing race remains NOT_PROVEN.

    Smallest genuine discriminator

    • Reuse the real Cargo/Git tracked Worktree fixture (write_lsp_scope_fixture, unique_lsp_test_root, and the setup in lsp_saved_worktree_refresh_analyzes_uncommitted_tracked_edit in lsp/tests.rs) and the actual service/client harness. Establish saved A with nonempty, independently identifiable A-specific findings. Do not use quarantine_workspace_diagnostics or manually constructed snapshots as the producer.
    • Add a narrowly owned, per-Backend cfg(test) async reached/release Notify barrier after the actual successful producer and root-containment check, immediately before preparation. Keep the production default inert/absent. Drive existing refresh_diagnostics or the real explicit-refresh handler so scheduler, run_refresh_request, prepare, publish, and commit all execute.
    • First prove unchanged A can complete and publish actual A evidence.
    • Pause an actual A refresh at that boundary. Write distinct saved B and invoke normal didChange with B and a newer document version. Record that workspace generation remains unchanged; do not issue didSave, inject cancellation, or schedule a replacement refresh.
    • Release the actual refresh. Require the committed analyzed-source authority to remain A, or refuse the transaction as obsolete/unavailable. A findings must never acquire B authority: B must remain quarantined, and pull/push line-local diagnostics and executable actions cannot present A as current for B. Retaining inspectable historical A evidence is allowed.
    • Run an actual later B refresh: require B-specific producer evidence and matching consumed-content authority before quarantine can lift. Add unreadable/missing producer-origin coverage: absence must fail closed, not adopt preparation-time disk/didSave content.
    • The removal control must restore the preparation reread or remove the consumed-source commitment and make the real negative fail.

    Existing phase controls do not discriminate this seam: Publishing progress and the root-transition lock occur after preparation, while the execution gate precedes analysis. Do not hold document/diagnostic std mutexes across awaits or while calling didChange; that can deadlock or suppress the change being tested. No global hook, arbitrary sleeps, synthetic constructor/commit substitute, or post-analysis rescan.

    Proof and boundary

    Proposed focused selectors (to be introduced by the selected builder):

    cargo test -p ripr --lib consumed_source_identity -- --nocapture
    cargo test -p ripr --lib lsp_saved_worktree_refresh_analyzes_uncommitted_tracked_edit -- --exact --nocapture
    cargo xtask check-fast
    cargo xtask precommit
    git diff --check

    The existing named test may need its full module-qualified selector for --exact; verify an actual nonzero executed denominator. All new native RED/GREEN and guards are NOT_RUN. Preserve raw producer/phase/commit identities, document versions/generation, native exits, and served evidence counts against the exact candidate. Observe the repo's serialized native lease and source/API rules.

    This is a bounded Rust saved-source provenance prerequisite, not completion of all enabled-language #1765 identity, #1897 final-admission proof, source-origin #4464, guarded WorkspaceEdit, unsaved-buffer analysis, new public protocol, support promotion, or release qualification. Coordinate existing #1932 input-identity taxonomy and publication owners. Reuse already-consumed producer bytes; do not duplicate source buffers or widen public DTOs casually.

    Rollback: the per-Backend barrier is test-only and must have bounded wait/error cleanup so failures cannot strand a refresh. Any eventual production connection is independently scoped and reversible; retain the discriminating regression and explicit unavailable-source disposition. No parser-claim expansion.

  13. EffortlessSteven commented on Sep 29, 2026

    @EffortlessSteven
    MemberAuthor

    Verified consumed-source commitment prerequisite — #1765

    Source-only plan at immutable current main 3f07824efb2c35898973d23ca6acad109f3366c6. This is one Rust saved-worktree provenance prerequisite for #1602/#4807/#3089, not completed snapshot identity or MCP service implementation. No native baseline/RED/GREEN has run for this new lane.

    Current authority and overlap

    Merged #4851/#4464 carries parser-owned numeric geometry from actual loaded Rust buffers through AnalysisResult/private app wrapper. It intentionally does not retain source identity. lsp/backend.rs::prepare_refresh_transaction still obtains DocumentStore::pending_analyzed_digests, which rereads disk and falls back to didSave state; this can associate produced A evidence with preparation B. User-visible reproduction remains NOT_ESTABLISHED pending the actual control.

    Active #4830 owns action/input/diagnostic identity edge laws and shared fingerprint semantics; #4844 owns RepairAttempt store/resolver. This lane will not change their identity algorithms, public schemas, scheduler semantics or repair workflow. #4804's registry records authorities but does not mint completed IDs; #4807 remains a later typed lifecycle/result migration. Recheck actual live overlap before edits.

    Minimal private producer connection

    1. Add a small private consumed-source commitment carrier with raw-byte SHA256 and workspace-relative Rust path, plus explicit unavailable/conflicting state. Digest construction occurs over the actual buffers already loaded by Rust diff/repo adapters, before fact-cache lookup. No source copy, post-analysis scan, transport JSON digest or geometry-derived identity.
    2. Raw bytes remain authority: leading BOM is included, invalid UTF8 is included, CRLF differs from LF. rust_source_text BOM/lossy decoding and origin coordinates are separate presentation/parser inputs. Cached facts.source is not source authority; warm HIT uses the freshly loaded raw commitment. Missing/skipped source and repeated incompatible observations cannot claim analyzed identity. Dynamic include origins without actual captured raw bytes remain unavailable rather than reconstructed from cached strings.
    3. Carry this private result through LanguageDiffResult/LanguageRepoResult → AnalysisResult → existing private paired app producer → WorkspaceDiagnostics/AnalysisSnapshot. Public CheckOutput and source_range DTOs remain unchanged. Only final actual producer results carry commitments; no synthesized Finding or report-file authority.
    4. Preparation consults the carried commitment for applicable Rust open documents, without reading disk or adopting didSave as analyzed authority. Missing/conflicting commitment yields None/unavailable and quarantine. Preserve existing non-Rust preparation behavior explicitly in this narrow prerequisite; it is not all-language provenance completion. Existing document/currentness identities remain concrete session evidence, not portable snapshot IDs.
    5. Existing final commit transaction remains the consumer; this slice fixes source attribution only. Cancel/supersession/root admission atomicity remains separately owned slice(#1602 PR C): complete bounded refresh, cancellation, deduplication, and terminal outcomes across standard adapters #1897/slice(#2689-D): extract RefreshOrchestrator (refresh_diagnostics, run_refresh_request, commit/rollback) from Backend #3019/slice(#1602 PR A): define an immutable completed-analysis identity and typed integration failures #1765 proof, with no new scheduler.

    Tests first: real producer oracle

    Use the existing tracked Cargo/Git worktree fixture and actual Backend/service-client harness. Add a per-Backend cfg(test) reached/release Notify barrier after successful actual producer/root-containment, before prepare; default absent. Bound waits and ensure release on test failure so no worker strands. It must not hold document/diagnostic locks across didChange or await.

    • Positive A: actual saved A boundary change yields nonempty independently identified A findings; unchanged A refresh publishes current A.
    • Negative: pause real A refresh, write distinct disk B, invoke actual didChange(B,newversion), no didSave/replacement/cancellation; independently observe unchanged generation. Release the real refresh. Require analyzed commitment A or explicit refusal; B stays quarantined, served current diagnostics/actions cannot relabel A as B. Existing disk reread/didSave fallback must make this assertion fail.
    • Recovery: later actual B refresh produces B-specific evidence and B commitment before quarantine lifts.
    • Cold MISS/warm HIT actual producer counts and identity parity, using only actual cache telemetry; no prebuilt fake cache/control.
    • Missing/unavailable/conflicting Rust commitments fail closed; restoring reread/fallback or removing commitment must fail the real negative.
    • Raw BOM/CRLF byte commitment controls distinguish normalized geometry/text from consumed bytes. Portable equivalent roots may yield identical per-file content commitments, but no portable completed snapshot or cross-root authority is claimed.
    • Non-Rust/default characterization preserves existing behavior, named as a limitation.

    Scaffold may introduce empty private carrier/barrier plumbing while preserving coarse preparation behavior; it must compile before actual behavioral RED. A missing API compilation failure is not RED. No production commitment fill/quarantine repair before valid nonempty behavioral witness and counterreview.

    Proof and receipts

    Fresh named worktree/branch at exact main. Before edits run inherited baseline once the root grants Cargo; then compile focused controls before executing them. Actual selectors must be verified with nonzero denominators (existing test full module name). Proposed namespace consumed_source_identity; retain argv/CWD/head/tree/common selector, actual A/B raw digest/evidence counts, versions/generation, cache stats, native exits and barrier cleanup. Required current alltargets/check-fast/precommit follow repaired behavior. Target is shared4365 jobs2 only on explicit lease; own localtarget required by forced Cargo TEMP. No native work now.

    Rollback: revert narrow private carrier/preparation connection normally; preserve discriminating tests and unavailable-source contract. No cache generation, public DTO, parser discovery/ranking, diagnostics budget, snapshot mint, embedding, package/release/support promotion, unsaved-buffer analysis or source-origin claim expansion.

    Disposition: source-verified plan and tests-first intent; actual baseline and behavioral evidence NOT_RUN. Broader #1765/#1602/#4807/#3089 remain open.

  14. EffortlessSteven commented on Sep 29, 2026

    @EffortlessSteven
    MemberAuthor

    Consumed Rust bytes: private preparation commitment

    Existing owner: #1765; prerequisite only for #1602/#4807/#3089. Accepted inherited basis is 3f07824/tree26db6633. Tests-only candidate 4c0962e/treefb6bcd34 now has an actual behavioral RED. No completed snapshot ID, portable all-language identity, typed failure lifecycle, or MCP analysis service is implemented here.

    Actual proof and limits

    Focused v5 compiled successfully and executed the admitted library binary directly: 0 passed, 1 failed, 0 ignored, 7101 filtered, native 101, 38.69 seconds. The actual saved-worktree A producer returned two findings; its generation 2 remained current before and after actual didChange(B). Raw disk A SHA256 was eb9ccd8dbd06f0d190596a212f4de0884a7e9eb04ea526115d8628b365a5f163; raw disk B was 106ce77ae1fcc0d187ded0fddab63e9b8484926830506a245fdba49977f0b678. Preparation recorded B as analyzed and cleared quarantine. This is the explicit intended attribution failure, not cancellation or a fabricated snapshot.

    Evidence: 1765-4c096-behavioral-red-v5 beside this plan, including native receipts, raw logs, context, classifier, equal pre/post executable SHA256 D3666306… and liveness CF85CC86…. Later committed-probe signature and safe-refusal assertions short-circuited after that first error; they are NOT RUN. Prior ac6 setup failure, 9002 diagnostic compile failure and v4 Git admission timeout remain retained and do not establish product behavior. Scope reduction is not a Git cause fix. No installed editor or release claim.

    Current ownership readback

    Fresh #4830 is OPEN at a590dc5, owning identity-law/fingerprint work in action_contract/input_identity and diagnostic result-ID tests. #4844 is OPEN at 0893288, owning RepairAttempt persistence/resolver/workflow. This slice does not change either formula or workflow. The shared diagnostics file overlap is limited to the saved-worktree private producer/context and snapshot construction; preserve the other owner's result-ID tests and semantics. #4851 already delivered numeric geometry; that geometry and normalized cached source are not raw source authority.

    Minimal implementation

    • One crate-private carrier records workspace-relative Rust path and SHA256 of the actual already-loaded raw bytes, or explicit unavailable/conflicting observations. Repeated identical observations are idempotent; incompatible observations fail closed. No file bytes are retained and no cache generation or public DTO field is added.
    • Fill it in the Rust diff/repo load loops before file-fact cache lookup. Capture A even on a warm HIT; never derive a commitment from cached facts.source, normalized/BOM-stripped text, geometry, JSON output, or a later filesystem scan. Missing or excluded paths have no usable commitment. Uncaptured include inputs remain unavailable.
    • Pass that field through internal language results and AnalysisResult. Add a private saved-worktree app wrapper retaining context while existing public CheckOutput and existing numeric-origin wrapper signatures retain their behavior. WorkspaceDiagnostics carries it on its private AnalysisSnapshot.
    • DocumentStore preparation uses this carrier for Rust open paths under the actual snapshot root. Unknown, missing, out-of-root and conflicting commitments yield no analyzed digest and quarantine. Remove disk/didSave fallback only on this Rust branch; explicitly preserve the current non-Rust branch. Commit remains the existing final refresh transaction, not a new engine or scheduler.

    Discriminating successor proof

    The existing actual A→B test must become GREEN, including the later signature and quarantine assertions. Add actual unchanged-A/cold-MISS→warm-HIT commitment parity using only per-invocation real producer cache stats, actual B refresh recovery, and raw BOM/invalid-UTF8/CRLF controls that distinguish the raw consumed bytes from decoded geometry. Pure carrier tests cover identical/conflicting/missing and refused path observations; real consumer tests cover absent/conflicting Rust commitments and retained non-Rust preparation. No synthetic findings establish the main producer claim.

    Source-only implementation is authorized now, but native compile/test/guards require a separate sole-target lease. Review the complete coherent source diff before publishing. Fresh candidate guards belong to the implemented head; no historical guard or RED is promoted into current GREEN.

    Rollback and non-goals

    Normally revert the private carrier/preparation connection; keep the discriminating regression and preserved receipts. No schema/cache migration, public support promotion, parser discovery, ranking, geometry repair, unsaved-buffer analysis, all-language identity, snapshot mint, scheduler atomicity repair, or release action. Parent issues remain open.

  15. EffortlessSteven commented on Oct 2, 2026

    @EffortlessSteven
    MemberAuthor

    Bounded acceptance reconciliation: #4919 is now merged by normal protected squash as f747732.

    Delivered prerequisite: saved Rust analysis carries the raw-byte commitments it actually consumed into LSP preparation. Completed A evidence is not attributed to reread B; missing/conflicting inputs remain quarantined. Admitted root aliases use the shared URI projection and a snapshot-owned unique diagnostic index, with stale-key/root refusal and retained per-document quarantine. This does not seed findings from clean open files.

    Qualification: required run37054293108 and Rust-only37054293025 passed on exact candidate99471a8e / combined e84bbe4, tree b1439c0c. Required nextest passed 10,924 tests (2 skipped), including all 40 focused controls verified in artifact11248714873; five local compiled removal controls distinguish the repair. Current policy, all-target check, strict Clippy, goldens, fixtures and PR evidence passed.

    Actual merged main is f747732, tree bf5897af374425fe940a5dfc036a56072cd8a1d5, parent d2d0d90. A normal merge-tree of that parent and the qualified candidate matches exactly. Later unrelated main changes leave the LSP/analysis trees and app/check blob identical to the qualified subject; this is applicability evidence, not a claim that the whole later main tree ran in those earlier CI jobs.

    Residual/next owner: #1765 remains open for its immutable completed-analysis identity and typed integration-failure contract, including broader input/dependency and cross-language completeness. The existing #1765 implementation lineage retains that work; #1602/#4807/#3089 are not completed by this prerequisite. No public snapshot ID, global URI normalization, new Windows alias support tier, or release-readiness claim is made. Ordinary revert remains the rollback boundary.

  16. added and removed
    status/needs-work
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/partialvscode

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions