Skip to content

Archive v0.4: repeat history, temporal comparison and relation graph - #19

Merged
WangEn merged 15 commits into
mainfrom
archive/v0.4-temporal-history-graph
Sep 24, 2026
Merged

WangEn merged 15 commits into
mainfrom
archive/v0.4-temporal-history-graph

Conversation

@WangEn

@WangEn WangEn commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Goal

Make time and explicit lineage first-class Archive dimensions without turning repeated results into inferred rankings or causal claims.

Repeat-run history

Adds the public route:

/history/<model-id>/<test-case-id>

and API:

GET /v1/archive/history?modelId=<UUID>&testCaseId=<UUID>&limit=<1-100>

The history projection returns the latest bounded window of sealed public Runs for the exact canonical model × exact Test Case, ordered chronologically for display.

It also returns explicit run_relations edges whose two endpoints are both inside the public returned history.

Run lineage

Run Detail now exposes public relation edges such as:

  • repeat_of
  • retry_of
  • reproduces
  • derived_from

The opposite endpoint is returned only when that related Run is also sealed and public, preventing private/unsealed Run IDs from leaking through lineage.

Temporal comparison

The existing Compare surface still begins with the latest sealed Run per selected model, then adds one temporal lane per model for the same exact Test Case.

The UI shows capture sequence, Run identity, Evidence level, returned model and deterministic Evaluation where present.

It does not calculate a winner, slope, quality trend, causal explanation or cross-Test aggregate.

Model relation graph

Model Detail now renders direct model_relations as directed graph rows. Stored edge direction, relation type and confidence are preserved rather than inferred.

Database indexes

Adds migration 0006_archive_temporal_indexes.sql:

  • partial sealed pair-history index on runs(model_id, test_case_id, completed_at, created_at);
  • incoming relation index on run_relations(to_run_id, created_at).

No historical data is mutated and no summary/cache table is introduced.

Verification

The PostgreSQL integration now creates two sealed Runs for the same model/Test pair, records an explicit repeat_of edge, and verifies:

  • chronological history;
  • explicit relation edges;
  • public Run-detail lineage;
  • updated Model/Test coverage counts;
  • latest comparison selection.

@WangEn
WangEn merged commit 1952384 into main Sep 24, 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