Skip to content

docs(tasks): a padded object commits a version past its width - #11

Merged
adammharris merged 2 commits into
mainfrom
agent/backlog-file-a-padded-object-commits-past-its-width
Nov 9, 2026
Merged

adammharris merged 2 commits into
mainfrom
agent/backlog-file-a-padded-object-commits-past-its-width

Conversation

@adammharris

Copy link
Copy Markdown
Member

Files a task: VersionNum::next lets a zero-padded object step one digit wider than OCFL 1.1 allows, so v09 commits v10 and v0999 commits v1000. The spec permits v00001 to v09999 for five digits and requires one naming convention per object (E011, E012, E013). The guard in mocfl/src/inventory.rs refuses only a successor with more digits than the width, not one that fills it.

The task is filed on its own branch so that agent/backlog-a-padded-object-commits-past-its-width stays free for the fix.

Reproduced on main at f7cd8ab, with a throwaway example in a scratch worktree (not committed):

  • VersionNum::parse("v0999").unwrap().next() returns Ok(v1000), which reads back with padding 0.
  • An object mocfl wrote, renamed by hand from v1 to v01 with both inventories and sidecars rewritten, validates clean. Nine more Object::commits return v02 … v09 and then Ok(v10). After that, validate and validate_deep both return [] for an object holding v01–v09 beside v10.

The task asks for next to refuse at the real ceiling, for its doc comment to be corrected (it says v0001 cannot represent 10000, but the ceiling is v0999), and for validate to report mixed or ill-padded version names.

Docs only. prov check reports one finding, about.md: not written, which is on main already.

@adammharris
adammharris merged commit 23891e1 into main Nov 9, 2026
3 checks passed
@adammharris
adammharris deleted the agent/backlog-file-a-padded-object-commits-past-its-width branch November 9, 2026 20:46
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