Skip to content

fix(release): read a pre-0.14 stable release's HTTP contract from its source - #1125

Merged
ragnorc merged 1 commit into
ModernRelay:mainfrom
ragnorc:edge-stable-contract-from-source
Oct 22, 2026
Merged

ragnorc merged 1 commit into
ModernRelay:mainfrom
ragnorc:edge-stable-contract-from-source

Conversation

@ragnorc

@ragnorc ragnorc commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

What

Every edge release text compares the build with the latest stable release. v0.13.0's omnigraph version has no http-contract line, so the current text for edge-20261020-7fd9cc9 says:

HTTP. This build speaks HTTP contract 0.14. v0.13.0 does not report its contract; its release notes name it.

That hides the one thing a deployer needs: the contract changed (0.13 → 0.14, from #1074), so the CLI, the server and every HTTP integration have to be upgraded together.

How

  • The publisher's facts step now resolves the stable tag. A missing tag fails the step. If the tag's source has crates/omnigraph-api-types/src/lib.rs, the step extracts that file.
  • scripts/edge_release.py body --stable-source <file> reads pub const HTTP_API_CONTRACT: &str = "…"; from that file. It uses the value only when the stable binary reports no contract. A binary that does report one must agree with its source, and a file defining the constant twice is refused.
  • When neither the binary nor the source names a contract, the text stays as it was ("not reported").

v0.13.0's CLI (client.rs) and server (http_contract.rs) both send and check this constant, so it is the contract that release speaks. From v0.14.0 on, omnigraph version --json reports the contract itself, and the source fallback only cross-checks it.

Evidence

  • scripts/test_edge_release.py: 17 tests, 2 of them new. One covers the fallback, agreement, disagreement, a duplicate definition and an absent constant. The other runs body end to end with --stable-source and checks the refusal of --stable-source without --stable-tag.

  • I ran the facts and compose logic locally against the real v0.13.0 tag and binary and the published 0.14.0-edge+7fd9cc9 binary. It renders:

    | HTTP contract | 0.14 | 0.13 |
    
    **HTTP.** A client and a server must send the same HTTP contract. This build speaks 0.14 and v0.13.0 speaks 0.13: upgrade the CLI, the server and every HTTP integration together.
    
  • actionlint, check-release-vocabulary-gates.py, check-workflow-action-pins.py, check-docs.py, check-agents-md.sh and typos all pass.

docs/dev/ci.md documents the fallback.

… source

The edge release text compared the build's HTTP contract with the latest
stable release's, but v0.13.0 does not report its contract, so the text
said only that it was not reported and never that the contract changed.
The publisher now reads HTTP_API_CONTRACT from the stable tag's
crates/omnigraph-api-types/src/lib.rs, and the composer uses it when the
binary reports none; a binary that reports a contract must agree with its
source.
@ragnorc
ragnorc marked this pull request as ready for review October 21, 2026 23:20
@ragnorc
ragnorc added this pull request to the merge queue Oct 22, 2026
Merged via the queue into ModernRelay:main with commit 63919e7 Oct 22, 2026
32 checks passed
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