Skip to content

feat(verify): check frozen manifest-split deliveries against receipts - #769

Merged
kstonekuan merged 1 commit into
Hebbian-Robotics:mainfrom
Lohith248:feat/verify-manifest-split
Nov 2, 2026
Merged

kstonekuan merged 1 commit into
Hebbian-Robotics:mainfrom
Lohith248:feat/verify-manifest-split

Conversation

@Lohith248

@Lohith248 Lohith248 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add hflow verify manifest-split DIRECTORY and hflow.verify_manifest_split so recipients can check a frozen training split after transfer, without its original input manifest. The split writer already records the file hashes.

receipt.json
  -> validate version, algorithm, partition names, and digests
  -> hash assignments.parquet and every claimed partition
  -> report missing or changed files together

The verifier reads existing v1 receipts, supports custom partitions, ignores unlisted files, and refuses symlinks and nonregular files. It uses the existing verification report and exit codes: 0 clean, 1 damaged, 2 unreadable input.

Evidence

  • Before: an untouched archive of main e921dfe has no public verifier: importing it raises ImportError, and the CLI exits 2 with No such command 'manifest-split'.
    After: all 37 manifest tests pass on Python 3.11 and 3.14, covering moved output, custom partitions, missing and changed files, multiple findings, invalid receipts, and unsafe file types.

  • A 12-sample split moved after deleting its input verifies with exit 0 on both Python versions. A same-length edit to train.parquet produces exit 1 naming that file. File inventories confirm that verification leaves the delivery unchanged.

  • Validated on current main e921dfe; the existing PR branch merges to exactly the tested tree. Commands:

    uv sync --locked
    uv run --locked pytest tests/test_manifest_splits.py -q
    UV_PROJECT_ENVIRONMENT="$PWD/.venv311" uv run --python 3.11 --locked pytest tests/test_manifest_splits.py -q
    uv run --locked pytest -q -n 4 -rs --tb=short
    UV_PROJECT_ENVIRONMENT="$PWD/.venv311" uv run --python 3.11 --locked pytest -q -n 4 -rs --tb=short
    uv run --locked ruff check --fix
    uv run --locked ruff format
    uv run --locked ty check
    git diff --check

    Full suite on each of Python 3.11 and 3.14: 2,661 passed, eight opt-in skips. Ruff, formatting, ty, and whitespace checks pass. Changed-guide links pass 2/2. The contribution guide's complete lychee check reports 439 OK, four configured exclusions, and one timeout at an unchanged FFmpeg homepage reference.

Merge Danger

Door: two-way

Read-only addition. No writer, receipt-format, dependency, or canonical-byte change.

Blast Radius: verification

Hashes compare delivered bytes with an unsigned receipt. They do not authenticate the publisher or prove leakage independence. Only files claimed by the receipt are checked; the original input and media are not needed.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Copilot AI balanced review requested due to automatic review settings November 1, 2026 15:29

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds hflow.verify_manifest_split and hflow verify manifest-split DIRECTORY to check transferred splits without the original manifest.

  • Recipients can check frozen manifest splits after transfer.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Open split directory] --> B[Read and check receipt]
  B --> C[Hash assignments and listed partitions]
  C --> D{Missing or changed files?}
  D -->|No| E[Clean report: exit 0]
  D -->|Yes| F[Damage findings: exit 1]
  A -->|Unreadable| G[Input error: exit 2]
  B -->|Invalid or unsafe| G
  C -->|Unreadable or unsafe| G
Loading

Reviews (1) · Last reviewed commit: "feat(verification): verify frozen manife..." · Reviewed by Greptile

@kstonekuan kstonekuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix. Ruff, ty, the full local suite (2,592 passed), changed-page links, and both Python CI jobs pass. Merging.

@kstonekuan
kstonekuan merged commit bc5e8f3 into Hebbian-Robotics:main Nov 2, 2026
5 checks passed
@kstonekuan kstonekuan mentioned this pull request Nov 15, 2026
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.

3 participants