Skip to content

chore: release - #408

Merged
leongdl merged 1 commit into
mainfrom
release-plz-2026-09-23T01-05-29Z
Sep 28, 2026
Merged

leongdl merged 1 commit into
mainfrom
release-plz-2026-09-23T01-05-29Z

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🤖 New release

  • openjd-expr: 0.9.0 -> 0.10.0 (✓ API compatible changes)
  • openjd-model: 0.9.0 -> 0.10.0 (✓ API compatible changes)
  • openjd-cli: 0.2.0 -> 0.3.0
  • openjd-snapshots: 0.2.0 -> 0.2.1 (✓ API compatible changes)
  • openjd-sessions: 0.7.0 -> 0.7.1
Changelog

openjd-expr

0.10.0 - 2026-09-28

Features

  • [breaking] Require create_job's context to cover the template's extensions (#407)

openjd-model

0.10.0 - 2026-09-28

Features

  • [breaking] Allow format strings in host requirement capability names (#409)

  • [breaking] Require create_job's context to cover the template's extensions (#407)

openjd-cli

0.3.0 - 2026-09-28

Features

  • [breaking] Require create_job's context to cover the template's extensions (#407)

openjd-snapshots

0.2.1 - 2026-09-28

Miscellaneous

  • Update Cargo.lock dependencies

openjd-sessions

0.7.1 - 2026-09-28

Miscellaneous

  • Updated the following local packages: openjd-expr, openjd-model


This PR was generated with release-plz.

@github-actions
github-actions Bot requested a review from a team as a code owner September 23, 2026 01:05
@github-actions github-actions Bot changed the title chore: release v0.2.1 chore: release Sep 24, 2026
@github-actions
github-actions Bot force-pushed the release-plz-2026-09-23T01-05-29Z branch 3 times, most recently from 74e3757 to 8c719c0 Compare September 28, 2026 17:08
@github-actions
github-actions Bot force-pushed the release-plz-2026-09-23T01-05-29Z branch from 8c719c0 to da4067a Compare September 28, 2026 17:43
@leongdl
leongdl enabled auto-merge (squash) September 28, 2026 18:03
@leongdl
leongdl merged commit e5f4a14 into main Sep 28, 2026
22 checks passed
@leongdl
leongdl deleted the release-plz-2026-09-23T01-05-29Z branch September 28, 2026 18:31
leongdl added a commit to OpenJobDescription/openjd-model-for-python that referenced this pull request Sep 28, 2026
* chore(deps): Bump openjd-* Rust crates to the 0.10.0 release

openjd-rs released on 2026-09-28: openjd-expr 0.10.0, openjd-model 0.10.0,
openjd-sessions 0.7.1 (OpenJobDescription/openjd-rs#408). This package
pinned 0.9.0 / 0.9.0 / 0.7.0. openjd-sessions 0.7.1 is a transitive re-pin
with no source change.

Two breaking changes, both features:

- #409 makes template::AmountRequirement::name and
  template::AttributeRequirement::name a FormatString instead of a String,
  so a capability name may contain expressions
  (openjd-specifications#189). The §3.3.1.1 / §3.3.2.1 constraints now
  apply to the resolved name.
- #407 requires create_job's context to cover the template's declared
  extensions. With mismatch impossible, the job-creation resolved-value
  checks report every evaluation error instead of silently skipping it.

Only #409 broke compilation, in four places: the two template-type
constructors and the two name getters. The Python-facing `name` stays a
`str` holding the raw template text. v0 models these as
AmountCapabilityName / AttributeCapabilityName, both subclasses of v0's
FormatString, which subclasses str -- so exposing an openjd.expr
.FormatString here would make v0 and v1 diverge where they agree, and
.raw() is what #409 prescribes for reading these fields. One behaviour
change falls out of the adaptation rather than upstream: the constructor
parses, so a malformed format string now raises ExpressionError.

create_job needed no code change. The binding derives its context from
job_template.default_validation_context() when the caller passes none,
which covers the template's extensions by construction; a caller-supplied
mismatched context is what #407 now rejects, and the binding surfaces it.

#407 is a squash of five commits whose message documents three behaviour
changes the release changelog and the PR body do not name:

- eval_boolop no longer suppresses budget errors in operands after an
  unresolved one, the same bypass eval_ifexp had.
- A list comprehension over a *concrete* iterable whose filter evaluates
  unresolved concludes unresolved[list[T]] instead of hard-erroring. This
  was a defect that predated the release, masked by the lenient policy
  #407 deleted, and reachable only at job creation -- the one stage where
  the iterable is concrete and the filter is not.
- Template validation and create_job's re-checks evaluate under
  PathFormat::Posix, so validation outcomes no longer depend on the host
  OS. Windows-only in effect; unverified locally.

Verified: 6243 passed / 24 skipped / 3 xfailed, coverage 94.22%. The three
xfails are the pre-existing openjd.expr known gaps; none flipped. ruff,
black, mypy, cargo fmt and clippy clean. Every behaviour change above was
measured through this package's public API against both 0.9.0 and 0.10.0,
and the openjd.expr expectations are taken from the upstream assertions in
test_unresolved_eval.rs and test_memory.rs.

Four mutants, each rebuilt and each caught: reverting the three pins kills
53 of the new cases, the two __repr__ sites kill 2, the two name getters
kill 11, and swallowing the name parse error kills 2. Each was restored
byte-for-byte with the bytecode cache cleared between runs.

THIRD-PARTY-LICENSES.txt moves only the three version lines; the release
pulled in no new transitive crates.

Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>

* fix: Expose the capability name as a FormatString, not a str

Review feedback on #373: consistency with the other v1 fields beats
consistency with v0 here.

openjd-rs#409 made template::AmountRequirement::name and
template::AttributeRequirement::name a FormatString. The first pass kept the
Python-facing `name` a `str` and parsed on the way in, on the grounds that
v0 models these as AmountCapabilityName / AttributeCapabilityName, both
subclasses of v0's FormatString, which subclasses str. That argument looks
at the wrong neighbour: every other FormatString-typed field on the v1
template types -- `min`, `max`, `anyOf`, `allOf`, `Action.command` -- is an
openjd.expr.FormatString and refuses a bare str. `name` now matches them.

This deletes more than it adds. parse_capability_name and its doc comment go
away, because the FormatString arrives already parsed, and both constructors
go back to being infallible. Validation moves to where it belongs: a
malformed name is rejected by FormatString's own constructor rather than by
a str-typed field that parses behind the caller's back. __repr__ keeps
.raw(), matching Action's treatment of its command.

This is a breaking change to the v1 Python API, and two pre-existing tests
prove it: TestPickle::test_amount_requirement and test_attribute_requirement
both passed `name=` a str, and TestStepTemplate::test_host_requirements
compared `.name` to one. All three are updated, so this is a behaviour
change and not a refactor.

Also from review: the spec edit that changed the documented ModelProfile repr
to `revision=v2023_09` was wrong -- PyModelProfile::__repr__ still emits the
uppercase-V form (rust-bindings/src/model/profile.rs:397), measured as
`ModelProfile(revision=V2023_09, extensions=[EXPR])`. Reverted. The two
`SpecificationRevision.v2023_09` corrections in the same block stand: that
repr is lowercase (profile.rs:63) and `V2023_09` is not an attribute at all.
The divergence between the two reprs is pre-existing and left alone here.

Verified: 6245 passed / 24 skipped / 3 xfailed, coverage 94.32%. ruff, black,
mypy, cargo fmt and clippy clean. Four mutants, each rebuilt and each caught:
reverting the pins to 0.9.0 kills 68 cases, formatting the FormatString in
both __repr__ sites kills 2, both getters returning a constant kills 12, and
both constructors discarding the supplied name kills 10.

Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>

---------

Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>
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