Skip to content

Archive v0.5: source and identity timeline - #20

Merged
WangEn merged 15 commits into
mainfrom
archive/v0.5-identity-provenance
Sep 25, 2026
Merged

WangEn merged 15 commits into
mainfrom
archive/v0.5-identity-provenance

Conversation

@WangEn

@WangEn WangEn commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Goal

Make canonical identity itself auditable over time: what an alias meant, which endpoint/API model binding was valid, which snapshot it referred to, and which source supports the claim.

Model identity provenance

GET /v1/archive/models/:modelId now includes:

  • canonical Model source summary;
  • sourced provider snapshots and Model relations;
  • alias-resolution observations resolving to the Model or one of its snapshots;
  • execution-binding history: endpoint + API model ID + optional snapshot + validity window;
  • a dedicated identity timeline for source retrieval, alias observations, binding validity and snapshot validity.

Public source summaries include citation fields only:

id, sourceType, url, title, author,
publishedAt, retrievedAt, contentSha256

source_records.metadata and alias_resolution_events.raw_observation remain private.

Test version history

GET /v1/archive/tests/:testCaseId now includes:

  • Test Family canonical source;
  • current Test Version source;
  • all versions in the same Variant that contain at least one public Test Case;
  • immutable definition hash, status, dates, license and evaluator per public-bearing version;
  • public case count;
  • a linked Test Case ID when the same case slug exists in another public version.

Database

Adds 0007_identity_provenance.sql:

  • test_versions.source_id -> source_records(id);
  • backfill from Test Family canonical source when available;
  • alias-resolution indexes by Model and Snapshot;
  • version-history index by Test Variant.

Catalog bootstrap writes version-level source provenance for new Test definitions.

UI

Model Detail gains:

  • Source & Identity Timeline;
  • canonical citation card;
  • Alias Resolution History;
  • Execution Binding History;
  • sourced snapshot/relation labels.

Test Detail gains:

  • Source Provenance cards;
  • Test Version History with immutable definition hashes and cross-version same-case links.

Verification

PostgreSQL integration seeds:

  • a public source record with a private raw_observation sentinel;
  • a canonical Model source;
  • sourced snapshot and Model relation;
  • sourced provider endpoint and execution binding;
  • alias-resolution observation;
  • two public Test Versions with the same public case slug.

Tests verify the public projections and timeline while keeping raw observation data outside the contract.

@WangEn
WangEn merged commit 59372be into main Sep 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant