chore(versions): bump gateway/ns mix.exs + proto/Cargo.toml to 0.29.4 with regression pins#14
Conversation
… with regression pins What - Bumps `gateway/mix.exs` and `ns/mix.exs` from 0.24.0 → 0.29.4. - Bumps `proto/Cargo.toml` from 0.29.3 → 0.29.4. - Adds the same "version reporting (regression pin)" describe block to `gateway/test/ztlp_gateway/release_test.exs` and `ns/test/ztlp_ns/release_test.exs` that PR #13 added for relay (semver shape + runtime-vs-declared drift + ≥0.29.4 floor guard). - Adds `proto/tests/version_pin_test.rs` with two equivalent Rust-side pins (parseable semver + ≥0.29.4 floor guard) using the in-crate `ztlp_proto::updater::SemVer` to avoid taking a new external dependency. Why - PR #13 fixed the relay's version-string drift but explicitly left the rest of the tree as follow-up scope (handoff Known Problems #6: "gateway/mix.exs and ns/mix.exs at 0.24.0; proto/Cargo.toml at 0.29.3"). Gateway and NS had been pinned at 0.24.0 for five minor versions, so `Application.spec(:ztlp_gateway, :vsn)` and `Application.spec(:ztlp_ns, :vsn)` were lying about which tag was actually deployed — the exact bug class PR #13 fixed for relay. Same lie, three more components. - Without regression pins on these other components, the same drift can silently recur on the next tag cut. Details - Floor guard uses `Version.compare(declared, "0.29.4") in [:gt, :eq]` (Elixir) / `actual.cmp(&floor)` (Rust) rather than asserting a literal version string. This is deliberate: literal-string assertions become test maintenance burden on every routine bump, whereas a floor guard only fails on accidental down-bumps below the v0.29.4 strict-routing tag. - Runtime-vs-declared drift test catches both directions of the bug PR #13 found: (a) mix.exs bumped but .app cache stale, and (b) tag cut without bumping mix.exs. - Rust-side test re-uses the in-crate `updater::SemVer` parser rather than pulling in the external `semver` crate. This exercises the same code path the self-updater uses, so if that parser ever regresses both will catch it. - mix.exs comment blocks explain the bump inline so future readers see the on-call story at the point of change, not just in the test file or handoff. - No source-code logic changed; this is a version-string + test-only PR. Public API, wire format, and runtime behavior are untouched. Tests (TDD discipline followed) - RED step verified per-component before bump: * gateway: `mix test test/ztlp_gateway/release_test.exs --seed 0` → "mix.exs version 0.24.0 is older than the v0.29.4 strict-routing tag" (1/15 failures, all in the new floor-guard test, exactly as designed). * ns: `mix test test/ztlp_ns/release_test.exs --seed 0` → "mix.exs version 0.24.0 is older than the v0.29.4 strict-routing tag" (1/15 failures, identical message). * proto: `cargo test --test version_pin_test` → "proto/Cargo.toml version 0.29.3 is older than the v0.29.4 strict-routing tag" (1/2 failures, parseable-semver test still green so we know the fixture is sane). - GREEN step after bumps: * gateway: 15/15 in release_test.exs; 835/835 in full `mix test` (seed 1). Note: seed 55290 surfaces two pre-existing test-ordering flakes (TLS port reuse in tls_phase2_test.exs and a GenServer teardown race in crl_server_test.exs) — both also reproduce on plain `main` and are unrelated to this PR. Confirmed by stash + checkout `main`-only files + rerun on the same seed. * ns: 15/15 in release_test.exs; 729/729 in full `mix test`. * proto: 2/2 in version_pin_test; 858/858 in `cargo test --lib --release` (matches the pre-branch baseline). Validation (non-test) - `cargo check --release` clean (31 pre-existing dead-code warnings in `proto/src/bin/ztlp-cli.rs` unchanged — Known Problems #4 scope). - Relay suite re-run unchanged: 597/597 (confirms no cross-component collateral damage). - ztlp.net Python suite unchanged: 48/48 in `tests.test_launch_app`. - Infra untouched. No relay restart, no gateway restart, no NS restart. Live binaries still on v0.29.3 (relay) / v0.24.0 (gateway, ns) — actual deployment of the bumped versions is a separate, Steve-gated step. Follow-up - After merge, decide tag strategy with v0.29.4 already in the past: either (a) cut v0.29.5 that includes this + PR #13's mix.exs bump (cleanest), or (b) accept "tag is source of truth; mix.exs is best-effort" for the trailing v0.29.4 and reset on v0.30.0. - Task #3 (per-zone HMAC `Config.registration_secret/0`) is still the prod-readiness blocker and is the hard dependency for the Bootstrap workstream (handoff §"HARD DEPENDENCY uncovered while locking in #5"). - Known Problems #4 (`cargo fix` pass on 31 dead-code warnings in `proto/src/bin/ztlp-cli.rs`) still open; left out of scope here to keep this PR tight. Refs - PR #12 (v0.29.4 strict-routing): 829abdf - PR #13 (relay mix.exs vsn pin): d22afbf - Handoff: ~/hermes_session_handoff.md "Known Problems #6", "Open Question #1"
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughGateway, ns, and proto modules bump their versions from prior values to ChangesVersion Pin Floor 0.29.4 Across Modules
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…lean v0.29.5 tag (#15) What - Bumps `relay/mix.exs`, `gateway/mix.exs`, `ns/mix.exs` from 0.29.4 → 0.29.5. - Bumps `proto/Cargo.toml` from 0.29.4 → 0.29.5. - No test changes — the regression pins added in PR #13 / PR #14 still catch drift (semver-shape + runtime-vs-declared + ≥0.29.4 floor). Why - v0.29.4 tag was cut at commit `829abdf` BEFORE PR #13 and PR #14 bumped the four declared versions. That means a container built from the v0.29.4 tag reports its runtime vsn as the PRE-bump value, which is exactly the on-call-lying bug PR #13 introduced regression tests for. - The fix is to cut a NEW tag whose commit POST-DATES the bumps. v0.29.5 is the smallest possible bump that achieves this — pure version-string alignment, no functional change. - After this PR merges and v0.29.5 is tagged: git tag == relay vsn == gateway vsn == ns vsn == proto CARGO_PKG_VERSION == "0.29.5". The existing `release_test.exs` runtime-vs-declared drift test, run inside any container built from this tag, will report agreement instead of drift. Details - Floor guard in `release_test.exs` and `version_pin_test.rs` stays at 0.29.4. This is deliberate: the floor is a stable lower bound, not the current version. Ratcheting it on every routine bump is the exact maintenance burden the floor-guard pattern was designed to avoid (see the PR #13/#14 commit messages). 0.29.5 satisfies ≥0.29.4, and an accidental down-bump below 0.29.4 (which would lose the strict-routing fix) is what the floor exists to catch. - mix.exs comment blocks updated in-place to reference both PR #14 and this PR, so the version-line provenance is readable at the point of change without chasing PRs in git log. - No source-code logic changed. Public API, wire format, runtime behavior unchanged. Tests (green on this branch) - `cd proto && cargo test --lib --release`: 858 passed - `cd proto && cargo test --test version_pin_test`: 2 passed - `cd relay && mix test`: 597 passed - `cd gateway && mix test --seed 1`: 835 passed (seed 1 avoids the two pre-existing seed-55290 flakes in tls_phase2_test and crl_server_test — both documented in the handoff as Task #6 and unrelated to this PR.) - `cd ns && mix test`: 729 passed - `cd ztlp.net && python3 -m unittest tests.test_launch_app`: 48 passed - Total: 3,069 tests, 0 failures. The runtime-vs-declared drift test in each release_test.exs was the key verification — it exercises the same `Application.spec/2` RPC that lies on a misbuilt container. All three Elixir suites pass after the bump, which means mix recompiled the .app files to match the new declared version. This is the in-source-tree equivalent of the `docker exec ... rpc 'Application.spec(_, :vsn)'` check that found the original PR #13 bug. Validation - `git diff --stat` matches expectation: 4 files, ~23 insertions, ~19 deletions (the changes are mostly comment-block updates around the one-character version bumps). - No source code changes; no risk of breaking runtime behavior. - No infra touched. Follow-up (post-merge) - Tag `v0.29.5` on main, push tag with openclaw SSH key, watch the Release workflow to green. - Deploy `priceflex/ztlp-relay:v0.29.5` to staging relay (`34.218.240.106`) when Steve OKs the restart (iOS bench risk). A container built from v0.29.5 will report `:vsn = "0.29.5"` correctly, closing out the original PR #13 defect end-to-end. - Task #2 (per-zone HMAC `Config.registration_secret/0`) remains the prod-readiness blocker and hard dependency for the Bootstrap workstream. Refs - PR #12 (v0.29.4 strict-routing): 829abdf - PR #13 (relay mix.exs vsn pin): d22afbf - PR #14 (gateway/ns/proto vsn pin): 0a6fbb6 - Handoff: ~/hermes_session_handoff.md "Active Tasks → Task 0" decision list (Option 1 — cut v0.29.5 immediately).
…0.29.6 tag (#23) What ----- Bump the four declared versions (relay/mix.exs, gateway/mix.exs, ns/mix.exs, proto/Cargo.toml) from 0.29.5 to 0.29.6 so the upcoming v0.29.6 git tag captures a coherent release where all four versions agree. Why --- v0.29.6 is the coherent Phase 1 + 1.5 + 2 per-zone HMAC ship: * Phase 1 (PR #20, 7848f36) — relay HmacSecrets module + V1 fallback path with 31 new tests. * Phase 1.5 (PR #21, 5f4085f) — relay V2 wire frames (0x0E GATEWAY_REGISTER_V2 / 0x0F CLIENT_ROUTE_V2) with explicit zone_id field. 13 new tests. * Phase 2 (PR #22, bff6cd5) — gateway HmacSecrets module + RelayRegistrar V2 emission gated by ZTLP_GATEWAY_USE_V2_FRAMES. 25 new tests. Per the v0.29.4 → v0.29.5 lesson (PR #14, PR #15), we bump declared versions in the same commit that the tag will point at — not after, so containers built from the tag report their correct vsn. Details ------- No code changes — pure version bump. Cargo.lock is gitignored at proto/.gitignore:3 so it doesn't show in the diff; `cargo update -p ztlp-proto` was run locally to refresh it for the workspace. The regression-floor tests verify the bump is consistent: * proto/tests/version_pin_test.rs — both pin tests pass * relay/test/ztlp_relay/release_test.exs — 15/15 pass * gateway/test/ztlp_gateway/release_test.exs — 15/15 pass * ns/test/ztlp_ns/release_test.exs — 15/15 pass Validation ---------- cd ~/ztlp grep -rn '0\.29\.[0-9]' --include='*.exs' --include='*.toml' \ relay/mix.exs gateway/mix.exs ns/mix.exs proto/Cargo.toml # Each file should now read 0.29.6 in its version: declaration cd ~/ztlp/proto && cargo test --test version_pin_test --release # 2/2 cd ~/ztlp/relay && mix test test/ztlp_relay/release_test.exs # 15/15 cd ~/ztlp/gateway && mix test test/ztlp_gateway/release_test.exs # 15/15 cd ~/ztlp/ns && mix test test/ztlp_ns/release_test.exs # 15/15 Follow-up --------- After this merges to main, tag v0.29.6 from the merge commit. Then the deploy procedure (handoff § "Deploy procedure") builds relay + gateway images from that tag and SSH-pipes them to the staging hosts. Phase 3 operator rollout follows. Refs ---- - Task #2 Phase 1+1.5+2 in `~/hermes_session_handoff.md` - Design doc: `docs/per_zone_hmac_design.md` - Prior tag bumps for context: PR #13 (relay 0.29.4), PR #14 (gateway/ns/proto 0.29.4), PR #15 (all four 0.29.4 → 0.29.5)
…t floors (#41) What: Coordinated version bump across all four component manifests to match the v0.30.3 git tag cut from a5993ee (PR #40 — Z2LS gateway-auth enrollment API). Floors in release_test.exs / version_pin_test.rs ratcheted from 0.29.4 → 0.30.3 so a future v0.30.4 cut without bumping these files will fail CI loudly. Why: v0.30.0 through v0.30.2 produced Docker image tags and a git tag but did not have a coordinated four-component manifest bump. That's the exact PR #13/#14 drift class — runtime services on v0.30.2 containers report Application.spec(:ztlp_ns, :vsn) == '0.30.0' (or some other stale value depending on when they were last compiled). The release-version-pinning skill prescribes ratcheting the floor + bumping the manifests in one PR after the tag so the next tag cut exercises the floor. Files: proto/Cargo.toml 0.30.0 → 0.30.3 ns/mix.exs 0.30.0 → 0.30.3 relay/mix.exs 0.30.0 → 0.30.3 gateway/mix.exs 0.30.0 → 0.30.3 proto/tests/version_pin_test.rs floor 0.29.4 → 0.30.3 ns/test/ztlp_ns/release_test.exs floor 0.29.4 → 0.30.3 relay/test/ztlp_relay/release_test.exs floor 0.29.4 → 0.30.3 gateway/test/ztlp_gateway/release_test.exs floor 0.29.4 → 0.30.3 .gitignore + .ssh/ (defense against accidental key commits) Tests: TDD: RED → bumped manifests → GREEN. RED (manifests still at 0.30.0, floors ratcheted to 0.30.3): ns: mix.exs version 0.30.0 is older than the v0.30.3 Z2LS gateway-auth tag relay: mix.exs version 0.30.0 is older than the v0.30.3 Z2LS gateway-auth tag gateway: mix.exs version 0.30.0 is older than the v0.30.3 Z2LS gateway-auth tag (proto deferred to CI — local cargo 1.75 doesn't grok Cargo.lock v4) GREEN (after bump, full release_test.exs per component): ns: 15 tests, 0 failures relay: 15 tests, 0 failures gateway: 15 tests, 0 failures The runtime-vs-declared drift test (Application.spec/2 == mix.exs) also passes in GREEN, confirming the OTP .app cache was recompiled correctly after the bump. Validation: - Full relay test suite running in background to confirm no collateral damage from the bump. - CI on the PR will exercise proto/tests/version_pin_test.rs (the floor guard there is the inverse direction — fails if Cargo.toml drops below the floor). Follow-up: - Cut v0.30.4 from THIS commit so the tag and four-component manifests agree (the v0.30.3 tag is the 'tag points at pre-bump commit' case per the release-version-pinning skill). - Rebuild + redeploy ztlp-node and ztlp-bootstrap images tagged v0.30.4 so the on-disk SaaS state catches up to the source. - Bootstrap currently has no version manifest (Rails app, not a packaged artifact). Adding a VERSION file + initializer + test is listed in docs/plans/2026-05-24-z2ls-via-gateway-admin-auth.md as a follow-up — kept out of this PR to keep the scope tight.
…t floors (#42) What: Coordinated four-component manifest bump 0.30.3 → 0.30.4. Floors in release_test.exs / version_pin_test.rs ratcheted 0.30.3 → 0.30.4 so any future tag cut without bumping these files fails CI loudly. Why: The original v0.30.4 tag (cut from 6e9d40b after PR #41) pointed at a commit whose manifests still read 0.30.3 — PR #41 bumped 0.30.0 to 0.30.3, not to 0.30.4. So a binary built from the v0.30.4 tag would report CARGO_PKG_VERSION=0.30.3 and Application.spec(_, :vsn)='0.30.3' at runtime. Same drift class PR #14/#15 closed for v0.29.4. Fix per release-version-pinning skill pitfall #7: delete the misaligned v0.30.4 tag, bump manifests to 0.30.4 in this PR, then re-cut v0.30.4 from the merge commit so the tag and four manifests finally agree. Files: proto/Cargo.toml 0.30.3 → 0.30.4 ns/mix.exs 0.30.3 → 0.30.4 relay/mix.exs 0.30.3 → 0.30.4 gateway/mix.exs 0.30.3 → 0.30.4 proto/tests/version_pin_test.rs floor 0.30.3 → 0.30.4 ns/test/ztlp_ns/release_test.exs floor 0.30.3 → 0.30.4 relay/test/ztlp_relay/release_test.exs floor 0.30.3 → 0.30.4 gateway/test/ztlp_gateway/release_test.exs floor 0.30.3 → 0.30.4 Tests: TDD: RED → bumped manifests → GREEN. RED (manifests still at 0.30.3, floors ratcheted to 0.30.4): ns: mix.exs version 0.30.3 is older than the v0.30.4 four-component-aligned tag GREEN (after bump, full release_test.exs per component): ns: 15 tests, 0 failures relay: 15 tests, 0 failures gateway: 15 tests, 0 failures Validation: CI will exercise proto/tests/version_pin_test.rs (deferred locally — cargo 1.75 doesn't grok Cargo.lock v4). Follow-up: - DELETE the existing v0.30.4 tag (points at 6e9d40b with 0.30.3 manifests) - Re-cut v0.30.4 from THIS PR's merge commit - Rebuild + redeploy ztlp-bootstrap, ztlp.exe (Windows), and ztlp (Linux) all at v0.30.4 from the merged source - Verify each binary reports 0.30.4 via --version
What
Closes out the version-string drift across
gateway/,ns/, andproto/that PR #13 explicitly left as follow-up scope (handoff Known Problems #6 / Open Question #1).gateway/mix.exs:0.24.0→0.29.4ns/mix.exs:0.24.0→0.29.4proto/Cargo.toml:0.29.3→0.29.4gateway/test/ztlp_gateway/release_test.exsandns/test/ztlp_ns/release_test.exs(mirrors PR fix(relay): bump mix.exs to 0.29.4 + pin runtime vsn to declared version #13's relay pattern).proto/tests/version_pin_test.rswith two Rust-side pins using the in-crateztlp_proto::updater::SemVer(no new external dep).Why
PR #13 fixed the same class of bug for the relay: a
git tagcut without amix.exsbump →Application.spec(_, :vsn)lies at runtime. Gateway and NS had been pinned at0.24.0for five minor versions while the rest of the stack moved, so the same lie was live for two more components. Without regression pins on those components, the next tag-cut could silently re-introduce the drift.TDD discipline
RED (per-component) before bump:
mix test test/ztlp_gateway/release_test.exs --seed 0mix.exs version 0.24.0 is older than the v0.29.4 strict-routing tagmix test test/ztlp_ns/release_test.exs --seed 0mix.exs version 0.24.0 is older than the v0.29.4 strict-routing tagcargo test --test version_pin_testproto/Cargo.toml version 0.29.3 is older than the v0.29.4 strict-routing tagGREEN after bump:
mix testmix testcargo test --lib --releasemix test(regression check)python3 -m unittest tests.test_launch_appNote on gateway seed 55290: I observed two test-ordering flakes (TLS port-reuse in
tls_phase2_test.exsand a GenServer teardown race incrl_server_test.exs). Both reproduce on plainmainwith the same seed (verified by stash + checkout-from-main-only-files + rerun). They are pre-existing flakes unrelated to this PR and outside its scope.Design notes
Version.compare(declared, "0.29.4") in [:gt, :eq](Elixir) /actual.cmp(&floor)(Rust) rather than asserting a literal version string. Literal-string assertions become a maintenance burden on every routine bump; a floor guard only fails on accidental down-bumps below the v0.29.4 strict-routing tag — i.e. on a real regression..appcache stale, and (b) tag cut without bumping mix.exs.updater::SemVerrather than pulling in the externalsemvercrate. This exercises the same parser the self-updater uses, so if that parser ever regresses both call sites catch it.mix.exscomment blocks explain the bump inline so future readers see the on-call story at the point of change, not just in the test file or handoff.Follow-up
v0.29.4already in the past:v0.29.5that includes this + PR fix(relay): bump mix.exs to 0.29.4 + pin runtime vsn to declared version #13's mix.exs bump (cleanest)v0.29.4and reset onv0.30.0Config.registration_secret/0) remains the prod-readiness blocker and is the hard dependency for the Bootstrap workstream (handoff §"HARD DEPENDENCY uncovered while locking in feat(listen): HTTP header injection for passwordless gateway auth #5").proto/src/bin/ztlp-cli.rs) deliberately left out of scope here.Refs
829abdfd22afbf~/hermes_session_handoff.mdKnown Problems feat(launch): POST /api/admin-pubkey to flip on passwordless gateway auth #6, Open Question Add NOTICE file and PROTOTYPE.md developer guide #1Summary by CodeRabbit
Chores
Tests