Skip to content

feat(h2o): accept per-port external + contract_name (wire regen) - #62

Merged
rennehan merged 2 commits into
mainfrom
feat/h2o-per-port-external
Jul 19, 2026
Merged

feat(h2o): accept per-port external + contract_name (wire regen)#62
rennehan merged 2 commits into
mainfrom
feat/h2o-per-port-external

Conversation

@rennehan

Copy link
Copy Markdown
Contributor

What

Phase 1.5 CLI leg: the h2o Port gained external + contract_name (already on app main). This vendors the updated OpenAPI contract and regenerates the wire client so the generated Port/WirePort models carry the two new fields.

Changes

  • Vendored contract: openapi.json refreshed from the backend (byte-identical); the Port schema now carries external (boolean, default false) and contract_name (nullable string).
  • Wire regen (./scripts/regen-wire.sh, not hand-edited): Port/WirePort gain external: Option<bool> and contract_name: Option<Option<String>> (double-option for the nullable field). Both skip serializing when unset.
  • Hand-written layer: ports are data, not matched by kind, so show/pull need no structural change. The port-construction sites (mint/stage + tests) set the two fields to None (never sent on the wire) — accept-and-ignore.
  • Test: a graph whose port carries both external and contract_name pulls/shows without error in both output modes.

Gates (all green locally)

  • cargo fmt -p hydrate -- --check -> 0
  • cargo clippy --workspace --all-targets -- -D warnings -> 0
  • cargo test -> 0
  • git diff --exit-code wire/ clean on regen re-run; cmp of vendored openapi.json vs backend byte-identical

Note

A tagged release is needed post-merge (the wire client + vendored contract changed). Version bump / release is handled separately.

The h2o Port schema gained `external` and `contract_name`. Vendor the
updated contract and regenerate the wire client so the generated Port /
WirePort models carry the two new fields (external: Option<bool>,
contract_name: Option<Option<String>>).

The CLI treats these as accept-and-ignore data: it never authors them, so
the hand-written port-construction sites set them to None (skipped on the
wire) and show/pull deserialize + render a graph carrying them without
error. Adds a tolerance test for a port carrying both fields.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rennehan rennehan added the enhancement New feature or request label Jul 19, 2026
@rennehan rennehan self-assigned this Jul 19, 2026
…olerance test (review)

Public repo — strip roadmap phase labels from comments (consistent with #59/#60). Fix the
test comment (it constructs in-memory, doesn't round-trip JSON deserialize) and assert the
port survives into JSON output too, not just Human mode.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rennehan
rennehan merged commit 56bec10 into main Jul 19, 2026
3 checks passed
@rennehan
rennehan deleted the feat/h2o-per-port-external branch July 19, 2026 15:20
rennehan added a commit that referenced this pull request Jul 19, 2026
…e contract) (#63)

Ships #62 (accept the per-port external + contract_name h2o fields; regenerated wire
client from the updated openapi). Bumps Cargo.toml/Cargo.lock 0.1.10→0.1.11 + README
install tag. release.yml asserts the tag matches this version.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant