Skip to content

Tighten release-workflow guard, core trust-root build guard, default-feature run tests - #112

Merged
VirtualMachinist merged 5 commits into
mainfrom
jupi/geode-p0-followup-2
Oct 26, 2026
Merged

VirtualMachinist merged 5 commits into
mainfrom
jupi/geode-p0-followup-2

Conversation

@VirtualMachinist

Copy link
Copy Markdown
Member

Summary

Follow-up to #111. Tightens the release-workflow guard, adds the optimized-build refusal to the core crate, and makes a default-feature cargo test -p geode-cli pass. No change to geode runtime behavior.

  • Release-workflow guard (.github/scripts/check-release-workflows.sh): comments are stripped before matching. The trust-root check must appear on a run: line or inside a run: | / run: > block, so a mention in a comment or an env: value no longer counts. Release triggers are detected in map form, flow-list form (on: [push, release]), and scalar form (on: release). Reusable workflow_call workflows that publish are caught by their publish command. check-no-test-trusted-root.sh runs ten probe cases: seven that must fail (tag push, flow list, scalar, map, a publishing reusable workflow, a comment-only mention, a mention outside any run step) and three that must pass.
  • Core feature guard: new crates/geode-core/build.rs refuses test-trusted-root at any opt-level other than 0, matching the CLI guard. It checks OPT_LEVEL, because older Cargo does not pass the debug-assertion cfg to build scripts. The comments in inject.rs and Cargo.toml no longer say the debug-assertion check is the only one.
  • Default-feature tests: the 17 tests/run_cli.rs tests that spawn a child with a secret need --test-unconfined-hosts, which only exists with test-trusted-root. Without the feature they hit the no-host refusal and failed. Those tests and their four helpers are now compiled only with the feature. The no-host refusal tests still run in both modes, and CI already runs this file with the feature. No product code changes.
  • Doc comment: the broken_rules doc comment in tests/p0_custody_home.rs is back above its function.
  • CHANGELOG entries under Unreleased › Security.

Test plan

  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings (default features)
  • cargo clippy --workspace --all-targets --features test-trusted-root -- -D warnings
  • cargo test --workspace --locked --exclude geode-cli
  • cargo test -p geode-cli --locked --features test-trusted-root
  • cargo test -p geode-cli --locked (default features; failed 17 tests before this change)
  • .github/scripts/check-no-test-trusted-root.sh and .github/scripts/check-release-workflows.sh
  • Minimum supported Rust version (1.89) check with --features test-trusted-root
  • GitHub checks green
  • No tag, no publish

Tests that spawn a child with a secret need --test-unconfined-hosts,
which exists only with test-trusted-root, because a secret run with no
allowed hosts is refused before spawn. Without the feature they failed.
Gate them and their helpers on the feature so a default-feature run is
green. The no-host refusal tests still run in both modes.
The guard accepted the trust-root check named anywhere, including in a
comment, and missed flow-list and scalar on: triggers. It now strips
comments, requires the check on a run: line or inside a run block, and
detects release triggers in map, flow-list, and scalar form. Probe cases
cover each trigger form, a reusable workflow that publishes, a
comment-only mention, and a mention outside any run step.
geode-core refused the test-only trust-root feature only when debug
assertions were off. Add a build.rs that also refuses it at any
opt-level other than 0, matching the CLI guard, and correct the comments
that said the debug-assertion check was the only one.
@VirtualMachinist
VirtualMachinist marked this pull request as ready for review October 26, 2026 02:48
@VirtualMachinist
VirtualMachinist merged commit 22aafbc into main Oct 26, 2026
11 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