Skip to content

Add machine-readable paper card checks - #4

Merged
bozarnr merged 5 commits into
mainfrom
loop/pass3-paper-card-schema
Jul 31, 2026
Merged

Add machine-readable paper card checks#4
bozarnr merged 5 commits into
mainfrom
loop/pass3-paper-card-schema

Conversation

@bozarnr

@bozarnr bozarnr commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Adds a lightweight evidence-contract layer:

  • paper card schema
  • AutoAlpha machine-readable metadata card
  • verification script checks for metadata and linked evidence files
  • tests for the metadata card contract
  • README refresh describing the evidence contract

Local verification: C:\qds\Scripts\python.exe -m unittest discover -s tests -v and C:\qds\Scripts\python.exe scripts\verify_cards.py passed.

Copilot AI review requested due to automatic review settings July 31, 2026 10:38
@bozarnr
bozarnr merged commit a5b0950 into main Jul 31, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The new verifier has path/robustness issues (cwd-relative resolution and exception behavior) and a couple of correctness/efficiency/documentation mismatches that should be fixed before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Adds a lightweight “evidence contract” layer so replication work has both human-readable cards and machine-readable paper metadata that can be statically verified.

Changes:

  • Introduces a paper card schema (schemas/paper_card_schema.json) plus an initial machine-readable card (paper_cards/autoalpha.json).
  • Extends scripts/verify_cards.py to validate both replication cards and paper metadata cards, and adds a unit test for the new contract.
  • Updates README to document the evidence contract layout and how to run verification.
File summaries
File Description
tests/test_cards.py Adds a regression test asserting the paper metadata card validates cleanly.
scripts/verify_cards.py Adds paper-card schema validation and extends the CLI verifier to check paper_cards/*.json.
schemas/paper_card_schema.json Defines required fields and allowed enumerations for paper metadata cards.
README.md Documents the new evidence contract layout and verification commands.
paper_cards/autoalpha.json Adds the first machine-readable paper metadata card pointing at the replication card as evidence.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread scripts/verify_cards.py
Comment on lines +20 to +36
def validate_paper_card(card: Path, schema: Path = Path("schemas/paper_card_schema.json")) -> list[str]:
payload = json.loads(card.read_text(encoding="utf-8"))
rules = json.loads(schema.read_text(encoding="utf-8"))
errors: list[str] = []
for key in rules["required"]:
if key not in payload:
errors.append(f"missing key: {key}")
if payload.get("implementation_status") not in rules["allowed_status"]:
errors.append("invalid implementation_status")
if payload.get("replication_status") not in rules["allowed_status"]:
errors.append("invalid replication_status")
if payload.get("claim_ceiling") not in rules["allowed_claim_ceiling"]:
errors.append("invalid claim_ceiling")
for evidence in payload.get("evidence_files", []):
if not Path(evidence).exists():
errors.append(f"missing evidence file: {evidence}")
return errors
Comment thread scripts/verify_cards.py
Comment on lines 43 to +47
failures = {str(card): validate(card) for card in cards if validate(card)}
paper_cards = sorted(Path("paper_cards").glob("*.json"))
if not paper_cards:
raise SystemExit("no machine-readable paper cards found")
paper_failures = {str(card): validate_paper_card(card) for card in paper_cards if validate_paper_card(card)}
Comment thread README.md
```

The tests check that each card has source, scope, deviation, and claim-boundary sections. They do not validate trading performance.
The checks validate that each public card has source, scope, deviation, and claim-boundary sections. They also validate that each machine-readable paper card links to existing evidence. They do not validate trading performance.
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.

2 participants