Skip to content

release: openadapt-types 0.24.1 and openadapt-verify 0.2.1; launcher accepts Flow 4 - #2540

Open
abrichr wants to merge 11 commits into
mainfrom
claude/release-types-0.24.1
Open

abrichr wants to merge 11 commits into
mainfrom
claude/release-types-0.24.1

Conversation

@abrichr

@abrichr abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member

This PR is a release. Merging it publishes openadapt-types 0.24.1 and openadapt-verify 0.2.1 through release-package.yml, once the Packages push run for the merge commit passes. It is covered by the standing approval for reviewed releases. Do not enable auto-merge.

Why

openadapt-flow 3.4.0 imports openadapt_types.receipt (in receipt_record.py), which openadapt-types 0.24.0 does not have. On a clean install of Flow 3.4.0, import openadapt_types.receipt fails. Types 0.24.1 adds that module and the other new ones, and it stays inside the <0.25.0 range every released Flow 3 accepts. Installing it therefore repairs existing Flow 3.4.0 installs.

This is the first of three release PRs:

  1. This PR: types 0.24.1, plus the caps that must allow Flow 4 before the in-tree Flow becomes 4.0.0.
  2. Flow 4.0.0 and openadapt-agent 2.3.0. This waits until types 0.24.1 is on PyPI, because Flow's on-prem wheelhouse is built from Flow's lock, and the lock can only pin a types version PyPI serves.
  3. Launcher 1.24.0, with the platform manifest pinned to Flow 4.0.0 and agent 2.3.0.

What changes

openadapt-types 0.24.1

  • New modules: receipt (the record/run/v1 receipt), receipt_callback, run_ledger and exception_card.
  • The reward escalated_after_effect outcome.
  • Digest-stable:
    • escalated_after_effect_reward defaults to 0. A contract that never declared it, including every contract written or certified under 0.24.0, earns 0 for the new outcome.
    • At its default the field is left out of serialization and hashing. So 0.24.0 contracts and certificates load, hash, verify and score exactly as before, and 0.24.1 writes files that 0.24.0 can read.
    • A declared value is paid as declared.
  • A fixture of contracts and certificates issued by openadapt-types 0.24.0 from PyPI checks all of this, including how 0.24.0 scored each outcome.
  • Flow's synthetic reward bundle now declares escalated_after_effect_reward: 0.5, so its demo and Harness² partial credit are unchanged.

openadapt-verify 0.2.1

Launcher (not released here)

  • Requires openadapt-flow >=3.3.0,<5.0.0, and openadapt doctor accepts the same range.
  • platform-manifest.json is regenerated with the same component pins, so its compatibility block matches.
  • The launcher version is unchanged. It releases only on dispatch.

Checks

  • Types tests pass on Python 3.12 and 3.10.
  • Flow reward, Harness² and execute tests pass against these types (243 passed).
  • uv lock --check passes in the root, packages/types and packages/verify.
  • The platform manifest validates offline and online.
  • The file-size ratchet passes.
  • No path in .github/agent-safety-manifest.json is touched.

…ow 4

openadapt-flow 3.4.0 imports openadapt_types.receipt, which openadapt-types
0.24.0 does not have, so a clean install of 3.4.0 fails on every receipt
path. openadapt-types 0.24.1 adds the receipt, receipt callback, run ledger
and exception card modules. It stays inside the <0.25.0 range every released
Flow 3 accepts, so it also repairs Flow 3.4.0 installs.

0.24.1 keeps every 0.24.0 digest. escalated_after_effect_reward enters
RewardContractV1.digest only when it differs from its default, and the
pinned contract digest is back to its 0.24.0 value. A fixture of contracts
and certificates issued by openadapt-types 0.24.0 from PyPI checks that they
hash and verify unchanged. A 0.24.0 contract with verified_reward of 0.5 or
less still loads; asking then earns no credit.

This is the first of two release PRs. Flow 4.0.0 needs openadapt-types
0.24.1 on PyPI first: its on-prem wheelhouse is built from Flow's lock,
which can only pin a types version PyPI serves. So this PR also lifts the
caps that would break CI once the in-tree Flow is 4.0.0:

- the launcher accepts openadapt-flow >=3.3.0,<5.0.0, in its requirements
  and in `openadapt doctor`'s supported range; the platform manifest is
  regenerated with the same component selection so its compatibility block
  matches. The launcher releases only on dispatch, so nothing ships here.
- openadapt-verify 0.2.1 accepts openadapt-flow <5 (#2535).
- verify's distribution check asserted the old <4 Flow cap; it now expects
  <5, so the verify job and its release build pass.
- RewardScoringPolicyV1 leaves escalated_after_effect_reward out of its
  serialization at the default, so a contract file 0.24.1 writes stays
  readable by 0.24.0 and hashes the same; the digest needs no special case.
  A test checks the serialized form against the 0.24.0 fixture.
- The types notes move the validator change into Features and add a
  Compatibility section. The verify note names the extras it widens.

Verify's suite passes against the Flow 4.0.0 source (91 passed; the 3
installed-CLI tests need an installed openadapt-verify and fail the same
way without this change).
escalated_after_effect_reward now defaults to 0, not 0.5. A contract
written or certified before the escalated_after_effect outcome existed
never declared it, so the outcome must not start paying under it.

- The field is still left out of serialization at its default, so 0.24.0
  contracts and certificates hash, verify and load as before, and 0.24.1
  writes files 0.24.0 can read.
- The validator no longer needs a default exception: any value at or above
  verified_reward is refused, and 0 is always below it.
- The 0.24.0 fixture now also records how 0.24.0 scored every outcome it
  knew (tier 2, policy update 120). The test checks 0.24.1 scores them the
  same and gives the new outcome 0. A declared value is paid as declared.
- Flow's synthetic reward bundle declares escalated_after_effect_reward 0.5,
  so its demo and Harness² tests keep their partial credit. That contract
  declares it, so it is paid.
REWARD.md, the reward worker docstring, HARNESS2.md and REWARD_WORKER.md
still said the default was 0.5. The types notes and docstring restore the
below-1 bound beside the below-verified_reward one. The exported contract
schema carries the new docstring.
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: 3da8f95

Fresh Claude reviewers were given the diff and the release docs, not the author's conclusions.

  • Review 1, round 1 (950b787): REQUEST CHANGES.
    • verify's distribution check still asserted Flow <4.
    • Files 0.24.1 wrote couldn't be read by 0.24.0.
  • Review 1, round 2 (d37a403): APPROVE.
  • Review 2, delta (465799f): APPROVE. It covers escalated_after_effect_reward defaulting to 0, so an undeclared escalation earns nothing.
    • 3,000 fuzzed 0.24.0 contracts and certificates: digests, certificate binding and the score of every 0.24.0 outcome are identical. The new outcome scores 0.
    • 3,000 0.24.1 outputs load under a clean 0.24.0 with the same digest.
    • The fixture, which includes how 0.24.0 scored each outcome, is genuine 0.24.0 output.
    • Explicit values are serialized and paid as declared.
    • Flow's synthetic bundle declares 0.5, so its partial-credit tests keep passing: 243 Flow reward, Harness² and execute tests passed.
  • Review 2, docs delta (3da8f95): APPROVE. It is docs only, and the schema matches the model.

Merge condition: main's Packages push run must be green, or nothing publishes. Flow's types floor moves to >=0.24.1 in the Flow 4.0.0 PR.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: 3da8f95

Author declaration: Claude authored this release PR. It touches no path in .github/agent-safety-manifest.json, so protected-safety-review does not apply.

….1 notes

#2487 declared the domain-neutral alias before the v1 member in StepClass,
ApproverPolicyRefusal and OutcomeSourceV1, so .name, str() and repr() of the
v1 member changed (StepClass.CLINICAL_WRITE.name became HIGH_RISK_WRITE).
The v1 member now comes first and the new name is the alias, as in 0.24.0.
Values, wire bytes and schemas are unchanged.

The 0.24.1 notes now list #2487: the managed_job module and schemas, the
domain-neutral aliases and accepted input forms, and that output stays
byte-identical to 0.24.0.
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: 81deab2

A fresh Claude reviewer did this delta review after main, including #2487 (generalize healthcare/clinic core contracts), was merged into this branch. The question was whether openadapt-types 0.24.1 is still a safe patch release on 0.24.0 with #2487 included. Verdict: yes.

  • No public names lost. No 0.24.0 public name, enum member, enum value, constant or model field was removed or renamed.
  • Round-trip against 0.24.0 output. The reviewer collected 101,527 model instances built by 0.24.0's own test suite under openadapt-types 0.24.0 from PyPI. It added 8,280 fuzzed or generated approval, clinic, plain-outcome and reward documents and 2,019 approver policies. All of them load under this head and give byte-identical dumps and digests, with 0 load errors. The reverse direction also holds: this head's output loads under 0.24.0 with the same bytes.
  • Enum names. The first round found that refactor(types,desktop): generalize healthcare/clinic core contracts and policies #2487 had changed the canonical names of the v1 enum members. That is now fixed: .name, str() and repr() of StepClass, ApproverPolicyRefusal and OutcomeSourceV1 match 0.24.0 exactly.
  • Behaviour. ApproverPolicyV1.refusal() gives results identical to 0.24.0 over 262,470 combinations, and plain_outcome() gives identical output over 40,000 inputs.
  • Schemas. Every document that 0.24.0's schemas accepted is accepted by the packaged schemas here, and the vocabulary changes are text only.
  • Tests. Types: 908 passed. Flow approval, approver, plain-outcome and interop tests run against these types: 553 passed. The reward fixture from 0.24.0 passes.
  • Non-blocking items, left as they are:
    • "clinical_write" is listed twice in the StepClass enum of two schema files. This doesn't change validation.
    • The models accept the new domain-neutral input keys, which are always written out in their v1 form.
    • Clinic* class aliases report Managed* names.

Earlier rounds approved 3da8f95 and d37a403.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: 81deab2

Author declaration: Claude authored this release PR. It touches no path in .github/agent-safety-manifest.json, so protected-safety-review does not apply.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: 45f0cd5

Delta check after merging main (bde0f49). The merge brings in #2544's fix for the F821 stop_requested lint error in connector/daemon.py, which had failed flow core lint on this PR.

Among this PR's own files, the merge changes only main's one-line docstring edit in packages/flow/openadapt_flow/reward/bundle.py. The escalated_after_effect_reward: 0.5 declaration is intact. packages/types and packages/verify are byte-identical to 81deab2, so the earlier round-trip and enum-name approval still applies.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: 45f0cd5

Author declaration: Claude authored this release PR. It touches no path in .github/agent-safety-manifest.json, so protected-safety-review does not apply.

Locally on this head, the flow-lint steps all pass: release consistency, ruff, engine generality (7 baseline hits), ruff format, and mypy (855 files).

…0.24.1

# Conflicts:
#	packages/types/CHANGELOG.md
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: e0821f7

Delta check on a merge of origin/main 876f3f5 into 45f0cd5. That main commit includes #2543, an unreviewed bump of types to 0.24.1; the revert is #2551.

The one conflict, in packages/types/CHANGELOG.md, was resolved to this PR's reviewed notes. After the merge:

  • packages/types and packages/verify are byte-identical to the approved 45f0cd5.
  • None of this PR's 27 files changed.
  • The merge adds only main's four cli_surface test and fixture files.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: e0821f7

Author declaration: Claude authored this release PR. It touches no path in .github/agent-safety-manifest.json.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: e872894

Delta check on a clean merge of origin/main 6161975 into e0821f7. The merge brings in #2546's CLI help snapshot fix and #2324's Desktop changes: 16 files under packages/desktop/ and a 2-line edit to tests/fixtures/cli_surface.json.

packages/types and packages/verify are byte-identical to the approved 45f0cd5, and none of this PR's files changed.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: e872894

Author declaration: Claude authored this release PR. It touches no path in .github/agent-safety-manifest.json.

0.24.1 was stamped on main by #2543 without this PR's reviewed types code
and was never published; that tree breaks 0.24.0 contracts. The reviewed
content ships as 0.24.2. Only the version (pyproject, uv.lock) and the
changelog change; every other types and verify file is byte-identical to
the reviewed 45f0cd5.
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude
Reviewed-Head: 93cfc32

Delta check. This head merges origin/main c416c46 and ships the reviewed types content as openadapt-types 0.24.2. #2543 stamped 0.24.1 on main without this PR's code, and that 0.24.1 was never published.

  • Types and verify: compared with the approved 45f0cd5, only three files change: packages/types/pyproject.toml (the version), packages/types/uv.lock (the editable version) and packages/types/CHANGELOG.md (the new ## v0.24.2 (2026-11-22) header, a note that 0.24.1 was never published, and two body mentions updated). The types code, schemas and tests are byte-identical.
  • Launcher: openadapt/cli.py changed only through the main merge. This PR's delta against main is still just the Flow-range widening.
  • Release plan: release_plan.decide() against live PyPI decides "release" for openadapt-types 0.24.2 and openadapt-verify 0.2.1. PyPI's highest types version is 0.24.0, and neither tag exists yet. This simulation does not check CI status.
  • Nit (follow-up): a few code comments still say "0.24.1" where 0.24.2 is meant.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: 93cfc32

Author declaration: Claude authored this release PR. It touches no path in .github/agent-safety-manifest.json.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 93cfc32

Delta versus the previously reviewed #2540 tree at e87289447cc06cd799f08b11f073eda38ea287a2, and versus my findings on main's unpublished 0.24.1 stamp (7087329989). This head rebumps the reviewed types content to openadapt-types 0.24.2 and still ships openadapt-verify 0.2.1. I did not author this change. This PR is publish-triggering. I will not merge, tag, publish, dispatch, or rerun, including a rerun of packages.yml 45053788595.

Against e87289447cc0, packages/types and packages/verify differ only in the types version and changelog (pyproject.toml 0.24.1 → 0.24.2, the matching uv.lock pin, and a ## v0.24.2 changelog heading that states 0.24.1 was stamped on main but never published). I re-ran the same checks on this tree:

  • StepClass.CLINICAL_WRITE.name is CLINICAL_WRITE and str() is StepClass.CLINICAL_WRITE, matching PyPI 0.24.0. HIGH_RISK_WRITE remains an alias.
  • escalated_after_effect_reward defaults to 0.0 and is omitted from model_dump() at that default.
  • Both issued-0.24.0 fixture contracts load, and their digests still match PyPI 0.24.0 exactly (sha256:15844d27bd5d12fe…5246c and sha256:7ed7ab3a5f17daa0…884650).

That is the release path I recommended in 7087329989 (option a). Once this merge is the newest first-parent commit touching packages/types, release_plan should build 0.24.2 rather than main's unreviewed 0.24.1 stamp. Flow 3.4.0's <0.25.0 cap will accept 0.24.2.

Notes, not blocking:

I will not merge this publish-triggering PR. Publication stays the owner's call. The scoped types STOP still applies to any other packages/types change.

This branch has not been deployed

No deployments
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.

openadapt-verify caps openadapt-flow below 4

1 participant