Skip to content

docs(tasks): file validate passing an object without reading its version inventories - #7

Merged
adammharris merged 1 commit into
mainfrom
agent/backlog-file-validate-never-reads-a-version-inventory
Nov 5, 2026
Merged

adammharris merged 1 commit into
mainfrom
agent/backlog-file-validate-never-reads-a-version-inventory

Conversation

@adammharris

Copy link
Copy Markdown
Member

What changed

Files one task, docs/tasks/validate-never-reads-a-version-inventory.md, and lists it in docs/tasks/tasks.md. No code changes.

Why

check in mocfl/src/validate.rs never opens vN/inventory.json or its sidecar. So an object with a corrupt or disagreeing version inventory gets the same verdict as a sound one: valid, and under --deep, content verified. rocfl refuses the same objects.

$ echo junk >> o/v2/inventory.json
$ mocfl validate o --deep        # exit 0
valid	urn:x	2 version(s), content verified
$ rocfl -r . validate --paths o  # exit 2
    1. [E064] (v2) Inventory file must be identical to the root inventory
    2. [E060] (v2) Inventory does not match expected digest. …

This is partly a known gap. The README calls validate "a floor" and lists "cross-inventory consistency between versions" among the checks it doesn't yet make. Two things were not recorded:

  • No task tracked that work.
  • The verdict line reads as if the check ran, which goes against the crate's own rule on ContentUnverifiable that "not checked" must never read as "checked and fine".

The task says this too, so it doesn't read as a new discovery.

Task

Opens validate-never-reads-a-version-inventory. The name agent/backlog-validate-never-reads-a-version-inventory stays free for the fix.

How it was verified

  • Ran the task's repro verbatim on main at 496bad2, with mocfl built from source and rocfl 1.7.0, the version cargo install gives CI. mocfl exits 0 and rocfl exits 2.
  • Ran each row of the task's table through both tools.
  • Checked the spec claims against the published OCFL 1.1 spec (section 3.7) and validation codes. E110 is quoted as rocfl's output only.
  • Ran OCFL_FIXTURES=… cargo test --test fixtures against OCFL/fixtures: 51 of 107 caught, matching the README. The task names the 11 missed fixtures this work should catch. It leaves out the four E060_* (all sha512, which mocfl can't compute yet) and the two E061_invalid_sidecar (sidecar format). The 11 are expected from the fix and not yet demonstrated.
  • prov check reports one finding, the unwritten about.md, which was there before this change.

This change only touches documents, so no build gate applies.

@adammharris
adammharris merged commit 03ff530 into main Nov 5, 2026
3 checks passed
@adammharris
adammharris deleted the agent/backlog-file-validate-never-reads-a-version-inventory branch November 5, 2026 17:17
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