Compact singleton arrays in the crate - #218
Merged
Merged
Conversation
roc-validator 0.11.4 (2026-09-16) adds RO-Crate 1.1's recommendation that a property with one value be that value, not a one-element array. The crate had four: the root's author, the workflow's input, and the result of each action. CI resolves the validator fresh on every run (the lock is not committed), so every job has failed since the release. The arrays come from three builders, and which of them hold one element depends on the project — one output, one author — so the serialization compacts every one-element array in one place, the same rule rocrate applies to @context. The new requirement was inserted as number 24, renumbering the two affiliation checks the floor pins from 29.x to 30.x. The floor's ids belong to a validator version, so the dev dependency now names 0.11.4. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
✅ Eval
lc statusConfusion & pain points (Claude analysis)Confusion & pain points
Full trace: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
author, the workflow'sinput, each action'sresult), and the crate smoke test refuses any failure beyond its recorded floor. CI resolves the validator fresh on every run since the lock is not committed, which is how the release reached it.engine/crate.pynow compacts every one-element array to its value. One place rather than each builder: the arrays come from three builders, and which of them hold one element depends on the project (one output, one author). It is the rule rocrate already applies to@context.docs/api/crate.mdrecords the rule.Test plan
LC_CRATE_TESTS_REQUIRED=1 uv run pytest tests/test_crate.py tests/test_crate_smoke.pyagainst roc-validator 0.11.4 (23 passed; REQUIRED clean, RECOMMENDED within the floor)uv run ruff check src/ tests/,uv run mypy src/🤖 Generated with Claude Code