Skip to content

refactor(identity): define the governed identity registry and compatibility map #4804

Closed

Description

@EffortlessSteven

Parent/controller: #1932
Programme: #1907
Consumes delivered and existing authorities: PR #1642 / PR #1671 LspAnalysisInputIdentity; #1765 completed-analysis identity; #1617 typed command authority; and #2927 durable RepairAttemptId.
Sequence: ID01 — taxonomy and compatibility foundation only.

One-PR objective

Create one checked identity registry that names every governed RIPR identifier, its authority, semantic inputs, invalidation events, portability class, serialization surfaces, and compatibility posture.

This slice settles the vocabulary and relationship graph. It does not broadly migrate consumers or mint replacement identities for types already owned by another issue.

Registry model

Cover the applicable equivalent of:

CanonicalItemId
InstructionSemanticId
InstructionInstanceId
ActionId
EditInstructionId
AnalysisAttemptId
CompletedAnalysisSnapshotId
InputIdentity
DiagnosticResultId
ContinuationId
CommandId
RepairAttemptId
ReceiptId

For each identity retain:

canonical type/owner
portable | repository-bound | snapshot-bound | session-bound | transport-bound
semantic inputs
volatile inputs explicitly excluded
parent/child references
stability and invalidation law
allowed persistence/reuse
public/private/compatibility serialization fields
existing aliases and removal generation

Authority and compatibility rules

  • Reuse existing canonical types and algorithms where they already exist; the registry records them rather than wrapping them again.
  • RepairAttemptId is distinct from one analysis execution attempt and may span several completed snapshots.
  • A completed snapshot is distinct from scheduler generation and request order.
  • Diagnostic result and continuation IDs remain transport/budget projections, never canonical-item identity.
  • Display text, timestamps, PID, traversal order, client name, absolute checkout spelling, and Markdown do not enter semantic IDs unless a narrower accepted contract explicitly requires one.
  • Compatibility fields are read-only aliases with a named removal boundary; they grant no authority beyond the canonical field.
  • Contradictory duplicate owners fail the registry check instead of being reconciled by prose.

Required controls

  1. Every currently serialized governed *_id field has one registry disposition.
  2. Two existing fields with the same name but different meaning remain separate.
  3. Two differently named fields with the same canonical authority are recorded as canonical plus compatibility alias, not two identities.
  4. Equivalent checkout roots preserve portable identities while concrete containment evidence remains separate.
  5. Scheduler generation, timestamp, PID, client name and display formatting are rejected from portable semantic inputs.
  6. RepairAttemptId cannot be registered as an analysis-attempt or snapshot alias.
  7. Unknown new governed identity fields fail the registry check.
  8. Reordered registry entries produce byte-stable normalized JSON/Markdown.

Acceptance

  • One machine-readable registry and one generated human relationship table agree exactly.
  • Every identity in protocol(identity): separate semantic, snapshot, action, instruction, and edit instance identities across the agentic LSP #1932 has an owner, class, invalidation law and serialization posture.
  • Existing concrete authorities are reused and competing wrappers are visible.
  • Compatibility aliases have explicit schema/removal generations.
  • The registry can be consumed by later compile-time migrations and conformance checks without parsing prose.
  • No product actionability, currentness, transport behavior or support claim changes in this PR.

Landed: PR #4869 squash 3780480cd84ff109c5cdebdbf80813d6b85c97be (RIPR-SPEC-0182).

Proof

cargo test -p ripr --lib identity -- --nocapture
cargo test -p xtask identity_registry -- --nocapture
cargo xtask check-output-contracts
cargo xtask check-fixture-contracts
cargo xtask check-traceability
cargo xtask check-doc-artifacts
cargo xtask precommit
git diff --check

Use the actual accepted command names. The registry check must be network-free and deterministic.

Non-goals

Claim boundary

Completion establishes the governed identity vocabulary and migration map. It does not prove that every consumer has migrated or that any identity-bearing operation is correct.

Activity

  1. added
    vscode
    status/needs-work
    on Sep 29, 2026
  2. EffortlessSteven commented on Sep 29, 2026

    @EffortlessSteven
    MemberAuthor

    Current proposition on origin/main (f6aa0ab8cbfdf0945a9d3cacc5c6014e646f7ef9, 2026-09-29):

    Original claim has not landed. Next: one focused PR that records those existing authorities, adds discriminating edge-case tests, and modularizes the registry/checker around that proof.

  3. EffortlessSteven commented on Sep 29, 2026

    @EffortlessSteven
    MemberAuthor

    Current truth after merging origin/main (1b133c68d) into PR #4869:

  4. EffortlessSteven commented on Sep 29, 2026

    @EffortlessSteven
    MemberAuthor

    Acceptance for ID01 is complete on origin/main.

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/needs-workvscode

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions