8000 8000 fix(minimald): an activation refusal for an unknown package names the [upstream] pin and tells the by minimal-foundry[bot] · Pull Request #3364 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimald): an activation refusal for an unknown package names the [upstream] pin and tells the - #3364

Merged
norrietaylor merged 2 commits into
mainfrom
agent/3348-an-activation-refusal-for-an-unknown-package-nam
Nov 13, 2026
Merged

norrietaylor merged 2 commits into
mainfrom
agent/3348-an-activation-refusal-for-an-unknown-package-nam

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

Defect

Fixes #3348

  • Epic: none; not charged to an epic
  • Size: S; estimated 90 code, 70 tests
  • May touch:
    • crates/minimald/src/env.rs
    • crates/minimald/src/box_manager/composables.rs
    • crates/minimald/src/box_actor/setup.rs
    • crates/minimald/src/box_actor.rs
    • crates/minimald/src/box_manager/tests.rs
    • docs/reference/loadouts.md
Task marker
### D3071 — An activation refusal for an unknown package names the [upstream] pin and tells the user to run min update
  kind: task
  size: S
  est: 90 code, 70 tests
  executor: agent
  defect: bug
  layers:
    - daemon:
      - crates/minimald/src/env.rs: adds an upstream pin hint (repo, 
8000
short locked_commit, min update advice) to unknown_package and to the session_package launch path
      - crates/minimald/src/box_manager/composables.rs: run_compose returns the project's upstream repo and locked_commit from the mfile together with the graph names
      - crates/minimald/src/box_actor/setup.rs: stores the captured pin and adds the pin hint once to the check_composed_packages refusal on the fast and fallback paths
      - crates/minimald/src/box_actor.rs: holds the compose-time pin beside composed_graph_names and clears both together
      - crates/minimald/src/box_manager/tests.rs: asserts the refusal names the upstream repo, the short pin and min update once, and that the old text stays
      test: cargo test -p minimald finalize_refusal_names_the_upstream_pin
      test: cargo test -p minimald finalize_without_compose_time_names_evaluates_the_graph
    - docs:
      - docs/reference/loadouts.md: says that activation refuses unknown package names against the [upstream] pin and points to min update
      test: cargo test -p minimald finalize_refusal_names_the_upstream_pin
  proof: Activation with a package that is absent at the pinned locked_commit refuses with the old text plus one note that names the upstream repo, the short pin and min update.

Proof

Activate a session whose minimal.toml pins a git [upstream] and names a package that the pinned locked_commit does not declare. The refusal keeps the old text no such package: <name> (declared by ...); the session was not activated and adds one note: Packages come from <repo> at commit <7-char pin>, the [upstream] pin in minimal.toml. If a package is newer than that commit, run min update to move the pin to the head of its branch. The same note follows no such package: <name> when the launch path refuses at first exec. docs/reference/loadouts.md now describes this check.

Notes from the agent: The pin is shown only for a git [upstream] with a locked_commit. A dir upstream, or one with no locked_commit, gets the old text with no note. On the fast path the pin comes from compose, stored in BoxActor::composed_upstream_pin. ForgetComposedGraphNames clears it with the names. On the fallback path the pin comes from the mfile of the context that the check builds. The new test pins the upstream to a local git repo that it creates and commits to, so it runs offline, but it needs git on PATH. It covers both paths. I did not change handle.rs. just lint-prose did not run because vale is not installed on this box. Clippy (-p minimald --all-targets) and rustfmt are clean. The just clippy-strict gate did not run.

Tests

line exit tail
cargo test -p minimald finalize_refusal_names_the_upstream_pin 0 _the_upstream_pin ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1468 filtered out; finished in 2.45s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 10 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignor
cargo test -p minimald finalize_without_compose_time_names_evaluates_the_graph 0 running 1 test test box_manager::tests::finalize_without_compose_time_names_evaluates_the_graph ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1468 filtered out; finished in 0.95s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 10 filtered out; fi
cargo test -p minimald finalize_refusal_names_the_upstream_pin 0 running 1 test test box_manager::tests::finalize_refusal_names_the_upstream_pin ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1468 filtered out; finished in 2.30s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 10 filtered out; finished in 0.00s

Verify

min task run agent-verify timed out after 1800s, so this PR is a draft.

0\u{1f}NEXTEST_TEST_GROUP=@global\u{1f}NEXTEST_TEST_GROUP_SLOT=none\u{1f}NEXTEST_TEST_NAME=env::tests::task_entrypoint_carries_env_cwd_and_args\u{1f}NEXTEST_TEST_PHASE=run\u{1f}NEXTEST_TEST_THREADS=4\u{1f}NEXTEST_TOTAL_ATTEMPTS=1\u{1f}NEXTEST_VERSION=0.9.145\u{1f}NEXTEST_WORKSPACE_ROOT=/workbench\u{1f}PATH=/tmp/.tmpyW8PmI/replybin:/usr/bin:/bin:/usr/sbin:/sbin:/home/.local/bin\u{1f}PWD=/tmp/.tmpyW8PmI/some dir\u{1f}RUSTC_WRAPPER=sccache\u{1f}SCCACHE_BUCKET=agent-runtime-sccache-gominimal-minimal\u{1f}SCCACHE_ENDPOINT=https://4103a6df4dd77276970745a22603bea9.r2.cloudflarestorage.com\u{1f}SCCACHE_REGION=auto\u{1f}SCCACHE_S3_USE_SSL=true\u{1f}SHELL=/usr/bin/bash\u{1f}SHLVL=2\u{1f}SSL_CERT_DIR=/etc/ssl/certs\u{1f}SSL_CERT_FILE=/etc/ssl/cert.pem\u{1f}XDG_CACHE_HOME=/state/cache\u{1f}XDG_CONFIG_HOME=/home/.config\u{1f}XDG_DATA_HOME=/home/.local/share\u{1f}XDG_RUNTIME_DIR=/run\u{1f}XDG_STATE_HOME=/home/.local/state\u{1e}stdin\n"
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 3 tests still running
        PASS [   1.854s] ( 600/1487) minimald env::tests::refresh_remaps_the_installed_set_onto_the_new_graph
        PASS [   0.990s] ( 601/1487) minimald env::tests::search_finds_known_package
        SLOW [> 60.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>120.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>180.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>240.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>300.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>360.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>420.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>480.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>540.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>600.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>660.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>720.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>780.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>840.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>900.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>960.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1020.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task
        SLOW [>1080.000s] (─────────) minimald env::tests::minenv_run_forwards_stdin_to_the_task

Activation and launch refuse a package the graph does not declare.
The refusal now adds one note with the [upstream] repo, the short
locked_commit and min update, because a package newer than the pin is
unknown until the pin moves. The compose-time pin is stored beside
the captured graph names, and the fallback reads it from the mfile.
@coderabbitai
coderabbitai Bot commented Nov 13, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

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: 6fed8092-c40e-416c-ad65-a733fb2581a4

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

Use the checkbox below for a quick retry:

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

@norrietaylor
norrietaylor marked this pull request as ready for review November 13, 2026 05:29
@norrietaylor
norrietaylor requested a review from a team as a code owner November 13, 2026 05:29
@minimal-foundry
minimal-foundry Bot commented Nov 13, 2026 •
Copy link
Copy Markdown
Contributor Author

Reviewed: 1 finding, none blocking at 5ff5c7fddcd6.

Address the comments on the diff.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against D3071 at 5ff5c7fd. The unknown-package refusal keeps its text and InvalidInput kind, and adds one note naming the [upstream] repo, the short locked_commit and min update, on the fast, fallback and launch paths. The compose-time pin is held beside composed_graph_names and cleared with it. CI is green. Arch: PASS_WITH_CONDITIONS against arch 15b603e6. Its one condition, the re-pin command name, waits on gominimal/arch#101 and is accepted as a residual there; when #101 is decided, UpstreamPin::hint() and its doc comment in crates/minimald/src/env.rs and docs/reference/loadouts.md:166 take the name it picks.

@norrietaylor
norrietaylor added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 706ca13 Nov 13, 2026
38 checks passed
@norrietaylor
norrietaylor deleted the agent/3348-an-activation-refusal-for-an-unknown-package-nam branch November 13, 2026 16:14
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.

D3071 — An activation refusal for an unknown package names the [upstream] pin and tells the user to run min update

1 participant

0