Skip to content

Fingerprint model outputs and harden composite loader integrity - #12

Merged
CraigMyles merged 2 commits into
mainfrom
hardening/model-output-integrity
Jul 14, 2026
Merged

Fingerprint model outputs and harden composite loader integrity#12
CraigMyles merged 2 commits into
mainfrom
hardening/model-output-integrity

Conversation

@CraigMyles

Copy link
Copy Markdown
Owner

Summary

  • Add per-model fingerprints for patch and slide outputs while keeping grid_hash geometry-only.
  • Require receipt, resume, and verify paths to match the current fingerprint and expected dimension; legacy outputs without a fingerprint are recomputed in place.
  • Verify SEAL adapters and GigaPath slide weights before model construction, and mark SEAL experimental while its upstream bases remain unpinned.

Details

Fingerprints record the exact weight artifact, revision and SHA-256, preprocessing, pooling and output dimension, resolved execution precision, loader-constructor contract, and composite dependencies. Slide fingerprints also bind to the selected patch-output fingerprint.

Feature-array fingerprints are written only after every row succeeds, so they act as completion markers. Replacing an invalid model preserves the shared grid and unrelated model arrays while invalidating dependent slide embeddings. Multi-device runs must resolve to one common output contract before the store is touched, and standalone slide encoding now validates the complete patch input before using it.

raw2features verify fails closed for unregistered model names rather than trusting a contract read back from the target store. Programmatic custom-model runs continue to supply their current contract through injected embedders or factories.

SEAL now verifies the pinned adapter before deserialisation, validates complete LoRA coverage, and uses a frozen constructor configuration. GigaPath verifies its downloaded checkpoint before passing it to the model factory. SEAL remains experimental for v0.1.1 because its base encoders are not yet locally pinned.

Testing

  • ruff check . — passed
  • pytest -m "not slow and not network" -q — 442 passed, 9 skipped, 90 deselected
  • Focused fingerprint, receipt, loader, slide, CLI, and multi-device suite — 140 passed, 5 skipped
  • pytest -q -m network tests/test_registry_revisions_network.py — 40 passed

Refs #6

@CraigMyles
CraigMyles marked this pull request as ready for review July 14, 2026 11:48
@CraigMyles
CraigMyles merged commit 4846e55 into main Jul 14, 2026
5 checks passed
@CraigMyles
CraigMyles deleted the hardening/model-output-integrity branch July 14, 2026 11:49
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