-
Notifications
You must be signed in to change notification settings - Fork 0
Add artifact evidence index #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ProfRandom92
merged 1 commit into
main
from
codex/add-deterministic-artifact-evidence-index
May 20, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,200 @@ | ||
| { | ||
| "artifact_id": "evidence_index_v1", | ||
| "generated_by": "EvidenceIndexGenerator", | ||
| "version": "1.0", | ||
| "evaluation_mode": "deterministic", | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "artifacts": [ | ||
| { | ||
| "path": "artifacts/capability_boundary_replay_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_capability_boundary_replay_artifact.py", | ||
| "evidence_category": "capability_boundary_replay", | ||
| "evidence_role": "capability boundary drift replay evidence", | ||
| "fixture_families": [ | ||
| "coding_workflow_pr_review", | ||
| "cross_domain_operational_dependency_workflow", | ||
| "incident_response_page_triage", | ||
| "mcp_trace_replay" | ||
| ], | ||
| "top_level_keys": [ | ||
| "artifact_id", | ||
| "evaluation_mode", | ||
| "external_apis", | ||
| "families", | ||
| "generated_by", | ||
| "global_summary", | ||
| "llm_judges", | ||
| "version" | ||
| ], | ||
| "deterministic_evaluation": true, | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "manifest_aligned": true, | ||
| "evidence_bearing": true, | ||
| "visualization_only": false | ||
| }, | ||
| { | ||
| "path": "artifacts/graph_diff_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_graph_diff_artifact.py", | ||
| "evidence_category": "graph_diff", | ||
| "evidence_role": "relational replay graph evidence", | ||
| "fixture_families": [ | ||
| "coding_workflow_pr_review", | ||
| "cross_domain_operational_dependency_workflow", | ||
| "incident_response_page_triage", | ||
| "mcp_trace_replay" | ||
| ], | ||
| "top_level_keys": [ | ||
| "artifact_id", | ||
| "evaluation_mode", | ||
| "external_apis", | ||
| "families", | ||
| "generated_by", | ||
| "global_summary", | ||
| "llm_judges", | ||
| "version" | ||
| ], | ||
| "deterministic_evaluation": true, | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "manifest_aligned": true, | ||
| "evidence_bearing": true, | ||
| "visualization_only": false | ||
| }, | ||
| { | ||
| "path": "artifacts/mcp_trace_replay_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_mcp_trace_replay_artifact.py", | ||
| "evidence_category": "mcp_trace_replay", | ||
| "evidence_role": "single-family MCP trace replay evidence", | ||
| "fixture_families": [ | ||
| "mcp_trace_replay" | ||
| ], | ||
| "top_level_keys": [ | ||
| "artifact_id", | ||
| "family", | ||
| "fixtures", | ||
| "generated_by", | ||
| "summary", | ||
| "version" | ||
| ], | ||
| "deterministic_evaluation": true, | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "manifest_aligned": false, | ||
| "evidence_bearing": true, | ||
| "visualization_only": false | ||
| }, | ||
| { | ||
| "path": "artifacts/multi_family_admissibility_curves.svg", | ||
| "format": "svg", | ||
| "generator": "scripts/render_multi_family_admissibility_svg.py", | ||
| "evidence_category": "multi_family_admissibility_visualization", | ||
| "evidence_role": "visualization of admissibility outcomes", | ||
| "fixture_families": [], | ||
| "top_level_keys": [], | ||
| "deterministic_evaluation": true, | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "manifest_aligned": false, | ||
| "evidence_bearing": false, | ||
| "visualization_only": true | ||
| }, | ||
| { | ||
| "path": "artifacts/multi_family_admissibility_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_multi_family_admissibility_artifact.py", | ||
| "evidence_category": "multi_family_admissibility", | ||
| "evidence_role": "cross-family admissibility evidence", | ||
| "fixture_families": [ | ||
| "coding_workflow_pr_review", | ||
| "cross_domain_operational_dependency_workflow", | ||
| "incident_response_page_triage", | ||
| "mcp_trace_replay" | ||
| ], | ||
| "top_level_keys": [ | ||
| "artifact_id", | ||
| "families", | ||
| "generated_by", | ||
| "version" | ||
| ], | ||
| "deterministic_evaluation": true, | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "manifest_aligned": true, | ||
| "evidence_bearing": true, | ||
| "visualization_only": false | ||
| }, | ||
| { | ||
| "path": "artifacts/replay_semantic_integrity_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_replay_semantic_integrity_artifact.py", | ||
| "evidence_category": "replay_semantic_integrity", | ||
| "evidence_role": "semantic replay integrity evidence", | ||
| "fixture_families": [ | ||
| "coding_workflow_pr_review", | ||
| "cross_domain_operational_dependency_workflow", | ||
| "incident_response_page_triage", | ||
| "mcp_trace_replay" | ||
| ], | ||
| "top_level_keys": [ | ||
| "artifact_id", | ||
| "evaluation_mode", | ||
| "external_apis", | ||
| "families", | ||
| "generated_by", | ||
| "global_summary", | ||
| "llm_judges", | ||
| "version" | ||
| ], | ||
| "deterministic_evaluation": true, | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "manifest_aligned": true, | ||
| "evidence_bearing": true, | ||
| "visualization_only": false | ||
| }, | ||
| { | ||
| "path": "artifacts/tool_ordering_replay_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_tool_ordering_replay_artifact.py", | ||
| "evidence_category": "tool_ordering_replay", | ||
| "evidence_role": "tool-order replay drift evidence", | ||
| "fixture_families": [ | ||
| "coding_workflow_pr_review", | ||
| "cross_domain_operational_dependency_workflow", | ||
| "incident_response_page_triage", | ||
| "mcp_trace_replay" | ||
| ], | ||
| "top_level_keys": [ | ||
| "artifact_id", | ||
| "evaluation_mode", | ||
| "external_apis", | ||
| "families", | ||
| "generated_by", | ||
| "global_summary", | ||
| "llm_judges", | ||
| "version" | ||
| ], | ||
| "deterministic_evaluation": true, | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "manifest_aligned": true, | ||
| "evidence_bearing": true, | ||
| "visualization_only": false | ||
| } | ||
| ], | ||
| "global_summary": { | ||
| "artifact_count": 7, | ||
| "json_artifact_count": 6, | ||
| "svg_artifact_count": 1, | ||
| "evidence_bearing_count": 6, | ||
| "visualization_only_count": 1, | ||
| "deterministic_artifact_count": 7, | ||
| "llm_free_artifact_count": 7, | ||
| "external_api_free_artifact_count": 7 | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,171 @@ | ||
| """Generate deterministic evidence index for committed artifacts.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import json | ||
| from pathlib import Path | ||
| from typing import Any | ||
|
|
||
| REPO_ROOT = Path(__file__).resolve().parents[1] | ||
| MANIFEST_PATH = REPO_ROOT / "fixtures" / "manifest.json" | ||
| OUTPUT_PATH = REPO_ROOT / "artifacts" / "evidence_index.json" | ||
|
|
||
| ARTIFACT_SPECS: tuple[dict[str, Any], ...] = ( | ||
| { | ||
| "path": "artifacts/capability_boundary_replay_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_capability_boundary_replay_artifact.py", | ||
| "evidence_category": "capability_boundary_replay", | ||
| "evidence_role": "capability boundary drift replay evidence", | ||
| "evidence_bearing": True, | ||
| "visualization_only": False, | ||
| }, | ||
| { | ||
| "path": "artifacts/graph_diff_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_graph_diff_artifact.py", | ||
| "evidence_category": "graph_diff", | ||
| "evidence_role": "relational replay graph evidence", | ||
| "evidence_bearing": True, | ||
| "visualization_only": False, | ||
| }, | ||
| { | ||
| "path": "artifacts/mcp_trace_replay_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_mcp_trace_replay_artifact.py", | ||
| "evidence_category": "mcp_trace_replay", | ||
| "evidence_role": "single-family MCP trace replay evidence", | ||
| "evidence_bearing": True, | ||
| "visualization_only": False, | ||
| }, | ||
| { | ||
| "path": "artifacts/multi_family_admissibility_curves.svg", | ||
| "format": "svg", | ||
| "generator": "scripts/render_multi_family_admissibility_svg.py", | ||
| "evidence_category": "multi_family_admissibility_visualization", | ||
| "evidence_role": "visualization of admissibility outcomes", | ||
| "evidence_bearing": False, | ||
| "visualization_only": True, | ||
| }, | ||
| { | ||
| "path": "artifacts/multi_family_admissibility_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_multi_family_admissibility_artifact.py", | ||
| "evidence_category": "multi_family_admissibility", | ||
| "evidence_role": "cross-family admissibility evidence", | ||
| "evidence_bearing": True, | ||
| "visualization_only": False, | ||
| }, | ||
| { | ||
| "path": "artifacts/replay_semantic_integrity_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_replay_semantic_integrity_artifact.py", | ||
| "evidence_category": "replay_semantic_integrity", | ||
| "evidence_role": "semantic replay integrity evidence", | ||
| "evidence_bearing": True, | ||
| "visualization_only": False, | ||
| }, | ||
| { | ||
| "path": "artifacts/tool_ordering_replay_results.json", | ||
| "format": "json", | ||
| "generator": "scripts/generate_tool_ordering_replay_artifact.py", | ||
| "evidence_category": "tool_ordering_replay", | ||
| "evidence_role": "tool-order replay drift evidence", | ||
| "evidence_bearing": True, | ||
| "visualization_only": False, | ||
| }, | ||
| ) | ||
|
|
||
|
|
||
| def _load_json(path: Path) -> dict[str, Any]: | ||
| return json.loads(path.read_text(encoding="utf-8")) | ||
|
|
||
|
|
||
| def _manifest_families() -> set[str]: | ||
| manifest = _load_json(MANIFEST_PATH) | ||
| return {str(fixture["family"]) for fixture in manifest["fixtures"]} | ||
|
|
||
|
|
||
| def _extract_fixture_families(payload: dict[str, Any]) -> list[str]: | ||
| families: set[str] = set() | ||
| if isinstance(payload.get("families"), list): | ||
| for family in payload["families"]: | ||
| if isinstance(family, dict) and isinstance(family.get("family"), str): | ||
| families.add(family["family"]) | ||
| if isinstance(payload.get("family"), str): | ||
| families.add(payload["family"]) | ||
| return sorted(families) | ||
|
|
||
|
|
||
| def _build_artifact_entry(spec: dict[str, Any], manifest_families: set[str]) -> dict[str, Any] | None: | ||
| artifact_path = REPO_ROOT / spec["path"] | ||
| if not artifact_path.exists(): | ||
| return None | ||
|
|
||
| entry = { | ||
| "path": spec["path"], | ||
| "format": spec["format"], | ||
| "generator": spec["generator"], | ||
| "evidence_category": spec["evidence_category"], | ||
| "evidence_role": spec["evidence_role"], | ||
| "fixture_families": [], | ||
| "top_level_keys": [], | ||
| "deterministic_evaluation": True, | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "manifest_aligned": False, | ||
| "evidence_bearing": spec["evidence_bearing"], | ||
| "visualization_only": spec["visualization_only"], | ||
| } | ||
|
|
||
| if spec["format"] == "json": | ||
| payload = _load_json(artifact_path) | ||
| families = _extract_fixture_families(payload) | ||
| entry["fixture_families"] = families | ||
| entry["top_level_keys"] = sorted(payload.keys()) | ||
| entry["deterministic_evaluation"] = payload.get("evaluation_mode", "deterministic") == "deterministic" | ||
| entry["llm_judges"] = payload.get("llm_judges", "none") | ||
| entry["external_apis"] = payload.get("external_apis", "none") | ||
| if families: | ||
| entry["manifest_aligned"] = set(families) == manifest_families | ||
|
|
||
| return entry | ||
|
|
||
|
|
||
| def generate_evidence_index(output_path: Path = OUTPUT_PATH) -> Path: | ||
| manifest_families = _manifest_families() | ||
| artifacts = [ | ||
| entry | ||
| for spec in sorted(ARTIFACT_SPECS, key=lambda item: item["path"]) | ||
| for entry in [_build_artifact_entry(spec, manifest_families)] | ||
| if entry is not None | ||
| ] | ||
|
|
||
| index = { | ||
| "artifact_id": "evidence_index_v1", | ||
| "generated_by": "EvidenceIndexGenerator", | ||
| "version": "1.0", | ||
| "evaluation_mode": "deterministic", | ||
| "llm_judges": "none", | ||
| "external_apis": "none", | ||
| "artifacts": artifacts, | ||
| "global_summary": { | ||
| "artifact_count": len(artifacts), | ||
| "json_artifact_count": sum(1 for item in artifacts if item["format"] == "json"), | ||
| "svg_artifact_count": sum(1 for item in artifacts if item["format"] == "svg"), | ||
| "evidence_bearing_count": sum(1 for item in artifacts if item["evidence_bearing"]), | ||
| "visualization_only_count": sum(1 for item in artifacts if item["visualization_only"]), | ||
| "deterministic_artifact_count": sum(1 for item in artifacts if item["deterministic_evaluation"]), | ||
| "llm_free_artifact_count": sum(1 for item in artifacts if item["llm_judges"] == "none"), | ||
| "external_api_free_artifact_count": sum(1 for item in artifacts if item["external_apis"] == "none"), | ||
| }, | ||
| } | ||
|
|
||
| output_path.parent.mkdir(parents=True, exist_ok=True) | ||
| output_path.write_text(json.dumps(index, indent=2) + "\n", encoding="utf-8") | ||
| return output_path | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| path = generate_evidence_index() | ||
| print(path.relative_to(REPO_ROOT).as_posix()) | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nested list comprehension used here to filter
Nonevalues is a bit convoluted. Since the project targets Python 3.9+ (as evidenced by the use ofdict[str, Any]), you can use the assignment expression (walrus operator) to make this more readable and idiomatic.