Skip to content

Pin the RO-Crate version the crate is written in - #254

Merged
EiffL merged 1 commit into
mainfrom
pin-rocrate-version
Oct 15, 2026
Merged

EiffL merged 1 commit into
mainfrom
pin-rocrate-version

Conversation

@EiffL

@EiffL EiffL commented Oct 15, 2026

Copy link
Copy Markdown
Member

Fixes the test_crate_smoke.py failure every branch has hit since rocrate 0.16.0 shipped on Oct 6. uv.lock is not committed, so CI resolves the latest rocrate. Supersedes #253, which caps rocrate<0.16.

What broke

rocrate 0.16 changed two defaults:

  • The default RO-Crate version moved from 1.2 to 1.3. The 1.3 context maps ComputationalWorkflow to https://bioschemas.org/terms/ComputationalWorkflow. The Workflow RO-Crate 1.0 and Run Crate 0.5 shapes in roc-validator 0.12.2 (the latest release) key on https://bioschemas.org/ComputationalWorkflow. So astra.yaml stops reading as a workflow, which fails workflow-ro-crate-1.0_2.1 and both provenance-run-crate-0.5_4.1 step checks at REQUIRED.
  • add_workflow now declares Workflow RO-Crate 1.1 instead of 1.0, which adds one RECOMMENDED failure.

The fix

ROCrate(version="1.1") instead of the library default. The hand-set descriptor conformsTo goes away with it: it existed to claim a 1.2 context alongside the 1.1 validators key on, and rocrate now writes the correct claim itself (RO-Crate 1.1 + Workflow RO-Crate 1.0).

Compared with today's crate, the only change is the context URL (1.2/context → 1.1/context) and the dropped ro/crate/1.2 claim. Every entity is unchanged. The output is byte-identical under rocrate 0.15.0 and 0.16.0, so CI no longer depends on which one it resolves, and the dependency stays rocrate>=0.15.

Moving to 1.3 waits on roc-validator adopting the 1.3 terms in its workflow and provenance shapes.

Tests

  • New pure test test_the_crate_version_is_pinned_not_rocrates_default checks the context and the descriptor's claims. It fails against main's crate.py under both rocrate 0.15 and 0.16.
  • test_crate_smoke.py passes on rocrate 0.15.0 and 0.16.0 with roc-validator 0.12.2: REQUIRED clean, RECOMMENDED within the existing _FLOOR.
  • Full suite on rocrate 0.16.0: 1159 passed. ruff and mypy are clean.

🤖 Generated with Claude Code

rocrate 0.16 moved its default from RO-Crate 1.2 to 1.3. The 1.3
context maps ComputationalWorkflow to a bioschemas term the Workflow
RO-Crate and Run Crate profiles do not recognise, so the main workflow
lost its type and the validator smoke test failed REQUIRED on every
runner, whichever branch CI resolved it for.

Write 1.1 explicitly instead of following the library's default. The
rendered crate is now byte-identical under rocrate 0.15 and 0.16, and
the descriptor's conformsTo is rocrate's own for 1.1 (RO-Crate 1.1 +
Workflow RO-Crate 1.0) rather than a hand-set claim of a 1.2 context
the document no longer emits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@EiffL EiffL left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

LGTM

@github-actions

Copy link
Copy Markdown
Contributor

✅ Eval

Metric Value
Outputs check success
Agent run success
Turns 9
Tool calls 7
Cost $0.13
Agent wall time 0m50s
Model claude-sonnet-5-5
lc status
  mode:    direct
  sandbox: landlock (fs: declared, network: allowed)
  crate:   up to date with the outputs

  · current  baseline/best_fit        74ae9a5
  · current  baseline/hubble_diagram  74ae9a5
  · current  baseline/residuals       74ae9a5

3 current
Confusion & pain points (Claude analysis)

Confusion & pain points

  • The run was essentially clean. There were no errored tool results. The agent went from a partial spec to a validated, materialized, up-to-date project in 7 tool calls. The friction below is small.

  • The agent guessed what the fifth data column means. It inspected data/SCPUnion2.1_mu_vs_z.txt and found 5 columns (name, z, mu, stat error, one more). The file header only lists alpha, beta, delta and M(...). It then ran sort -u on column 5 to probe it, and treated it as a systematic error added in quadrature. The agent said so itself, and that stat_and_sys and the 0.37 reduced χ² may be wrong. The spec and data/README.md carry no column schema, and the README is only the generic scaffold text. The fix is for the task or spec to describe input columns, or for inputs: to allow a documented schema or description. Otherwise two agents can build different stat_and_sys models from the same task.

  • lc compute launch --wait ran blind inside a pipeline with | tail -3, in the same command as uv add. The agent never checked the launch output, and only later used lc materialize local. It happened to work, but the cluster name local was assumed from the CLAUDE.md-documented default. The agent also ran lc compute down local at the end. A cluster-less mode, or a clearer prompt or skill note that a run needs launch then materialize <name>, would save agents from guessing this sequence. The astra skill covers only the spec, not the lc execution flow.

  • The agent hand-edited astra.yaml with a Python str.replace script. The scaffold left recipe: command: python scripts/fit.py stubs, and it patched them blindly with string matching. This worked here, but it would fail silently if the whitespace differed. Nothing checked that all replacements applied, and only astra validate caught anything. It suggests a gap: no CLI verb or documented path for filling in format:, inputs: and decisions: on an existing output. Error messages could also point at the missing format: explicitly.

  • license had to be added to pyproject.toml by sed to turn on the RO-Crate. The agent knew that [project].license triggers crate maintenance, and it checked ro-crate-metadata.json afterward. Nothing in lc init output or astra tells an agent this is required for the crate. If a crate is expected, lc materialize could print its "no crate, no license" line prominently. Alternatively, the eval prompt could name the requirement.

Full trace: agent-trace artifact on this run.

@EiffL
EiffL merged commit 02e7aaa into main Oct 15, 2026
12 of 15 checks passed
@EiffL
EiffL deleted the pin-rocrate-version branch October 15, 2026 12:12
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