From 4fad25c193dceaa184d0035cb67a3f45a6f7eb91 Mon Sep 17 00:00:00 2001 From: VirtualMachinist <252028890+VirtualMachinist@users.noreply.github.com> Date: Fri, 30 Oct 2026 19:16:12 -0700 Subject: [PATCH] test(p0): pin facet custody args_prefix with --no-subprocess The P0 FACET_SECRET_KEY argv fixture pins args_prefix ["request","run","--no-record","--no-subprocess"] for Facet 0.8.0, and the lint PREFIX is the 4-item array. each_broken_rule_fails fails the prefix rule when --no-subprocess is dropped, when --no-record is dropped, when the two flags are swapped, and when only request run is left. Tests, fixture and CHANGELOG only; no product src. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++++ .../tests/fixtures/p0-facet-secret-key.args | 2 +- crates/geode-cli/tests/p0_custody_home.rs | 19 +++++++++++++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd0c17a..2fc93ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: se ## [Unreleased] +### Changed + +- The P0 `FACET_SECRET_KEY` custody argv pins Facet 0.8.0 with `args_prefix` `["request","run","--no-record","--no-subprocess"]`, so a pinned `facet` run cannot start `gh` or `git`. The fixture lint fails when `--no-subprocess` is missing. + ### Fixed - An identity added with `vault add-recipient --gpub` (or `vault rotate --add-recipient`) can now open its vault: `verify`, `list`, `cat`, `open` and `rotate` unwrap the epoch key from the identity's X25519 recipient entry. Before, only symmetric recipients were matched and the added key failed with an authentication error. diff --git a/crates/geode-cli/tests/fixtures/p0-facet-secret-key.args b/crates/geode-cli/tests/fixtures/p0-facet-secret-key.args index 6133167..20eb00c 100644 --- a/crates/geode-cli/tests/fixtures/p0-facet-secret-key.args +++ b/crates/geode-cli/tests/fixtures/p0-facet-secret-key.args @@ -3,6 +3,6 @@ --allow-host api.example.test --allow-cmd -{"path":"/usr/local/libexec/hedronite/facet","sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","args_prefix":["request","run","--no-record"]} +{"path":"/usr/local/libexec/hedronite/facet","sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","args_prefix":["request","run","--no-record","--no-subprocess"]} --secret FACET_SECRET_KEY=cfg/facet-secret-key diff --git a/crates/geode-cli/tests/p0_custody_home.rs b/crates/geode-cli/tests/p0_custody_home.rs index 23bfabc..8858e51 100644 --- a/crates/geode-cli/tests/p0_custody_home.rs +++ b/crates/geode-cli/tests/p0_custody_home.rs @@ -7,7 +7,7 @@ use std::collections::BTreeSet; use std::path::{Component, Path, PathBuf}; const FIXTURE: &str = "tests/fixtures/p0-facet-secret-key.args"; -const PREFIX: [&str; 3] = ["request", "run", "--no-record"]; +const PREFIX: [&str; 4] = ["request", "run", "--no-record", "--no-subprocess"]; fn raw() -> String { let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(FIXTURE); @@ -206,7 +206,7 @@ fn each_broken_rule_fails() { ("allow-host", "--allow-host\napi.example.test\n", ""), ( "allow-cmd-json", - "{\"path\":\"/usr/local/libexec/hedronite/facet\",\"sha256\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"args_prefix\":[\"request\",\"run\",\"--no-record\"]}", + "{\"path\":\"/usr/local/libexec/hedronite/facet\",\"sha256\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"args_prefix\":[\"request\",\"run\",\"--no-record\",\"--no-subprocess\"]}", "/usr/local/libexec/hedronite/facet", ), ( @@ -216,7 +216,22 @@ fn each_broken_rule_fails() { ), ( "allow-cmd-prefix", + "\"args_prefix\":[\"request\",\"run\",\"--no-record\",\"--no-subprocess\"]", "\"args_prefix\":[\"request\",\"run\",\"--no-record\"]", + ), + ( + "allow-cmd-prefix", + "\"args_prefix\":[\"request\",\"run\",\"--no-record\",\"--no-subprocess\"]", + "\"args_prefix\":[\"request\",\"run\",\"--no-subprocess\"]", + ), + ( + "allow-cmd-prefix", + "\"args_prefix\":[\"request\",\"run\",\"--no-record\",\"--no-subprocess\"]", + "\"args_prefix\":[\"request\",\"run\",\"--no-subprocess\",\"--no-record\"]", + ), + ( + "allow-cmd-prefix", + "\"args_prefix\":[\"request\",\"run\",\"--no-record\",\"--no-subprocess\"]", "\"args_prefix\":[\"request\",\"run\"]", ), (