Skip to content

chore(hygiene): Node 24 actions, --version flag, update-apply install priority#4

Merged
random1st merged 2 commits into
mainfrom
voroninr/ran-480-hygiene
Jun 11, 2026
Merged

chore(hygiene): Node 24 actions, --version flag, update-apply install priority#4
random1st merged 2 commits into
mainfrom
voroninr/ran-480-hygiene

Conversation

@random1st

Copy link
Copy Markdown
Contributor

Summary

Distribution/operability hygiene ahead of the June 16 Node 24 forcing date:

  • Workflows → Node 24 runtimes: checkout v5, cache v5, upload-artifact v6, download-artifact v7, softprops/action-gh-release v3 (first majors that actually run on node24; upload v5/download v6 were preliminary-only and still defaulted to node20; gh-release v3 is runtime-only, no API change).
  • s5d --version: answers from CARGO_PKG_VERSION. Installed-binary version could previously only be inferred from behavior probes — bit us during release verification twice.
  • update apply priority inversion: cargo build from the checked-out revision is now the default install source; the tracked prebuilt (stale at both alpha.7 and alpha.8) is a loud-warning fallback for hosts without a toolchain. Install path was already inode-safe (tmp + rename).
  • bin/s5d deleted (6.9M stale Mach-O nothing references; prebuilt_binary() and install.sh both resolve only s5d-{os}-{arch}). bin/s5d-darwin-arm64 rebuilt at alpha.8.

Tests: 188 passed, fmt/clippy clean, s5d --versions5d 0.11.0-alpha.8 verified on the rebuilt prebuilt and the installed binary.

Sources for the action versions: Node 20 deprecation changelog, checkout v5 (node24), upload-artifact releases, download-artifact releases, gh-release v3 (node24).

🤖 Generated with Claude Code

… priority

Three distribution/operability fixes batched ahead of the June 16
Node 24 forcing date:

- Workflows: checkout v4→v5, cache v4→v5, upload-artifact v4→v6,
  download-artifact v4→v7, softprops/action-gh-release v2→v3. All are
  the first majors that RUN on node24 (upload v5 / download v6 only
  carried preliminary support while defaulting to node20; gh-release
  v3 is a runtime-only major with no API change). GitHub forces
  node24 on June 16, 2026; node20 is removed from runners Sep 16.
- CLI: #[command(version)] — s5d 0.11.0-alpha.8 now answers from
  CARGO_PKG_VERSION. Its absence meant installed-binary versions
  could only be guessed from behavior probes (bit us twice during
  release verification).
- update apply: install_binary_from_repo preferred the tracked
  prebuilt over building from source, silently installing whatever
  binary was last committed (stale at both alpha.7 and alpha.8).
  Inverted: cargo build from the checked-out revision is the default;
  the prebuilt is a loud-warning fallback for hosts without a Rust
  toolchain. The install itself was already inode-safe (tmp + rename),
  so the macOS in-place-cp signature kill cannot happen through the
  canonical path — only through manual cp, documented in RAN-480.
- bin/s5d (6.9M Mach-O, stale since pre-alpha.7) deleted: nothing
  reads it — prebuilt_binary() only resolves bin/s5d-{os}-{arch} and
  install.sh uses the same pattern. bin/s5d-darwin-arm64 rebuilt at
  alpha.8 so the toolchain-less fallback matches the release again.
…r; upload v7

PR #4 tribunal round (both auditors CONCERNS/MEDIUM, disjoint findings):

- Codex: the fallback fired on BUILD FAILURE too, not just missing
  cargo — broken source + existing prebuilt would silently install a
  lagging binary under an overall success message, recreating exactly
  the stale-install failure mode this change set out to kill. Now a
  failed build on a host with cargo is a hard error; the prebuilt
  fallback is reachable only when cargo cannot be spawned.
- Gemini: the hardcoded rust/target/release path breaks under
  CARGO_TARGET_DIR / .cargo config redirects (build succeeds, install
  reads a stale or missing path). Pinned with explicit --target-dir.
- Gemini flagged upload v6 / download v7 as a mismatch; Codex verified
  compatibility (shared v4+ artifact backend, download v7 rejects only
  v3-and-older). Mechanism beats pattern, but synchronizing to v7/v7
  costs one line and removes the question permanently — bumped.
@random1st
random1st merged commit 06d04af into main Jun 11, 2026
2 checks passed
@random1st
random1st deleted the voroninr/ran-480-hygiene branch June 11, 2026 08:44
random1st added a commit that referenced this pull request Jun 11, 2026
Findings from an end-to-end cold-install audit (fresh public clone,
isolated HOME, full lifecycle probe — install → init → spec lifecycle
→ ci init/exec all green after these fixes):

- install.sh preferred the tracked prebuilt over building from the
  checkout — the same silent-stale trap fixed in update apply (PR #4)
  lived on in the installer. Inverted: cargo build first, prebuilt is
  a warned fallback for toolchain-less hosts. rm before cp so the
  installed binary always gets a fresh inode (macOS AMFI; the codesign
  re-sign step already present stays as belt-and-suspenders).
- Plugin hooks failed with exit 127 on every session/tool-use for a
  marketplace install without the CLI binary. Every hook command is
  now guarded with an if-form "command -v s5d" check: absent binary
  means exit 0 (SessionStart prints a one-line install hint instead),
  and — deliberately if-form, not "&& ... || true" — a present
  binary's exit code passes through untouched so blocking enforcement
  hooks still block (verified both ways with a fake exit-2 binary).
- All three distribution manifests (.claude-plugin, .codex-plugin,
  gemini-extension) still claimed version 0.3.0 against an 0.11.x
  binary. Synced to 0.11.0-alpha.9 and added the four version
  touchpoints to the release agent so the next release cannot ship
  stale manifests.

update apply itself audited clean: fetch+pull --ff-only before
rebuild, tmp+rename install (inode-safe). 193 tests green.
random1st added a commit that referenced this pull request Jun 11, 2026
Findings from an end-to-end cold-install audit (fresh public clone,
isolated HOME, full lifecycle probe — install → init → spec lifecycle
→ ci init/exec all green after these fixes):

- install.sh preferred the tracked prebuilt over building from the
  checkout — the same silent-stale trap fixed in update apply (PR #4)
  lived on in the installer. Inverted: cargo build first, prebuilt is
  a warned fallback for toolchain-less hosts. rm before cp so the
  installed binary always gets a fresh inode (macOS AMFI; the codesign
  re-sign step already present stays as belt-and-suspenders).
- Plugin hooks failed with exit 127 on every session/tool-use for a
  marketplace install without the CLI binary. Every hook command is
  now guarded with an if-form "command -v s5d" check: absent binary
  means exit 0 (SessionStart prints a one-line install hint instead),
  and — deliberately if-form, not "&& ... || true" — a present
  binary's exit code passes through untouched so blocking enforcement
  hooks still block (verified both ways with a fake exit-2 binary).
- All three distribution manifests (.claude-plugin, .codex-plugin,
  gemini-extension) still claimed version 0.3.0 against an 0.11.x
  binary. Synced to 0.11.0-alpha.9 and added the four version
  touchpoints to the release agent so the next release cannot ship
  stale manifests.

update apply itself audited clean: fetch+pull --ff-only before
rebuild, tmp+rename install (inode-safe). 193 tests green.
random1st added a commit that referenced this pull request Jul 1, 2026
…osed

Scenario sweep (RAN-481, beta bar = 15/15): every previously uncovered
or partial scenario now has a pinning test. The sweep was empirical —
each gap was probed against the live binary first, and three of the six
probes hit real defects, which is the point of the exercise.

Closed scenarios:
- #12 MCP containment: new tests/mcp_wire.rs speaks line-delimited
  JSON-RPC to the spawned binary — initialize/tools-list roundtrip,
  garbage/notification/unknown-method survival, and a full lifecycle
  over MCP proving the placeholder-import guard fires on this path too.
- #9 reconcile semantics: reconcile is verify+stamp with fail-closed
  refusal — restore of uuid-bearing drift is structurally impossible
  (resolve() mints fresh uuids), so the test pins what matters: a
  failed reconcile never re-baselines the ledger and drift stays
  visible afterwards.
- #14 partial corruption: re-init now restores deleted core files.
- #5 decision tier: clean end-to-end without --force; the canonical
  path is >=3 hypotheses, evidence on each, acceptance criteria on the
  problem card, winner spec_ref via s5d new --hypothesis-id, and an
  explicit challenge summary.
- #4 high assurance: full flow with configured test+contract commands
  on top of schema+graph+review, no --force.
- #11 show: smoke assertions inside the #4/#5 flows.

Bugs fixed (each found by its scenario probe):
1. Bulk 's5d reconcile' exited 0 while individual reconciles failed —
   an agent reading the exit code saw success over persistent drift.
   Now counts failures, prints them, and bails non-zero.
2. Re-running init did not recreate deleted config/ledger/index.yaml
   (only subdirs were repaired) — a deleted file bricked the project.
   ensure_core_files restores missing files with defaults and reports
   them; existing files, even corrupted ones, are never overwritten
   because that is a data-loss decision that stays with the user.
3. add-hypothesis/add-evidence rejected high-tier specs while the high
   scaffold ships a review gate satisfiable ONLY by gate:review
   evidence on a hypothesis — the canonical path of the most
   safety-critical tier was unpassable without --force. Loosened to
   decision|high at all four sites (CLI+MCP); decide stays
   decision-only since choosing a winner is decision-tier semantics.

Known limitation documented, deliberately not fixed:
owning_package is outside compute_state_fingerprint (G:type:id:uuid),
so its corruption is invisible to drift-check even though rollback
ownership depends on it. Pinned by a documenting test; the fix changes
the fingerprint and would invalidate every existing baseline, so it
needs an explicit migration decision.

README tier table corrected: Decision and High carry a Review default
gate (the table claimed None / Schema+Graph; code says otherwise).
random1st added a commit that referenced this pull request Jul 1, 2026
…r; upload v7

PR #4 tribunal round (both auditors CONCERNS/MEDIUM, disjoint findings):

- Codex: the fallback fired on BUILD FAILURE too, not just missing
  cargo — broken source + existing prebuilt would silently install a
  lagging binary under an overall success message, recreating exactly
  the stale-install failure mode this change set out to kill. Now a
  failed build on a host with cargo is a hard error; the prebuilt
  fallback is reachable only when cargo cannot be spawned.
- Gemini: the hardcoded rust/target/release path breaks under
  CARGO_TARGET_DIR / .cargo config redirects (build succeeds, install
  reads a stale or missing path). Pinned with explicit --target-dir.
- Gemini flagged upload v6 / download v7 as a mismatch; Codex verified
  compatibility (shared v4+ artifact backend, download v7 rejects only
  v3-and-older). Mechanism beats pattern, but synchronizing to v7/v7
  costs one line and removes the question permanently — bumped.
random1st added a commit that referenced this pull request Jul 1, 2026
Findings from an end-to-end cold-install audit (fresh public clone,
isolated HOME, full lifecycle probe — install → init → spec lifecycle
→ ci init/exec all green after these fixes):

- install.sh preferred the tracked prebuilt over building from the
  checkout — the same silent-stale trap fixed in update apply (PR #4)
  lived on in the installer. Inverted: cargo build first, prebuilt is
  a warned fallback for toolchain-less hosts. rm before cp so the
  installed binary always gets a fresh inode (macOS AMFI; the codesign
  re-sign step already present stays as belt-and-suspenders).
- Plugin hooks failed with exit 127 on every session/tool-use for a
  marketplace install without the CLI binary. Every hook command is
  now guarded with an if-form "command -v s5d" check: absent binary
  means exit 0 (SessionStart prints a one-line install hint instead),
  and — deliberately if-form, not "&& ... || true" — a present
  binary's exit code passes through untouched so blocking enforcement
  hooks still block (verified both ways with a fake exit-2 binary).
- All three distribution manifests (.claude-plugin, .codex-plugin,
  gemini-extension) still claimed version 0.3.0 against an 0.11.x
  binary. Synced to 0.11.0-alpha.9 and added the four version
  touchpoints to the release agent so the next release cannot ship
  stale manifests.

update apply itself audited clean: fetch+pull --ff-only before
rebuild, tmp+rename install (inode-safe). 193 tests green.
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