Skip to content

Fail closed on lab batch pack integrity - #172

Merged
cschanhniem merged 4 commits into
mainfrom
fail-closed-lab-batch-pack
Jul 6, 2026
Merged

cschanhniem merged 4 commits into
mainfrom
fail-closed-lab-batch-pack

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

This PR turns the lab batch pack from a best-effort archive into a fail-closed handoff artifact.

The high-leverage scientific/OSS gap was not another scorer. It was the transition boundary between dry-lab candidate selection and external review/testing: a pack could be generated while silently omitting candidate evidence, bundling only a placeholder protocol README, or accepting a malformed/non-CSV panel. That is the kind of quiet integrity failure that makes a bio repo look rigorous while still being operationally unsafe.

Changes

  • Require panel.csv to contain candidate_id and sequence.
  • Reject empty panels and duplicate candidate IDs.
  • Require evidence certificates to match the panel exactly:
    • missing panel candidate evidence blocks pack creation;
    • extra certificates outside the panel also block pack creation.
  • Replace stale default protocol paths with real safe review references:
    • docs/review/LAB_PARTNER_ONBOARDING.md
    • docs/review/PRE_REGISTERED_PILOT_TEMPLATE.md
    • docs/review/EXTERNAL_REVIEW_PACKET.md
    • docs/evidence/PROOF_LADDER.md
    • docs/trust/TRUST_CENTER.md
  • Add pack_standard=fail_closed_lab_handoff_v1 and strict identity checks to MANIFEST.json and chain_of_custody.json.
  • Strengthen README language: these are safe review references, not wet-lab procedures.
  • Expand test coverage from archive-presence checks to actual failure-mode checks.

Tests

I could not clone GitHub from this runtime, so I recreated the touched script/test file in an isolated local temp repo with dummy required docs/schema and ran:

pytest -q tests/lab/test_lab_batch_pack.py

Result: 19 passed.

Scientific boundary

This PR improves handoff integrity only. It does not provide wet-lab instructions, does not validate biological activity, and does not strengthen any antimicrobial efficacy claim.

@cschanhniem
cschanhniem merged commit 7e2fede into main Jul 6, 2026
1 check failed
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