Skip to content

fix(box): set ingress in the tool test helper's ProcessSpec - #394

Merged
priyasingh2111 merged 1 commit into
mainfrom
feature/fix-processspec-ingress-test
Nov 11, 2026
Merged

priyasingh2111 merged 1 commit into
mainfrom
feature/fix-processspec-ingress-test

Conversation

@priyasingh2111

@priyasingh2111 priyasingh2111 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

main stopped compiling under --all-targets at 4bc0973 (run 42917114574). #388 added the test helper run::commands::tests::tool, which builds a ProcessSpec literal. #272 added the ingress field to ProcessSpec. Each change passed CI alone. Together they fail with E0063 (missing field ingress) in crates/box/src/run/commands.rs.

Effect on the run:

  • Rust / Lint, Unit Tests (ubuntu-24.04-arm), and Unit Tests (macos-latest) fail with E0063.
  • On macOS, the macos_file_enforcement step also fails. It is a knock-on failure: the Build step stopped before it made strands-box-contain-trampoline.
  • CI Gate fails because the jobs above failed.

This change sets ingress: Vec::new() in the helper. That is the value serde gives when a table has no [[ingress]] key, and the other ProcessSpec test literals use the same value. Only test code changes. No interface or premise moves, and validate_ingress_selection still refuses ingress on a [tool.<name>] table.

Related Issues

Breakage between #272 and #388.

Type of Change

Bug fix

Testing

Ran on macOS:

  • cargo clippy -p strands-box --all-targets --all-features --locked: passes, with no owned warnings (6 vendored strands-shell warnings, unchanged).
  • cargo fmt -p strands-box --check: passes.
  • cargo test -p strands-box --all-features --locked --lib run::commands: 39 passed.
  • cargo build --workspace --locked --all-targets --all-features: passes.
  • cargo test --locked -p strands-box --no-default-features --test macos_file_enforcement: 3 passed.

Not run: the full cargo test --workspace --all-features, workspace-wide clippy with -D warnings, and Linux. CI covers these.

  • I ran the relevant suites (just check, or cargo test --workspace --all-features)
  • If I touched Rust, I ran cargo fmt --all and cargo clippy --workspace --all-targets --all-features -- -D warnings

Checklist

  • I have read the CONTRIBUTING document
  • I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works
  • My change is focused and reasonably small; I have split unrelated work into separate PRs
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • My changes generate no new warnings

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

## Problem

`main` does not compile under `--all-targets`. #388 added the test helper
`run::commands::tests::tool`, which builds a `ProcessSpec` literal. #272 added
the `ingress` field to `ProcessSpec`. Each change passed CI alone; together they
fail with E0063 (missing field `ingress`). Lint, both Unit Tests jobs, and the CI
Gate fail. On macOS, the `macos_file_enforcement` step also fails, because the
Build step stopped before it made `strands-box-contain-trampoline`.

## Solution

Set `ingress: Vec::new()` in the helper. This is the value serde gives when a
table has no `[[ingress]]` key, and the other test literals use the same value.
Only test code changes. No interface moves: a tool table that declares ingress
is still refused by `validate_ingress_selection`.

## Tests

- `cargo clippy -p strands-box --all-targets --all-features --locked`: passes;
  no owned warnings (6 vendored `strands-shell` warnings, unchanged).
- `cargo fmt -p strands-box --check`: passes.
- `cargo test -p strands-box --all-features --locked --lib run::commands`:
  39 passed.
- `cargo build --workspace --locked --all-targets --all-features`, then
  `cargo test --locked -p strands-box --no-default-features --test macos_file_enforcement`
  on macOS: 3 passed.
- Not run: the full workspace suite and the Linux jobs.
@priyasingh2111
priyasingh2111 marked this pull request as ready for review November 10, 2026 23:25
@github-actions

Copy link
Copy Markdown

Assessment: Approve

This one-line fix to a test helper is correct and complete. I found nothing that needs to change.

What I checked (head bc9b4ac)
  • Fix completeness, held: I checked all 22 ProcessSpec construction sites in crates/box/src, including the cfg-gated tests in run/contain/boundary.rs. Each one sets ingress, uses ..base, or parses TOML. Only run::commands::tests::tool was missing the field.
  • Linux coverage (not run in the PR), held: I ran these on Linux x86_64. cargo clippy -p strands-box --all-targets --all-features --locked passed, and the only warnings came from vendored crates/shell. cargo test -p strands-box --all-features --locked --lib run::commands passed 35 tests; the other 4 of the 39 run on macOS are macOS-only.
  • Semantics, held: Vec::new() is the same value serde gives through #[serde(default)] when a table has no [[ingress]] key. So tool() builds the same spec as before feat(ingress): ingress relay for agent tcp communication #272, and validate_ingress_selection still sees an ingress-free tool.
  • Frozen surfaces (root AGENTS.md), held: Only test code changes. ProcessSpec is pub(crate). No box.toml key, record, or protocol shape moves.
  • Commit format (root AGENTS.md), held: The first commit has ## Problem, ## Solution and ## Tests, and lists what did not run.

It's good that the PR names the two-PR merge collision that caused this, so the cause is easy to trace.

@priyasingh2111
priyasingh2111 merged commit 8a5f9ba into main Nov 11, 2026
45 of 53 checks passed
@priyasingh2111
priyasingh2111 deleted the feature/fix-processspec-ingress-test branch November 11, 2026 00:37
leo237 pushed a commit to leo237/box that referenced this pull request Nov 11, 2026
…ds-agents#394

Main's strands-agents#394 added ingress to the tool() test helper's ProcessSpec; the
rebase kept both that line and the one this branch added during its earlier
rebase, so the merge had the field twice (E0062). Keep main's.
leo237 pushed a commit to leo237/box that referenced this pull request Nov 11, 2026
…ds-agents#394

Main's strands-agents#394 added ingress to the tool() test helper's ProcessSpec; the
rebase kept both that line and the one this branch added during its earlier
rebase, so the merge had the field twice (E0062). Keep main's.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants