8000 fix(boxes,minimal): the store check admits every upstream host on a host_ip box with no egress by minimal-foundry[bot] · Pull Request #3707 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(boxes,minimal): the store check admits every upstream host on a host_ip box with no egress - #3707

Draft
minimal-foundry[bot] wants to merge 5 commits into
mainfrom
agent/3692-the-store-check-admits-every-upstream-host-on-a
Draft

minimal-foundry[bot] wants to merge 5 commits into
mainfrom
agent/3692-the-store-check-admits-every-upstream-host-on-a

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

Follow-up

Fixes #3692

Task marker
### D3692 — The store check admits every upstream host on a host_ip box with no egress section, as the GitHub check does
  kind: task
  size: S
  est: 30 code, 70 tests
  executor: agent
  origin: residual
  epic: 1501
  layers:
    - boxes:
      - crates/boxes/src/core/bep.rs: store_refusals and check_store_references take the NetworkMode and skip the host check when egress_admits_every_name holds. Add tests with egress None for each mode.
      test: cargo test -p boxes store_reference_with_rule_and_no_egress
    - cli:
      - crates/minimal/src/cmd/boxes/create.rs: check_store_grants and accept_store_references take the network mode, and the start path and tests pass it to check_store_references.
      - crates/minimal/src/cmd/box_spec.rs: render passes inputs.network to check_store_references, so min box spec agrees with the start.
      - docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md: BEP-036 states that a host_ip box with no egress section admits every registered upstream host.
      test: cargo test -p minimal store_grant_on_host_ip_box_with_no_egress_is_accepted
  proof: On a host_ip box with no egress section, min starts the box with a store secret whose rule registers api.example.com, and an own_ip box with no egress section is still refused.

Proof

On a host_ip box with no egress section, min box start and min box spec now accept a store secret whose rule registers api.example.com. An own_ip box with no egress section is still refused with exit 3 and names api.example.com as the missing host.

Notes from the agent: store_refusals and check_store_references take a NetworkMode after secrets. The host check is skipped when egress_admits_every_name holds. The sign-in item refusal (BEP-034) still applies in every mode. Existing tests that pass an egress section or None now pass NetworkMode::OwnIp, so they keep their old meaning. The BEP-036 property in the spec now excludes the host_ip box with no egress section, and a new WHERE clause states that case. Also ran cargo test -p minimal store_ (16 passed) and cargo clippy -p minimal --all-targets (no warnings). Did not run just ci or the Vale prose lint.

Tests

line exit tail
cargo test -p boxes store_reference_with_rule_and_no_egress 0 running 1 test test core::bep::tests::store_reference_with_rule_and_no_egress ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 614 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 15 filtered out; finished in 0.0 8000 0s r
cargo test -p minimal store_grant_on_host_ip_box_with_no_egress_is_accepted 0 t test cmd::box_verbs::create::tests::store_grant_on_host_ip_box_with_no_egress_is_accepted ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1060 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 43 filtered out; finishe

Verify

min task run agent-verify exited 100, so this PR is a draft.

d::box_verbs::attach::tests::host_asks_target_names_the_control_socket_and_box_with_an_address_pair
        PASS [   0.014s] ( 761/1883) minimal cmd::box_verbs::attach::tests::host_asks_target_names_the_box_when_its_record_is_unreadable
        PASS [   0.023s] ( 762/1883) minimal cmd::box_verbs::attach::tests::late_attach_answer_admits_nothing
        PASS [   0.022s] ( 763/1883) minimal cmd::box_verbs::attach::tests::overtaken_dialog_is_dismissed_and_relay_resumes
        PASS [   0.018s] ( 764/1883) minimal cmd::box_verbs::attach::tests::vm_backed_dynamic_ask_create_accepted
        PASS [   0.017s] ( 765/1883) minimal cmd::box_verbs::create::activation_step_tests::activation_steps_run_in_order_and_name_the_failing_step
        PASS [   0.014s] ( 766/1883) minimal cmd::box_verbs::create::tests::a_grant_whose_name_is_not_a_variable_name_is_refused
        PASS [   0.015s] ( 767/1883) minimal cmd::box_verbs::create::activation_step_tests::activation_steps_run_in_order_and_name_the_failing_step_in_activate_box
        PASS [   0.014s] ( 768/1883) minimal cmd::box_verbs::create::tests::a_store_only_box_is_refused_without_naming_a_github_grant
        PASS [   0.017s] ( 769/1883) minimal cmd::box_verbs::create::tests::accepted_store_rule_authorities_reach_the_box_policy
        PASS [   0.014s] ( 770/1883) minimal cmd::box_verbs::create::tests::activation_project_root_resolves_the_root_and_refuses_a_broken_file
        PASS [   0.017s] ( 771/1883) minimal cmd::box_verbs::create::tests::activation_puts_the_spec_on_the_create_request
        PASS [   0.019s] ( 772/1883) minimal cmd::box_verbs::create::tests::activation_refuses_grant_before_create_with_exit_3
        PASS [   0.014s] ( 773/1883) minimal cmd::box_verbs::create::tests::activation_refuses_unloadable_project_file_before_create
        PASS [   0.014s] ( 774/1883) minimal cmd::box_verbs::create::tests::ask_rule_without_a_terminal_denies
        PASS [   0.014s] ( 775/1883) minimal cmd::box_verbs::create::tests::bep_settings_alone_activate_without_credentialed_upstream
  stdout ───

    running 1 test
    test cmd::box_verbs::create::tests::box_spec_entry_preview_refuses_like_start ... FAILED

    failures:

    failures:
        cmd::box_verbs::create::tests::box_spec_entry_preview_refuses_like_start

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1060 filtered out; finished in 0.01s

  stderr ───

  Cancelling due to test failure: 3 tests still running
        PASS [   0.066s] ( 777/1883) minimal cmd::box_verbs::create::tests::box_creation_seals_a_store_member_per_accepted_rule
        PASS [   5.099s] ( 778/1883) minimal cmd::auth::tests::an_install_the_browser_does_not_return_from_ends_the_wait
        PASS [   6.017s] ( 779/1883) minimal cmd::auth::tests::a_stalled_install_read_does_not_outlive_the_deadline
────────────
warning: 1104/1883 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed

store_refusals and check_store_references take the box's network mode
and skip the host check when egress_admits_every_name holds, as the
GitHub check does (BEP-036, BEP-008).
min box start and min box spec now admit every registered upstream on
a host_ip box with no egress section, as the GitHub check does. BEP-036
states that case.
@coderabbitai
coderabbitai Bot commented Nov 20, 2026 • 8000
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f76f302-392c-44fe-905f-cdec025723d1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions
Copy link
Copy Markdown
Contributor

Spec lint

docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md — 8 finding(s)

docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:123: P004 BEP-003 names test 'bep_second_box_needs_no_sign_in', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:180: P004 BEP-007 names test 'bep_box_env_holds_sealed_value_only', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:228: P004 BEP-011 names test 'bep_root_ca_present_in_box_trust_store', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:244: P004 BEP-012 names test 'bep_proxy_env_and_no_proxy_are_set', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:357: P004 BEP-015 names test 'bep_git_and_gh_against_private_repo', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:477: P004 BEP-087 names test 'bep_host_ip_git_and_gh_under_dns_steering', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:797: P004 BEP-043 names test 'bep_destroyed_box_values_refused_within_60s', which was not found in the repository
docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md:806: P004 BEP-044 names test 'bep_logout_refuses_every_reference_at_next_request', which was not found in the repository

Advisory. None of this blocks the merge; the review decides.

Advisory, and never a merge gate. Linter: gominimal/foundry@8acb0663, spec format: How Minimal Writes Specs.

A host_ip box with no egress section now admits every store upstream,
so the entry preview test checks the store refusal on own_ip.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a failed check suite, pushed as 2f769fe5d864.

line exit tail
cargo test -p boxes store_reference_with_rule_and_no_egress 0 running 1 test test core::bep::tests::store_reference_with_rule_and_no_egress ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 614 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 15 filtered out; finished in 0.00s r
cargo test -p minimal store_grant_on_host_ip_box_with_no_egress_is_accepted 0 t test cmd::box_verbs::create::tests::store_grant_on_host_ip_box_with_no_egress_is_accepted ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1061 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 43 filtered out; finishe

Verify min task run agent-verify exited 100.

/1884) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.005s] (1859/1884) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.006s] (1860/1884) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.005s] (1861/1884) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.009s] (1862/1884) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.923s] (1863/1884) minimal::otel_cli a_silent_collector_costs_min_ls_little_and_prints_nothing
        PASS [   0.005s] (1864/1884) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.006s] (1865/1884) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.005s] (1866/1884) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.005s] (1867/1884) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.009s] (1868/1884) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.005s] (1869/1884) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.005s] (1870/1884) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.006s] (1871/1884) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.005s] (1872/1884) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.005s] (1873/1884) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.006s] (1874/1884) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.005s] (1875/1884) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.006s] (1876/1884) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.006s] (1877/1884) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.006s] (1878/1884) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.005s] (1879/1884) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.006s] (1880/1884) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.005s] (1881/1884) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.006s] (1882/1884) minimal::bin/min tests::type_refusals_exit_3_and_4
        PASS [   2.054s] (1883/1884) minimal::named_vm named_vm_reaches_autospawn
  stdout ───

    running 1 test
    test exec_run_attach_and_task_run_share_the_commands_trace ... FAILED

    failures:

    failures:
        exec_run_attach_and_task_run_share_the_commands_trace

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 5 filtered out; finished in 13.13s

  stderr ───

    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
error: test run failed

Converted to a draft: verify exited 100.

On a host_ip box with no egress section, min starts the box with a store secret whose rule registers api.example.com. An own_ip box with no egress section is still refused, and min box spec gives the same refusal as the start.

Notes from the agent: The CI log excerpt did not name the failing test. A full local run of the minimal lib tests found box_spec_entry_preview_refuses_like_start. Its store case ran on the default network (host_ip) with no egress and expected a refusal, which this task removes on purpose. The case now passes --network own_ip, so it still checks the store refusal on the mode that keeps it. This round changed only that test case and its comment in crates/minimal/src/cmd/boxes/create.rs. Other failures in the full local run are environmental: many tests::* end-to-end tests and autospawn the_liveness_probe_does_not_wait_on_a_full_accept_queue fail under parallel load here, and box_id_is_a_csprng_uuidv7_per_creation passes when run alone. The boxes doctests did not run here because this box has no rustdoc. The full cargo test -p minimal run passed the 30-minute limit, so I did not get a complete result from it.

This branch has not been deployed

No deployments
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.

A stored secret is refused on a host_ip box with no egress section, which allows every host

0 participants

0