Skip to content

feat(registry): Phase 2 provenance — attributes, coverage, bad→redispatch - #80

Merged
GondekNP merged 1 commit into
mainfrom
feat/registry-provenance-phase2
Aug 4, 2026
Merged

feat(registry): Phase 2 provenance — attributes, coverage, bad→redispatch#80
GondekNP merged 1 commit into
mainfrom
feat/registry-provenance-phase2

Conversation

@GondekNP

@GondekNP GondekNP commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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_current keystone.

What's in it

1. Run-level attributes (the run_hash slice of the tag store)

tags → attributes turned 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 as tags (the run_tags store is unchanged — no migration):

  • set_attributes / get_attributes / list_attribute_keys (were tag_by_run_hash / get_tags_by_run_hash).
  • Currency-aware find_by_attribute(key, value, current_only=True) and find_current_by_attributeAttributeMatch(run_hash, label, attributes).
  • General tag_by_session_id / tag_by_run_id / tag_custom / find_tagged keep the tags name.

2. "Current by default" for diagnostics

DiagnosticQueries read methods now read through the cell_data_current view. Added _refresh_current_view() (called after dynamic cell_data column additions) so the SELECT 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_designTargetCoverageReport, over two new tables (target_designs, target_requirements). Completeness is asserted over attributes, not run_hashes, against active runs only (superset match; bad/superseded surfaced but never satisfy). register_design / get_design / list_designs / delete_design.

4. bad → re-dispatch (§11.1)

A run marked bad is no longer a satisfied cell: the sweep reset_runs it (clears executions/results, reactivates status, keeps the config row) and re-dispatches in full. reset_run (not drop_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

  • Unit: new TestTargetDesigns, TestResetRun, TestBadRunRedispatch, attribute-currency tests; full suite green.
  • Real-jar integration (test_provenance_integration.py): attribute currency, check_design over real runs, and a real bad→redispatch (drop+rerun verified fresh run_ids + active status + rows in cell_data_current).
  • 0 net new ruff/mypy.

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

…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>
@GondekNP
GondekNP merged commit c1b8041 into main Aug 4, 2026
2 checks 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