Archive v0.4: repeat history, temporal comparison and relation graph - #19
Merged
Merged
Conversation
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.
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:
and API:
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_relationsedges whose two endpoints are both inside the public returned history.Run lineage
Run Detail now exposes public relation edges such as:
repeat_ofretry_ofreproducesderived_fromThe 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_relationsas directed graph rows. Stored edge direction, relation type and confidence are preserved rather than inferred.Database indexes
Adds migration
0006_archive_temporal_indexes.sql:runs(model_id, test_case_id, completed_at, created_at);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_ofedge, and verifies: