viva-discovery-engine 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- viva_discovery_engine-0.1.0/.github/workflows/downstream.yml +67 -0
- viva_discovery_engine-0.1.0/.github/workflows/release.yml +67 -0
- viva_discovery_engine-0.1.0/.github/workflows/test.yml +33 -0
- viva_discovery_engine-0.1.0/.gitignore +16 -0
- viva_discovery_engine-0.1.0/LICENSE +202 -0
- viva_discovery_engine-0.1.0/PKG-INFO +199 -0
- viva_discovery_engine-0.1.0/README.md +167 -0
- viva_discovery_engine-0.1.0/discovery_engine/__init__.py +75 -0
- viva_discovery_engine-0.1.0/discovery_engine/_resources.py +31 -0
- viva_discovery_engine-0.1.0/discovery_engine/argument_store.py +261 -0
- viva_discovery_engine-0.1.0/discovery_engine/band_provenance.py +324 -0
- viva_discovery_engine-0.1.0/discovery_engine/bibtex.py +95 -0
- viva_discovery_engine-0.1.0/discovery_engine/candidate_action.py +140 -0
- viva_discovery_engine-0.1.0/discovery_engine/capability_gaps.py +306 -0
- viva_discovery_engine-0.1.0/discovery_engine/card_criteria.py +518 -0
- viva_discovery_engine-0.1.0/discovery_engine/card_grade.py +187 -0
- viva_discovery_engine-0.1.0/discovery_engine/composite_spec.py +151 -0
- viva_discovery_engine-0.1.0/discovery_engine/core_introspection.py +6 -0
- viva_discovery_engine-0.1.0/discovery_engine/discover.py +3150 -0
- viva_discovery_engine-0.1.0/discovery_engine/discovery_engine.py +764 -0
- viva_discovery_engine-0.1.0/discovery_engine/evaluation.py +318 -0
- viva_discovery_engine-0.1.0/discovery_engine/evidence_integrity.py +295 -0
- viva_discovery_engine-0.1.0/discovery_engine/experiment_design.py +197 -0
- viva_discovery_engine-0.1.0/discovery_engine/feedback_compiler.py +507 -0
- viva_discovery_engine-0.1.0/discovery_engine/finding_observations.py +455 -0
- viva_discovery_engine-0.1.0/discovery_engine/grader_freshness.py +64 -0
- viva_discovery_engine-0.1.0/discovery_engine/hypotheses.py +616 -0
- viva_discovery_engine-0.1.0/discovery_engine/imports.py +65 -0
- viva_discovery_engine-0.1.0/discovery_engine/integration/__init__.py +7 -0
- viva_discovery_engine-0.1.0/discovery_engine/integration/scaffold.py +1319 -0
- viva_discovery_engine-0.1.0/discovery_engine/integration/server_preflight.py +161 -0
- viva_discovery_engine-0.1.0/discovery_engine/integration/workspace_catalog.py +434 -0
- viva_discovery_engine-0.1.0/discovery_engine/investigation_canonicalize.py +73 -0
- viva_discovery_engine-0.1.0/discovery_engine/investigation_close.py +659 -0
- viva_discovery_engine-0.1.0/discovery_engine/investigation_import.py +1024 -0
- viva_discovery_engine-0.1.0/discovery_engine/investigation_inputs.py +34 -0
- viva_discovery_engine-0.1.0/discovery_engine/investigation_ops.py +158 -0
- viva_discovery_engine-0.1.0/discovery_engine/investigation_reconcile.py +287 -0
- viva_discovery_engine-0.1.0/discovery_engine/investigation_status.py +252 -0
- viva_discovery_engine-0.1.0/discovery_engine/knowledge_store.py +252 -0
- viva_discovery_engine-0.1.0/discovery_engine/migrate_fs.py +17 -0
- viva_discovery_engine-0.1.0/discovery_engine/migrate_inputs.py +175 -0
- viva_discovery_engine-0.1.0/discovery_engine/migrate_nested.py +122 -0
- viva_discovery_engine-0.1.0/discovery_engine/model_architect.py +333 -0
- viva_discovery_engine-0.1.0/discovery_engine/model_revision.py +234 -0
- viva_discovery_engine-0.1.0/discovery_engine/narrative.py +204 -0
- viva_discovery_engine-0.1.0/discovery_engine/narrative_freshness.py +175 -0
- viva_discovery_engine-0.1.0/discovery_engine/paths.py +141 -0
- viva_discovery_engine-0.1.0/discovery_engine/post_sim.py +741 -0
- viva_discovery_engine-0.1.0/discovery_engine/py.typed +0 -0
- viva_discovery_engine-0.1.0/discovery_engine/readout_migration.py +372 -0
- viva_discovery_engine-0.1.0/discovery_engine/readout_resolver.py +416 -0
- viva_discovery_engine-0.1.0/discovery_engine/relations.py +77 -0
- viva_discovery_engine-0.1.0/discovery_engine/report.py +311 -0
- viva_discovery_engine-0.1.0/discovery_engine/report_linter.py +4570 -0
- viva_discovery_engine-0.1.0/discovery_engine/resolution.py +113 -0
- viva_discovery_engine-0.1.0/discovery_engine/rigor.py +1729 -0
- viva_discovery_engine-0.1.0/discovery_engine/run_command.py +59 -0
- viva_discovery_engine-0.1.0/discovery_engine/run_observables.py +101 -0
- viva_discovery_engine-0.1.0/discovery_engine/run_registry.py +287 -0
- viva_discovery_engine-0.1.0/discovery_engine/scaffold.py +9 -0
- viva_discovery_engine-0.1.0/discovery_engine/schemas/composite-spec.schema.json +31 -0
- viva_discovery_engine-0.1.0/discovery_engine/schemas/discovery-request.schema.json +49 -0
- viva_discovery_engine-0.1.0/discovery_engine/schemas/investigation-extensions.schema.json +122 -0
- viva_discovery_engine-0.1.0/discovery_engine/schemas/reopening-feedback.schema.json +142 -0
- viva_discovery_engine-0.1.0/discovery_engine/schemas/workspace.schema.json +302 -0
- viva_discovery_engine-0.1.0/discovery_engine/seed_from_followup.py +1024 -0
- viva_discovery_engine-0.1.0/discovery_engine/server_preflight.py +9 -0
- viva_discovery_engine-0.1.0/discovery_engine/simulation_set.py +351 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_audit.py +1094 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_canonicalize.py +231 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_contract.py +85 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_evaluator.py +2210 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_io.py +106 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_observable_lint.py +50 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_outcomes.py +302 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_refinement.py +147 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_seeding.py +138 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_status.py +338 -0
- viva_discovery_engine-0.1.0/discovery_engine/study_verdict.py +788 -0
- viva_discovery_engine-0.1.0/discovery_engine/synthesis.py +107 -0
- viva_discovery_engine-0.1.0/discovery_engine/test_contract.py +167 -0
- viva_discovery_engine-0.1.0/discovery_engine/test_diff.py +63 -0
- viva_discovery_engine-0.1.0/discovery_engine/test_vocab.py +64 -0
- viva_discovery_engine-0.1.0/discovery_engine/text_utils.py +27 -0
- viva_discovery_engine-0.1.0/discovery_engine/validation.py +603 -0
- viva_discovery_engine-0.1.0/discovery_engine/viz_appropriateness.py +176 -0
- viva_discovery_engine-0.1.0/discovery_engine/viz_freshness.py +160 -0
- viva_discovery_engine-0.1.0/discovery_engine/viz_proposals.py +162 -0
- viva_discovery_engine-0.1.0/discovery_engine/workspace_catalog.py +9 -0
- viva_discovery_engine-0.1.0/discovery_engine/workspace_lint.py +170 -0
- viva_discovery_engine-0.1.0/discovery_engine/workspace_paths.py +44 -0
- viva_discovery_engine-0.1.0/discovery_engine/workspace_yaml.py +34 -0
- viva_discovery_engine-0.1.0/docs/architecture.md +200 -0
- viva_discovery_engine-0.1.0/docs/discovery-engine-cycle.png +0 -0
- viva_discovery_engine-0.1.0/docs/extracted/test_transition_model.py +51 -0
- viva_discovery_engine-0.1.0/docs/extracted/transition_cli.py +31 -0
- viva_discovery_engine-0.1.0/docs/extracted/transition_model.py +119 -0
- viva_discovery_engine-0.1.0/docs/release-and-version-coordination.md +116 -0
- viva_discovery_engine-0.1.0/docs/roadmap.md +98 -0
- viva_discovery_engine-0.1.0/docs/superpowers/plans/2026-10-30-closed-loop-discovery-upgrade.md +323 -0
- viva_discovery_engine-0.1.0/docs/superpowers/plans/2026-10-31-viz-appropriateness.md +48 -0
- viva_discovery_engine-0.1.0/docs/superpowers/plans/2026-10-31-viz-loop.md +105 -0
- viva_discovery_engine-0.1.0/docs/superpowers/specs/2026-10-30-closed-loop-upgrade-decision.md +359 -0
- viva_discovery_engine-0.1.0/docs/superpowers/specs/2026-10-31-viz-loop-decision.md +354 -0
- viva_discovery_engine-0.1.0/docs/superpowers/specs/2026-11-01-unified-graded-test-ontology.md +178 -0
- viva_discovery_engine-0.1.0/pyproject.toml +77 -0
- viva_discovery_engine-0.1.0/templates/_assets/render-helpers.js +30 -0
- viva_discovery_engine-0.1.0/templates/_assets/style.css +31 -0
- viva_discovery_engine-0.1.0/templates/model/.github/workflows/model-ci.yml +24 -0
- viva_discovery_engine-0.1.0/templates/model/.gitignore +5 -0
- viva_discovery_engine-0.1.0/templates/model/README.md.j2 +20 -0
- viva_discovery_engine-0.1.0/templates/model/pyproject.toml.j2 +19 -0
- viva_discovery_engine-0.1.0/templates/model/reports/assets/.keep +0 -0
- viva_discovery_engine-0.1.0/templates/model/reports/index.html.j2 +35 -0
- viva_discovery_engine-0.1.0/templates/model/tests/__init__.py +0 -0
- viva_discovery_engine-0.1.0/templates/model/tests/registry-snapshot.json.j2 +1 -0
- viva_discovery_engine-0.1.0/templates/model/tests/test_adapters.py +1 -0
- viva_discovery_engine-0.1.0/templates/model/tests/test_assembly.py.j2 +6 -0
- viva_discovery_engine-0.1.0/templates/model/tests/test_core_integration.py.j2 +72 -0
- viva_discovery_engine-0.1.0/templates/model/tests/test_run.py.j2 +1 -0
- viva_discovery_engine-0.1.0/templates/model/viva__model__/__init__.py.j2 +1 -0
- viva_discovery_engine-0.1.0/templates/model/viva__model__/adapters.py +1 -0
- viva_discovery_engine-0.1.0/templates/model/viva__model__/core.py.j2 +29 -0
- viva_discovery_engine-0.1.0/templates/model/viva__model__/document.py.j2 +7 -0
- viva_discovery_engine-0.1.0/templates/model/viva__model__/stubs.py +1 -0
- viva_discovery_engine-0.1.0/templates/model/viva__model__/types.py +1 -0
- viva_discovery_engine-0.1.0/templates/model/viva__model__/wiring.py.j2 +2 -0
- viva_discovery_engine-0.1.0/templates/workspace/reports/_finding_row.html.j2 +23 -0
- viva_discovery_engine-0.1.0/templates/workspace/reports/findings_index.html.j2 +178 -0
- viva_discovery_engine-0.1.0/templates/workspace/reports/index.html.j2 +30 -0
- viva_discovery_engine-0.1.0/tests/fixtures/.keep +0 -0
- viva_discovery_engine-0.1.0/tests/fixtures/composites/baseline.composite.json +50 -0
- viva_discovery_engine-0.1.0/tests/fixtures/composites/baseline.composite.yaml +37 -0
- viva_discovery_engine-0.1.0/tests/fixtures/fake_generator_pkg/fake_generator_pkg/__init__.py +1 -0
- viva_discovery_engine-0.1.0/tests/fixtures/fake_generator_pkg/fake_generator_pkg/composites.py +10 -0
- viva_discovery_engine-0.1.0/tests/fixtures/fake_generator_pkg/pyproject.toml +12 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/band-test-missing-cites/references/papers.bib +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/band-test-missing-cites/studies/study-band-no-cites/study.yaml +64 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/band-test-missing-cites/studies/study-band-with-cites/study.yaml +27 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/band-test-missing-cites/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/band-test-unknown-bib/references/papers.bib +11 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/band-test-unknown-bib/studies/study-bad-cites/study.yaml +55 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/band-test-unknown-bib/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/claims-done-no-runs/studies/study-claims-no-runs/study.yaml +11 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/claims-done-no-runs/studies/study-claims-with-runs/study.yaml +14 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/claims-done-no-runs/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/clean-baseline/studies/study-clean/study.yaml +63 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/clean-baseline/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/dag-edges-both-agree/studies/agree/study.yaml +12 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/dag-edges-both-agree/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/dag-edges-both-conflict/studies/conflict/study.yaml +10 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/dag-edges-both-conflict/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/dag-edges-legacy-only/studies/legacy/study.yaml +8 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/dag-edges-legacy-only/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/decide-missing-findings/studies/study-decide/study.yaml +15 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/decide-missing-findings/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/duplicate-modal/studies/study-dupe/study.yaml +11 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/duplicate-modal/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/finding-no-evidence/studies/study-evid/study.yaml +29 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/finding-no-evidence/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/finding-unknown-bib/references/papers.bib +11 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/finding-unknown-bib/studies/study-bib/study.yaml +21 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/finding-unknown-bib/workspace.yaml +6 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/finding-unknown-expert/studies/study-expert/study.yaml +23 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/finding-unknown-expert/workspace.yaml +8 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/incomplete-summary/studies/study-incomplete/study.yaml +28 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/incomplete-summary/studies/study-incomplete/viz/chart.html +1 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/incomplete-summary/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/machine-projected-tests/studies/study-slop/study.yaml +32 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/machine-projected-tests/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/missing-provenance/studies/study-prov/study.yaml +21 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/missing-provenance/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/readout-migration-status/studies/legacy-readouts/study.yaml +23 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/readout-migration-status/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/reviewer-clarity/studies/study-ran-no-outcomes/study.yaml +21 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/reviewer-clarity/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/runs-yaml-drift-missing-db/studies/drift/study.yaml +8 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/runs-yaml-drift-missing-db/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/runs-yaml-redundant/studies/redundant/study.yaml +9 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/runs-yaml-redundant/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/speculative-readout-paths/studies/study-x/study.yaml +28 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/speculative-readout-paths/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/status-contradictions/studies/study-contradict/study.yaml +7 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/status-contradictions/studies/study-impl-running/study.yaml +7 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/status-contradictions/studies/study-review-blocked/study.yaml +7 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/status-contradictions/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/status-legacy-only/studies/legacy-status/study.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/status-legacy-only/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/truncated-takeaway/studies/study-trunc/study.yaml +8 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/truncated-takeaway/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/unresolved-placeholders/studies/study-tbd/study.yaml +10 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/unresolved-placeholders/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-address-missing/studies/study-viz/study.yaml +10 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-address-missing/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-address-resolved/pkg/visualizations/dnaa_state.py +12 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-address-resolved/pkg/visualizations/factories.py +14 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-address-resolved/studies/study-viz/study.yaml +13 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-address-resolved/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-address-unresolved/studies/study-viz/study.yaml +15 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-address-unresolved/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-class-misplaced/pkg/__init__.py +0 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-class-misplaced/pkg/viz_misplaced.py +14 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-class-misplaced/studies/study-viz/study.yaml +7 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-class-misplaced/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-path-not-canonical/studies/study-viz/study.yaml +14 -0
- viva_discovery_engine-0.1.0/tests/fixtures/lint-cases/viz-path-not-canonical/workspace.yaml +5 -0
- viva_discovery_engine-0.1.0/tests/fixtures/pbg-fake-tool/pbg_fake_tool/__init__.py +6 -0
- viva_discovery_engine-0.1.0/tests/fixtures/pbg-fake-tool/pbg_fake_tool/processes.py +23 -0
- viva_discovery_engine-0.1.0/tests/fixtures/pbg-fake-tool/pyproject.toml +11 -0
- viva_discovery_engine-0.1.0/tests/fixtures/pbg-fake-tool/tests/test_fake.py +6 -0
- viva_discovery_engine-0.1.0/tests/fixtures/workspace-baseline/MANIFEST.txt +55 -0
- viva_discovery_engine-0.1.0/tests/fixtures/workspace-baseline/PBG_TEMPLATE_REF +1 -0
- viva_discovery_engine-0.1.0/tests/test_advance_revision.py +186 -0
- viva_discovery_engine-0.1.0/tests/test_apply_revision.py +165 -0
- viva_discovery_engine-0.1.0/tests/test_argument_store.py +231 -0
- viva_discovery_engine-0.1.0/tests/test_band_detector_reconciliation.py +146 -0
- viva_discovery_engine-0.1.0/tests/test_band_provenance.py +415 -0
- viva_discovery_engine-0.1.0/tests/test_bare_string_measure_g1.py +46 -0
- viva_discovery_engine-0.1.0/tests/test_bare_string_measure_g2.py +72 -0
- viva_discovery_engine-0.1.0/tests/test_bibtex.py +50 -0
- viva_discovery_engine-0.1.0/tests/test_candidate_action.py +72 -0
- viva_discovery_engine-0.1.0/tests/test_canonical_run.py +17 -0
- viva_discovery_engine-0.1.0/tests/test_capability_gap_two_cycle.py +242 -0
- viva_discovery_engine-0.1.0/tests/test_capability_gap_wiring.py +202 -0
- viva_discovery_engine-0.1.0/tests/test_capability_gaps.py +283 -0
- viva_discovery_engine-0.1.0/tests/test_closed_loop_two_cycle.py +224 -0
- viva_discovery_engine-0.1.0/tests/test_composite_revision_pipeline.py +66 -0
- viva_discovery_engine-0.1.0/tests/test_computed_outcomes.py +511 -0
- viva_discovery_engine-0.1.0/tests/test_contract_unit_reconcile.py +42 -0
- viva_discovery_engine-0.1.0/tests/test_core_import_isolation.py +41 -0
- viva_discovery_engine-0.1.0/tests/test_derived_scalar_eval.py +74 -0
- viva_discovery_engine-0.1.0/tests/test_derived_scalar_registry.py +49 -0
- viva_discovery_engine-0.1.0/tests/test_discover.py +679 -0
- viva_discovery_engine-0.1.0/tests/test_discover_inputs.py +43 -0
- viva_discovery_engine-0.1.0/tests/test_discovery_engine.py +478 -0
- viva_discovery_engine-0.1.0/tests/test_evaluation.py +250 -0
- viva_discovery_engine-0.1.0/tests/test_evaluator_nan_join_fixes.py +75 -0
- viva_discovery_engine-0.1.0/tests/test_evaluator_structural_ops.py +74 -0
- viva_discovery_engine-0.1.0/tests/test_evidence_integrity.py +144 -0
- viva_discovery_engine-0.1.0/tests/test_experiment_design.py +59 -0
- viva_discovery_engine-0.1.0/tests/test_failure_modes.py +27 -0
- viva_discovery_engine-0.1.0/tests/test_feedback_compiler.py +294 -0
- viva_discovery_engine-0.1.0/tests/test_finding_observations.py +1119 -0
- viva_discovery_engine-0.1.0/tests/test_findings_report.py +386 -0
- viva_discovery_engine-0.1.0/tests/test_formula_measure.py +42 -0
- viva_discovery_engine-0.1.0/tests/test_frontier_calibrated_run.py +41 -0
- viva_discovery_engine-0.1.0/tests/test_frontier_revision.py +159 -0
- viva_discovery_engine-0.1.0/tests/test_generality_registries.py +50 -0
- viva_discovery_engine-0.1.0/tests/test_generative_loop.py +76 -0
- viva_discovery_engine-0.1.0/tests/test_graded_outcomes.py +75 -0
- viva_discovery_engine-0.1.0/tests/test_grader_freshness_phase2.py +147 -0
- viva_discovery_engine-0.1.0/tests/test_grading_axis.py +146 -0
- viva_discovery_engine-0.1.0/tests/test_hedged_verdict_lint.py +57 -0
- viva_discovery_engine-0.1.0/tests/test_hypotheses_discrimination.py +185 -0
- viva_discovery_engine-0.1.0/tests/test_imports.py +87 -0
- viva_discovery_engine-0.1.0/tests/test_investigation_canonicalize.py +39 -0
- viva_discovery_engine-0.1.0/tests/test_investigation_close.py +259 -0
- viva_discovery_engine-0.1.0/tests/test_investigation_import.py +460 -0
- viva_discovery_engine-0.1.0/tests/test_investigation_inputs.py +34 -0
- viva_discovery_engine-0.1.0/tests/test_investigation_ops.py +217 -0
- viva_discovery_engine-0.1.0/tests/test_investigation_reconcile.py +184 -0
- viva_discovery_engine-0.1.0/tests/test_investigation_status.py +341 -0
- viva_discovery_engine-0.1.0/tests/test_knowledge_store.py +261 -0
- viva_discovery_engine-0.1.0/tests/test_load_cycle_inputs_scope.py +85 -0
- viva_discovery_engine-0.1.0/tests/test_materialize_design.py +46 -0
- viva_discovery_engine-0.1.0/tests/test_model_architect.py +149 -0
- viva_discovery_engine-0.1.0/tests/test_model_binding.py +92 -0
- viva_discovery_engine-0.1.0/tests/test_model_revision.py +228 -0
- viva_discovery_engine-0.1.0/tests/test_narrative.py +132 -0
- viva_discovery_engine-0.1.0/tests/test_narrative_freshness.py +161 -0
- viva_discovery_engine-0.1.0/tests/test_narrative_freshness_acceptance.py +104 -0
- viva_discovery_engine-0.1.0/tests/test_narrative_freshness_wiring.py +122 -0
- viva_discovery_engine-0.1.0/tests/test_no_domain_coupling.py +41 -0
- viva_discovery_engine-0.1.0/tests/test_no_workbench_import.py +40 -0
- viva_discovery_engine-0.1.0/tests/test_paths.py +87 -0
- viva_discovery_engine-0.1.0/tests/test_persist_cycle.py +81 -0
- viva_discovery_engine-0.1.0/tests/test_post_run_links_findings.py +25 -0
- viva_discovery_engine-0.1.0/tests/test_post_sim_family.py +270 -0
- viva_discovery_engine-0.1.0/tests/test_readout_contract_lint.py +120 -0
- viva_discovery_engine-0.1.0/tests/test_readout_resolver.py +622 -0
- viva_discovery_engine-0.1.0/tests/test_registered_run_contract_g3.py +46 -0
- viva_discovery_engine-0.1.0/tests/test_relations.py +68 -0
- viva_discovery_engine-0.1.0/tests/test_report_linter.py +1546 -0
- viva_discovery_engine-0.1.0/tests/test_report_linter_baseline_config_carry.py +214 -0
- viva_discovery_engine-0.1.0/tests/test_report_linter_campaign_quality_bar.py +250 -0
- viva_discovery_engine-0.1.0/tests/test_report_linter_contract_observables.py +49 -0
- viva_discovery_engine-0.1.0/tests/test_report_linter_narrative.py +229 -0
- viva_discovery_engine-0.1.0/tests/test_report_linter_render_guarantee.py +84 -0
- viva_discovery_engine-0.1.0/tests/test_report_linter_review_checks.py +457 -0
- viva_discovery_engine-0.1.0/tests/test_report_linter_viz_gate.py +84 -0
- viva_discovery_engine-0.1.0/tests/test_resolution.py +136 -0
- viva_discovery_engine-0.1.0/tests/test_results_step.py +245 -0
- viva_discovery_engine-0.1.0/tests/test_revise_cli.py +155 -0
- viva_discovery_engine-0.1.0/tests/test_rigor.py +685 -0
- viva_discovery_engine-0.1.0/tests/test_rigor_review_dims.py +243 -0
- viva_discovery_engine-0.1.0/tests/test_run_command_template.py +28 -0
- viva_discovery_engine-0.1.0/tests/test_run_observables.py +61 -0
- viva_discovery_engine-0.1.0/tests/test_run_registry.py +159 -0
- viva_discovery_engine-0.1.0/tests/test_run_registry_list.py +17 -0
- viva_discovery_engine-0.1.0/tests/test_runner_worktree_g5.py +53 -0
- viva_discovery_engine-0.1.0/tests/test_scaffold_requires_python.py +71 -0
- viva_discovery_engine-0.1.0/tests/test_seed_from_followup.py +788 -0
- viva_discovery_engine-0.1.0/tests/test_server_preflight.py +117 -0
- viva_discovery_engine-0.1.0/tests/test_severity_gate.py +58 -0
- viva_discovery_engine-0.1.0/tests/test_sig6_small_magnitude.py +14 -0
- viva_discovery_engine-0.1.0/tests/test_simulation_set.py +469 -0
- viva_discovery_engine-0.1.0/tests/test_storeless_grading.py +203 -0
- viva_discovery_engine-0.1.0/tests/test_study_audit.py +715 -0
- viva_discovery_engine-0.1.0/tests/test_study_audit_prereg.py +50 -0
- viva_discovery_engine-0.1.0/tests/test_study_audit_provenance.py +72 -0
- viva_discovery_engine-0.1.0/tests/test_study_audit_regrade.py +148 -0
- viva_discovery_engine-0.1.0/tests/test_study_audit_schema_gate.py +130 -0
- viva_discovery_engine-0.1.0/tests/test_study_canonicalize.py +282 -0
- viva_discovery_engine-0.1.0/tests/test_study_contract.py +48 -0
- viva_discovery_engine-0.1.0/tests/test_study_evaluator.py +769 -0
- viva_discovery_engine-0.1.0/tests/test_study_evaluator_config_selection.py +137 -0
- viva_discovery_engine-0.1.0/tests/test_study_evaluator_cross_run.py +177 -0
- viva_discovery_engine-0.1.0/tests/test_study_evaluator_store.py +60 -0
- viva_discovery_engine-0.1.0/tests/test_study_evaluator_via_readouts.py +364 -0
- viva_discovery_engine-0.1.0/tests/test_study_io_cache.py +54 -0
- viva_discovery_engine-0.1.0/tests/test_study_observable_lint.py +45 -0
- viva_discovery_engine-0.1.0/tests/test_study_outcomes.py +233 -0
- viva_discovery_engine-0.1.0/tests/test_study_outcomes_cli.py +33 -0
- viva_discovery_engine-0.1.0/tests/test_study_outcomes_sync.py +313 -0
- viva_discovery_engine-0.1.0/tests/test_study_refinement.py +70 -0
- viva_discovery_engine-0.1.0/tests/test_study_seeding.py +63 -0
- viva_discovery_engine-0.1.0/tests/test_study_status.py +168 -0
- viva_discovery_engine-0.1.0/tests/test_study_verdict.py +418 -0
- viva_discovery_engine-0.1.0/tests/test_study_verdict_gate_class.py +206 -0
- viva_discovery_engine-0.1.0/tests/test_supporting_finding_planned.py +27 -0
- viva_discovery_engine-0.1.0/tests/test_synthesis.py +94 -0
- viva_discovery_engine-0.1.0/tests/test_test_builder.py +25 -0
- viva_discovery_engine-0.1.0/tests/test_test_contract.py +50 -0
- viva_discovery_engine-0.1.0/tests/test_test_diff.py +45 -0
- viva_discovery_engine-0.1.0/tests/test_test_report_step.py +65 -0
- viva_discovery_engine-0.1.0/tests/test_test_vocab.py +42 -0
- viva_discovery_engine-0.1.0/tests/test_validation.py +337 -0
- viva_discovery_engine-0.1.0/tests/test_verdict_count_split.py +24 -0
- viva_discovery_engine-0.1.0/tests/test_viz_appropriateness.py +277 -0
- viva_discovery_engine-0.1.0/tests/test_viz_appropriateness_acceptance.py +143 -0
- viva_discovery_engine-0.1.0/tests/test_viz_appropriateness_frontier.py +117 -0
- viva_discovery_engine-0.1.0/tests/test_viz_freshness.py +72 -0
- viva_discovery_engine-0.1.0/tests/test_viz_frontier.py +113 -0
- viva_discovery_engine-0.1.0/tests/test_viz_inventory.py +52 -0
- viva_discovery_engine-0.1.0/tests/test_viz_loop_two_cycle.py +124 -0
- viva_discovery_engine-0.1.0/tests/test_viz_normalize_classify.py +128 -0
- viva_discovery_engine-0.1.0/tests/test_viz_proposals.py +297 -0
- viva_discovery_engine-0.1.0/tests/test_viz_render_advance.py +239 -0
- viva_discovery_engine-0.1.0/tests/test_wave3b.py +297 -0
- viva_discovery_engine-0.1.0/tests/test_workspace_catalog.py +432 -0
- viva_discovery_engine-0.1.0/tests/test_workspace_evaluators.py +173 -0
- viva_discovery_engine-0.1.0/tests/test_workspace_lint.py +77 -0
- viva_discovery_engine-0.1.0/tests/test_workspace_paths_nested.py +55 -0
- viva_discovery_engine-0.1.0/tests/test_workspace_yaml_io.py +43 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: downstream
|
|
2
|
+
|
|
3
|
+
# The "in sync" guard: before a change to the engine lands (or releases), prove it
|
|
4
|
+
# still satisfies its primary consumer's contract. viva-superpowers is a facade of
|
|
5
|
+
# back-compat shims over discovery_engine — its tests/test_discovery_engine_facade.py
|
|
6
|
+
# asserts viva_superpowers.<m> IS discovery_engine.<m> across the whole shim set. We
|
|
7
|
+
# install viva-superpowers against THIS discovery-engine (not the pinned one) and run
|
|
8
|
+
# that contract, so a breaking change here is caught before it propagates downstream.
|
|
9
|
+
#
|
|
10
|
+
# Cross-repo checkout needs a token with read access to viva-superpowers. Set a repo
|
|
11
|
+
# secret DOWNSTREAM_TOKEN (a PAT or a fine-grained token scoped to the consumer repos);
|
|
12
|
+
# until it is set, this job skips cleanly (stays green) rather than failing.
|
|
13
|
+
on:
|
|
14
|
+
pull_request:
|
|
15
|
+
push:
|
|
16
|
+
branches: [main]
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: downstream-${{ github.ref }}
|
|
20
|
+
cancel-in-progress: true
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
facade:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- name: Is the downstream token configured?
|
|
27
|
+
id: tok
|
|
28
|
+
run: echo "has=${{ secrets.DOWNSTREAM_TOKEN != '' }}" >> "$GITHUB_OUTPUT"
|
|
29
|
+
|
|
30
|
+
- name: Checkout discovery-engine (this ref)
|
|
31
|
+
if: steps.tok.outputs.has == 'true'
|
|
32
|
+
uses: actions/checkout@v4
|
|
33
|
+
with:
|
|
34
|
+
path: discovery-engine
|
|
35
|
+
|
|
36
|
+
- name: Checkout viva-superpowers (main)
|
|
37
|
+
if: steps.tok.outputs.has == 'true'
|
|
38
|
+
uses: actions/checkout@v4
|
|
39
|
+
with:
|
|
40
|
+
repository: vivarium-collective/viva-superpowers
|
|
41
|
+
ref: main
|
|
42
|
+
token: ${{ secrets.DOWNSTREAM_TOKEN }}
|
|
43
|
+
path: viva-superpowers
|
|
44
|
+
|
|
45
|
+
- name: Install uv
|
|
46
|
+
if: steps.tok.outputs.has == 'true'
|
|
47
|
+
uses: astral-sh/setup-uv@v5
|
|
48
|
+
|
|
49
|
+
- name: Set up Python
|
|
50
|
+
if: steps.tok.outputs.has == 'true'
|
|
51
|
+
run: uv python install 3.12
|
|
52
|
+
|
|
53
|
+
- name: Install viva-superpowers, then override discovery-engine with THIS ref
|
|
54
|
+
if: steps.tok.outputs.has == 'true'
|
|
55
|
+
run: |
|
|
56
|
+
uv venv
|
|
57
|
+
uv pip install -e ./viva-superpowers pytest
|
|
58
|
+
# editable local engine shadows the git-pinned one (same dist name)
|
|
59
|
+
uv pip install -e ./discovery-engine
|
|
60
|
+
|
|
61
|
+
- name: Run the shim-facade contract against this discovery-engine
|
|
62
|
+
if: steps.tok.outputs.has == 'true'
|
|
63
|
+
run: uv run python -m pytest -q viva-superpowers/tests/test_discovery_engine_facade.py
|
|
64
|
+
|
|
65
|
+
- name: Note when skipped
|
|
66
|
+
if: steps.tok.outputs.has != 'true'
|
|
67
|
+
run: echo "DOWNSTREAM_TOKEN not set — skipping the downstream facade check. Add the secret to enable it."
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
# Cut a release whenever a semver tag is pushed. This turns the engine's
|
|
4
|
+
# `branch=main` consumption into tagged, PyPI-published releases, so consumers can
|
|
5
|
+
# pin a VERSION (`discovery-engine>=X.Y`) instead of a moving branch or a git commit
|
|
6
|
+
# — the foundation of keeping the repos decoupled but reproducibly in sync.
|
|
7
|
+
#
|
|
8
|
+
# discovery-engine is the one core package still unpublished (v0.1.0, git `branch=main`
|
|
9
|
+
# only): every consumer is forced onto `branch=main` for it, which cascades the whole
|
|
10
|
+
# git-main dependency chain and the silent drift. Publishing it to PyPI (like
|
|
11
|
+
# bigraph-schema / process-bigraph / viva-superpowers already do) lets consumers pin
|
|
12
|
+
# semver and lets GitHub users `pip install` a coherent released set.
|
|
13
|
+
#
|
|
14
|
+
# Trusted publishing (OIDC) — no stored token. Requires a one-time PyPI setup:
|
|
15
|
+
# register the `discovery-engine` project and add this repo + workflow + the `release`
|
|
16
|
+
# environment as a trusted publisher (https://docs.pypi.org/trusted-publishers/).
|
|
17
|
+
on:
|
|
18
|
+
push:
|
|
19
|
+
tags: ["v*"]
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
publish:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
environment: release
|
|
28
|
+
permissions:
|
|
29
|
+
id-token: write # required for OIDC trusted publishing
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
|
|
33
|
+
- name: Set up uv and Python
|
|
34
|
+
uses: astral-sh/setup-uv@v5
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.12"
|
|
37
|
+
enable-cache: true
|
|
38
|
+
cache-dependency-glob: "**/uv.lock"
|
|
39
|
+
|
|
40
|
+
- name: Verify the tag matches pyproject version
|
|
41
|
+
run: |
|
|
42
|
+
tag_version="${GITHUB_REF_NAME#v}"
|
|
43
|
+
pyproject_version=$(uv version --short)
|
|
44
|
+
if [ "$tag_version" != "$pyproject_version" ]; then
|
|
45
|
+
echo "Tag ($tag_version) != pyproject.toml version ($pyproject_version)"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
- name: Build distributions
|
|
50
|
+
run: uv build
|
|
51
|
+
|
|
52
|
+
- name: Publish to PyPI via trusted publisher
|
|
53
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
54
|
+
|
|
55
|
+
github-release:
|
|
56
|
+
needs: publish
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
permissions:
|
|
59
|
+
contents: write
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
with:
|
|
63
|
+
fetch-depth: 0
|
|
64
|
+
- name: Create the GitHub Release
|
|
65
|
+
env:
|
|
66
|
+
GH_TOKEN: ${{ github.token }}
|
|
67
|
+
run: gh release create "${{ github.ref_name }}" --generate-notes --verify-tag
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: test-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v5
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
run: uv python install 3.12
|
|
23
|
+
|
|
24
|
+
- name: Create venv + install (with dev extras)
|
|
25
|
+
run: |
|
|
26
|
+
uv venv
|
|
27
|
+
uv pip install -e '.[dev]'
|
|
28
|
+
|
|
29
|
+
- name: Check import contracts (no back-edge to consumers)
|
|
30
|
+
run: uv run lint-imports
|
|
31
|
+
|
|
32
|
+
- name: Run the test suite
|
|
33
|
+
run: uv run python -m pytest -q
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: viva-discovery-engine
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A derive-first scientific-investigation discovery cycle engine for the Vivarium ecosystem.
|
|
5
|
+
Project-URL: Homepage, https://github.com/vivarium-collective/discovery-engine
|
|
6
|
+
Project-URL: Repository, https://github.com/vivarium-collective/discovery-engine
|
|
7
|
+
Author: Vivarium Collective
|
|
8
|
+
License: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: discovery,process-bigraph,scientific-investigation,vivarium
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: bigraph-schema
|
|
13
|
+
Requires-Dist: click>=8.1
|
|
14
|
+
Requires-Dist: filelock>=3.12
|
|
15
|
+
Requires-Dist: jinja2>=3.1
|
|
16
|
+
Requires-Dist: jsonschema[format-nongpl]>=4.21
|
|
17
|
+
Requires-Dist: numpy>=1.24
|
|
18
|
+
Requires-Dist: polars>=0.20
|
|
19
|
+
Requires-Dist: process-bigraph
|
|
20
|
+
Requires-Dist: psutil>=5.9
|
|
21
|
+
Requires-Dist: pyyaml>=6.0
|
|
22
|
+
Requires-Dist: rich>=13.0
|
|
23
|
+
Requires-Dist: ruamel-yaml>=0.18
|
|
24
|
+
Requires-Dist: scipy>=1.11
|
|
25
|
+
Requires-Dist: typer>=0.12
|
|
26
|
+
Requires-Dist: viva-emitters[parquet]>=0.2.3
|
|
27
|
+
Requires-Dist: viva-workspace
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: import-linter>=2.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest>=7; extra == 'dev'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# discovery-engine
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<img src="docs/discovery-engine-cycle.png" alt="The Discovery Engine discovery cycle" width="640">
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
The **investigation/study framework + the derive-first discovery cycle** for the
|
|
40
|
+
Vivarium ecosystem. It owns the investigation/study data model, its lifecycle
|
|
41
|
+
(canonicalize, contracts, scaffold, seed, migrate, audit), report/card
|
|
42
|
+
generation — and the discovery cycle itself: it turns an investigation (an
|
|
43
|
+
`investigation.yaml` plus its member `study.yaml` files) into a structured,
|
|
44
|
+
reproducible view of what is known, what is unresolved, what is most valuable to
|
|
45
|
+
do next, whether a study is materially ready to run, and how to cycle it forward
|
|
46
|
+
— and now also **drives that cycle**: reconcile evidence, plan, design
|
|
47
|
+
discriminating studies, acquire models, evaluate and promote claims, compose a
|
|
48
|
+
transition model, and grow the investigation by seeding and refining studies —
|
|
49
|
+
all without performing the science itself.
|
|
50
|
+
|
|
51
|
+
It is a standalone library, consumed by:
|
|
52
|
+
|
|
53
|
+
- **[viva-superpowers](https://github.com/vivarium-collective/viva-superpowers)** — the AI-agent skills that drive the engine and the workbench.
|
|
54
|
+
- **[vivarium-workbench](https://github.com/vivarium-collective/vivarium-workbench)** — the UI/server for investigations and studies.
|
|
55
|
+
|
|
56
|
+
## Two layers
|
|
57
|
+
|
|
58
|
+
The engine has two cooperating layers over the same inputs. See
|
|
59
|
+
[`docs/architecture.md`](docs/architecture.md) for the full reference.
|
|
60
|
+
|
|
61
|
+
**Layer 1 — the pure projection** (assess + gate-readiness + execute + persist):
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
run_cycle → knowledge / argument / narrative / gates / validators / suggestions
|
|
65
|
+
frontier/closure → the prioritized unresolved work + the machine-checkable closure test
|
|
66
|
+
opportunities → value-ranked frontier (info·impact·enable·closure − cost)
|
|
67
|
+
run_readiness → is a study materially ready to produce an evaluable, rendered result?
|
|
68
|
+
execute_action → carry out the next move, gated by consequence
|
|
69
|
+
advance_cycle → build-if-needed and run the open questions
|
|
70
|
+
persist_cycle → the slim regenerable cycle_state + persist-time narrative renewal
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
It is **pure** (no disk I/O) and **derive-first**: every view is computed from
|
|
74
|
+
the studies, then merged over any authored override — authored wins, an empty
|
|
75
|
+
authored value never clobbers a derived one. Same inputs always yield the same
|
|
76
|
+
bundle.
|
|
77
|
+
|
|
78
|
+
**Layer 2 — the phased discovery cycle** (the generative, evidence-integrity
|
|
79
|
+
half). Each phase produces a typed contract and is driven by one CLI verb:
|
|
80
|
+
|
|
81
|
+
| Phase | What it decides | CLI verb | Module |
|
|
82
|
+
|---|---|---|---|
|
|
83
|
+
| **A** reconcile | classify each finding's evidence: verified / provisional / contradicted / unsupported | `reconcile-evidence` | `evidence_integrity` |
|
|
84
|
+
| **B** plan | one ranked, dependency-ordered portfolio: REPAIR · RESOLVE · EXTEND | `plan` | `candidate_action` |
|
|
85
|
+
| **C** design | a discriminating study: contrast, controls, registered predictions, committed decision rule | `design` | `experiment_design` |
|
|
86
|
+
| **D** build | capability-driven model acquisition (reuse / wrap / build); immutable `ModelVersion` | `build-model` | `model_architect` |
|
|
87
|
+
| **E** execute | run the designed studies, consequence- and autonomy-gated | `advance` / `execute` | (Layer 1) |
|
|
88
|
+
| **F** evaluate | promote or reject claims (support × evidence integrity); emit a `DiscoveryDelta` | `evaluate` / `delta` | `evaluation` |
|
|
89
|
+
|
|
90
|
+
**Growth ops** close the loop — propose → seed → run → promote → refine — gated
|
|
91
|
+
by a `human_in_the_loop` (default) vs `autonomous` policy:
|
|
92
|
+
|
|
93
|
+
| Op | What it does | CLI verb | Module |
|
|
94
|
+
|---|---|---|---|
|
|
95
|
+
| suggest | propose new studies (followups, narrative gaps, gated decisions) | `suggest` | `discover` |
|
|
96
|
+
| seed | author a complete, run-ready `study.yaml` from a parent + proposal/finding | `seed-study` | `study_seeding` |
|
|
97
|
+
| refine | deepen an existing study — add seeds, sweep variants, raise model fidelity | `refine-study` | `study_refinement` |
|
|
98
|
+
|
|
99
|
+
## Install
|
|
100
|
+
|
|
101
|
+
Use it as a **git dependency** (not published to a package index). In the
|
|
102
|
+
Vivarium ecosystem it's wired as a git source in the consumer's `pyproject.toml`,
|
|
103
|
+
e.g. in viva-superpowers / vivarium-workbench:
|
|
104
|
+
|
|
105
|
+
```toml
|
|
106
|
+
dependencies = ["discovery-engine", ...]
|
|
107
|
+
|
|
108
|
+
[tool.uv.sources]
|
|
109
|
+
discovery-engine = { git = "https://github.com/vivarium-collective/discovery-engine.git", branch = "main" }
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Then `uv lock` / `uv sync` resolves it. To work on this repo directly, clone it
|
|
113
|
+
and run `uv sync`.
|
|
114
|
+
|
|
115
|
+
Depends on `viva-emitters` (reads run results) and `viva-workspace` (resolves a
|
|
116
|
+
workspace's layout); plus process-bigraph, bigraph-schema, numpy, polars,
|
|
117
|
+
ruamel.yaml, pyyaml, click.
|
|
118
|
+
|
|
119
|
+
## Use — library
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
import discovery_engine as de
|
|
123
|
+
|
|
124
|
+
inv = {"studies": ["s1"], "acceptance_criteria": [{"study": "s1", "behavior": "b"}]}
|
|
125
|
+
studies = {"s1": {"name": "s1", "behavior_tests": [{"name": "b"}], "runs": []}}
|
|
126
|
+
|
|
127
|
+
bundle = de.run_cycle(inv, studies) # pure projection
|
|
128
|
+
front = de.frontier(bundle, inv) # prioritized unresolved items
|
|
129
|
+
clo = de.closure(bundle, inv) # {closed, open_items, ...}
|
|
130
|
+
opps = de.opportunities(bundle, inv) # value-ranked
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Use — CLI
|
|
134
|
+
|
|
135
|
+
Drive a workspace on disk with `discover <verb> <investigation>`.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Assess
|
|
139
|
+
discover status <inv> # project one cycle, print the summary
|
|
140
|
+
discover crank <inv> # frontier + next action + closure
|
|
141
|
+
discover complete <inv> # the completion map (+ publishable axis)
|
|
142
|
+
discover diagnose <inv> # classify the crank's productivity bottlenecks
|
|
143
|
+
discover hypotheses <inv> # the competing-hypothesis support rollup
|
|
144
|
+
discover opportunities <inv> # value-ranked frontier
|
|
145
|
+
discover suggest <inv> # new studies to run next
|
|
146
|
+
|
|
147
|
+
# Cycle N+1 — the phased discovery cycle
|
|
148
|
+
discover reconcile-evidence <inv> # A: evidence integrity per finding
|
|
149
|
+
discover plan <inv> # B: the CandidateAction portfolio
|
|
150
|
+
discover design <inv> <study> # C: a discriminating study design
|
|
151
|
+
discover build-model <inv> --mechanism … # D: reuse/wrap/build model acquisition
|
|
152
|
+
discover evaluate <inv> # F: claim verdicts (support × integrity)
|
|
153
|
+
discover delta <inv> # F: the per-cycle DiscoveryDelta
|
|
154
|
+
|
|
155
|
+
# Cycle N+2
|
|
156
|
+
|
|
157
|
+
# Grow — propose · seed · refine (autonomy-gated)
|
|
158
|
+
discover seed-study <inv> <parent> --slug … [--autonomy …] [--write]
|
|
159
|
+
discover refine-study <inv> <study> [--composite …] [--autonomy …] [--write]
|
|
160
|
+
|
|
161
|
+
# Advance / author
|
|
162
|
+
discover advance <inv> [--autonomous]
|
|
163
|
+
discover execute <inv> [--execute] [--autonomous] [--ai-decide]
|
|
164
|
+
discover set-verdict <study> <verdict> [--rationale …]
|
|
165
|
+
discover relate <downstream> <upstream> [--relation …]
|
|
166
|
+
discover connect <inv> [--relation …]
|
|
167
|
+
discover resolve <inv> <kind> <target> --rationale …
|
|
168
|
+
|
|
169
|
+
# Maintenance
|
|
170
|
+
discover cycle <inv> # the full cycle bundle (JSON)
|
|
171
|
+
discover snapshot-validations <inv>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Every subcommand is self-describing via `discover <verb> -h`.
|
|
175
|
+
|
|
176
|
+
## Design invariants
|
|
177
|
+
|
|
178
|
+
- **Progress ⊥ verdict** — a failed execution is not a refuted hypothesis.
|
|
179
|
+
- **Closure ⊥ frontier** — a settled argument can still carry non-blocking work.
|
|
180
|
+
- **Publishable ⊥ closure** — presentation-completeness is its own axis.
|
|
181
|
+
- **Evidence integrity ⊥ support** — whether a claim is backed is distinct from
|
|
182
|
+
whether its evidence is a registered run; a provisional-backed claim is
|
|
183
|
+
provisionally-supported, never promoted.
|
|
184
|
+
- **Specify before run** — a discriminating study's predictions and decision
|
|
185
|
+
rule are committed before any run.
|
|
186
|
+
- **Declaration ⇒ materialization** — a run is gated unless its composite
|
|
187
|
+
imports, observables are emittable, measures resolve and viz is rendered.
|
|
188
|
+
- **Epistemic separation** — a validator's execution status never implies its
|
|
189
|
+
scientific judgment.
|
|
190
|
+
|
|
191
|
+
## Architecture & roadmap
|
|
192
|
+
|
|
193
|
+
- **[`docs/architecture.md`](docs/architecture.md)** — the full discovery-cycle
|
|
194
|
+
reference: the two layers, the Phase A–F + N+2 model, the typed contracts
|
|
195
|
+
(Hypothesis, Prediction, Evidence, ExperimentDesign, ModelVersion,
|
|
196
|
+
DiscoveryDelta, CandidateAction), and the propose→seed→run→promote→refine loop.
|
|
197
|
+
- **[`docs/roadmap.md`](docs/roadmap.md)** — what has shipped and the remaining
|
|
198
|
+
backlog (EIG over calibrated distributions, figure critique, Bayesian belief
|
|
199
|
+
updates, autonomy budgets + per-decision logs, scientific quality metrics).
|