feat(registry): Phase 2 provenance — attributes, coverage, bad→redispatch - #80
Merged
Conversation
…atch Implements Phase 2 of REGISTRY_PROVENANCE.md on top of Phase 1's status/ supersession keystone. - Run-level attributes (run_hash slice of the tag store): set_attributes/ get_attributes/list_attribute_keys; currency-aware find_by_attribute and find_current_by_attribute (AttributeMatch). General tags facility (session/run_id/custom scopes) unchanged; run_tags store not migrated. - DiagnosticQueries read through the cell_data_current view; add _refresh_current_view() so dynamically-added variable columns stay visible (fixes a latent SELECT c.* staleness bug the repoint exposed). - Target designs: TargetDesign/Requirement/check_design/TargetCoverageReport over target_designs/target_requirements tables. Completeness asserted over attributes (superset match) against active runs only; bad/superseded surfaced but never satisfy. - bad -> re-dispatch: a bad run is reset_run'd (results cleared, status reactivated, config kept) and re-dispatched in full. reset_run (not drop_run) because the sweep pre-registers configs — an integration test caught the FK violation full-drop caused. Tests: TestTargetDesigns/TestResetRun/TestBadRunRedispatch + attribute-currency unit tests; real-jar integration for attribute currency, check_design, and a real bad->redispatch. Full suite 1225 passed; 0 net-new ruff/mypy. Docs: best-practices, project-organization (freeze regenerated), architecture, llms-full.txt, objects.json + reference pages. Version 0.0.9.25. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Aug 4, 2026
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.
Implements Phase 2 of the registry provenance model (REGISTRY_PROVENANCE.md §7, §10, §11.1, §12), building on Phase 1's
status/supersession/cell_data_currentkeystone.What's in it
1. Run-level
attributes(therun_hashslice of the tag store)tags → attributesturned out to be a whole scoped metadata subsystem (run_hash+session_id+run_id+ custom scopes), so per the agreed run-level-slice decision this renames only the run-level surface and leaves the general facility astags(therun_tagsstore is unchanged — no migration):set_attributes/get_attributes/list_attribute_keys(weretag_by_run_hash/get_tags_by_run_hash).find_by_attribute(key, value, current_only=True)andfind_current_by_attribute→AttributeMatch(run_hash, label, attributes).tag_by_session_id/tag_by_run_id/tag_custom/find_taggedkeep thetagsname.2. "Current by default" for diagnostics
DiagnosticQueriesread methods now read through thecell_data_currentview. Added_refresh_current_view()(called after dynamiccell_datacolumn additions) so theSELECT c.*view keeps up with variable columns — fixes a latent staleness bug the repoint exposed.3. Target designs — attribute-based completeness (§12)
Persisted
TargetDesign/Requirement/check_design→TargetCoverageReport, over two new tables (target_designs,target_requirements). Completeness is asserted over attributes, not run_hashes, against active runs only (superset match;bad/supersededsurfaced but never satisfy).register_design/get_design/list_designs/delete_design.4.
bad→ re-dispatch (§11.1)A run marked
badis no longer a satisfied cell: the sweepreset_runs it (clears executions/results, reactivates status, keeps the config row) and re-dispatches in full.reset_run(notdrop_run) is used because the sweep pre-registers configs — an integration test caught the FK violation that full-drop caused. The wrong-inputs case needs no code: a corrected input changes the content hash and dispatches as a fresh run.Testing
TestTargetDesigns,TestResetRun,TestBadRunRedispatch, attribute-currency tests; full suite green.test_provenance_integration.py): attribute currency,check_designover real runs, and a real bad→redispatch (drop+rerun verified freshrun_ids + active status + rows incell_data_current).Docs
best-practices,project-organization(freeze regenerated with the real jar),architecture,llms-full.txt,objects.json+ reference pages for the new classes. Version → 0.0.9.25.🤖 Generated with Claude Code