Skip to content

fix(ci): block on the reverse engine contract and preflight release versions - #200

Merged
BunsDev merged 1 commit into
mainfrom
fix/release-contract-gate
Oct 15, 2026
Merged

BunsDev merged 1 commit into
mainfrom
fix/release-contract-gate

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Member

Summary

Make the reverse engine-contract CI job a hard gate that cannot pass on empty or skipped execution, and add a forward-only version and stamp preflight to the release workflows.

Context

  • Related request: v0.9.0 release-readiness gates "Public contracts/reverse CI" and "Version stamping mechanism".
  • Scope: CI and release workflows, release scripts, COVEN.md release checklist, docs/reverse-contract-ci.md.
  • Non-goals: no Rust source change, no branch-protection change, no version stamp change in the checkout, no workflow dispatch. Installer checksums and canonical archive packaging land separately (the release-workflow packaging hunks are not in this PR).

Changes

Reverse contract (rust-ci.yml, scripts/run-coven-contract.py):

  • Remove continue-on-error from coven-contract. Before, cargo test contract on the consumer passed when zero tests matched or each test printed contract: skipped.
  • Build the consumer's coven-cli bin test target with --no-run --message-format=json. The runner resolves exactly one test executable from that JSON and runs exactly contract_version_output_parses, contract_auth_status_json_is_machine_readable and contract_print_flags_are_accepted, requiring one executed pass each.
  • Missing, ignored, skipped, empty-success, nonzero and timed-out runs fail. Each run has a 90 s deadline that kills its own process group, uses disposable engine/Coven state, an allowlisted environment with no inherited credentials, and blocked HTTP proxies.
  • The engine for this job is a debug build (cargo build -p claurst --locked).
  • scripts/test-coven-contract-runner.py emulates libtest to cover each failure path. CI runs it before the real consumer.

Release preflight (scripts/check-release-version.py, release.yml, patch-release.yml, bump-version.py):

  • The requested tag must be strictly newer, by SemVer precedence, than every remote v* tag. Malformed version-shaped tags and a failed remote query fail the check.
  • Cargo workspace, every member's lock entry, npm, ACP registry version and its five archive URLs, the README engine introduction and Beta callout, docs/index.md and docs/installation.md must all carry the version.
  • release.yml runs the preflight before the build matrix, replacing the old Cargo-only tag check, and again immediately before creating the release. Normal and patch releases share the coven-code-release-publication concurrency group, so different versions cannot publish out of order.
  • bump-version.py now stamps the README engine introduction (`coven-code` **vX.Y.Z**) instead of rewriting the upstream "Claurst vX" attribution.
  • scripts/test-release-version.py (11 tests) runs the real stamper in disposable copies and covers equal/older/prerelease ordering, metadata equality, malformed versions, remote failure, lock/npm/docs/URL drift, a stale README introduction, and a tag that appears between the early and final checks. Rust CI runs it.
  • COVEN.md: the release checklist now covers script-only stamping, the preflight, exact-source gates, explicit publication, five-archive verification, and npm as opt-in.

Validation

  • python3 scripts/test-release-version.py: 11 tests OK.
  • python3 scripts/test-coven-contract-runner.py: 4 tests OK.
  • python3 scripts/check-release-version.py v0.8.0 against the live remote: exit 1, "v0.8.0 must be strictly newer than v0.8.0".
  • actionlint -ignore SC2016 .github/workflows/release.yml .github/workflows/patch-release.yml .github/workflows/rust-ci.yml: pass. SC2016 is pre-existing in the release-note shell block.
  • git diff --check: clean.
  • Source worktree, same runner: 3 real consumer passes against consumer f772b513 and engine 03a6271. Invalid version output, string-valued loggedIn and print exit 2 were each rejected through the real consumer. Consumer main's three test definitions are unchanged as of this PR.
  • Current-consumer build and run: the blocking Coven engine contract job on this PR is the first full run against consumer main.
  • Cargo fmt/check/clippy/test: N/A, no Rust source change. Rust CI runs because the workflow changed.

PR Readiness

  • Diff is limited to the intended files.
  • Generated files were not edited by hand; no checkout version stamps changed.
  • User-facing docs updated (COVEN.md checklist, docs/reverse-contract-ci.md).
  • No secrets, credentials, local paths, or unrelated logs are included.
  • Remaining risks:
    • Rust CI now depends on the consumer's default branch. A consumer-side contract break blocks engine PRs, which is the intent.
    • The upstream print test only rejects exit 2; it does not prove successful inference or stream semantics.
    • Tag or release writes made outside the shared concurrency group are not serialized, and the final tag query is not atomic with release creation.
    • GitHub concurrency keeps only one pending run per group, so a cancelled pending dispatch must be checked by hand.

…ersions

The coven-contract job was continue-on-error and ran `cargo test
contract`, which passes when the consumer has zero matching tests or
skips them. Make it blocking and run it through
scripts/run-coven-contract.py, which resolves the consumer test binary
from Cargo's JSON artifacts, runs exactly the three engine-facing tests
with isolated state and a 90s process-group deadline, and fails on
missing, skipped, ignored or empty success.

Add scripts/check-release-version.py: the requested tag must be strictly
newer than every remote version tag, and every canonical stamp (Cargo
workspace and lock, npm, ACP registry version and five archive URLs,
README, docs) must match. release.yml runs it before the build and again
just before publication, and both release workflows share one
concurrency group across versions. bump-version.py now stamps the README
engine introduction instead of the upstream Claurst attribution.

Tests: scripts/test-coven-contract-runner.py (adversarial libtest
emulation) and scripts/test-release-version.py, run from Rust CI.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 15, 2026 7:00am UTC

Request Review

@BunsDev
BunsDev merged commit c6c6a2f into main Oct 15, 2026
4 checks passed
BunsDev added a commit that referenced this pull request Oct 15, 2026
)

bump-version.py wrote each surface as it went, so a later validation
failure (invalid npm JSON, a missing docs pattern, missing ACP archive
URLs) left earlier Cargo, npm and docs files already changed. Stage all
seven files in a path-to-text map, run the existing parsing and pattern
checks first, then write once. Four write sites become one.

Add scripts/test_bump_version.py (four disposable-fixture cases, three
failed before) and a version-stamp-tests workflow. The success case
asserts the README engine introduction stamp from #200.

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 15, 2026
#321)

Auto-release's forward-only step still compared tags with sort -V
against local tags, unlike manual releases, which since #200 run the
SemVer preflight against origin. Surface unit 63 replaced that step
with its own guard script, which collides with #200's script at the
same path; and #200's script also verifies version stamps, which do not
exist yet at that step (bump-version.py runs after it).

Reconcile them: add a --forward-only mode to #200's
check-release-version.py that checks only SemVer precedence against
origin tags, and run it from auto-release before the bump. Stamps are
still verified by release.yml's preflight and recheck. Unit 63's
ordering cases (first release, unrelated tags, equal and lower
versions, numeric components, the SemVer prerelease sequence, remote
failure) move into test-release-version.py, and its lightweight
workflow runs those tests when the release workflows or scripts change.
Malformed version-shaped tags keep #200's fail-closed behavior.

Surface unit 63.

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev
BunsDev deleted the fix/release-contract-gate branch October 18, 2026 08:31

This branch was successfully deployed

1 active deployment
Preview — a0c509ad Deployed Oct 15, 2026 by vercel[bot]
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