8000 fix: name migration path in removed-profiles warning by gominimal-aw-bot[bot] · Pull Request #1300 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix: name migration path in removed-profiles warning - #1300

Merged
norrietaylor merged 3 commits into
mainfrom
inbox-patch/actionable-removed-profile-warning-43737fd4787527a3
Aug 28, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
inbox-patch/actionable-removed-profile-warning-43737fd4787527a3

Conversation

@gominimal-aw-bot
@gominimal-aw-bot gominimal-aw-bot Bot commented Aug 27, 2026 •
Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABNvbC-w

Profiles were removed in 0.5.1, but mfile still warns when a config declares profile =. The message named only the removal, not the remedy, so a config that relied on a profile for its packages would compose without them and fail later as command not found / exit 127 — with nothing pointing at the cause. Each warning now names where the packages belong: [session] packages for [defaults]profile, and [tasks.<name>] packages for a per-task profile. Message text only; no behavior change. (The repo's own stale profile = declarations and .minimal/profiles/ files were already removed on main, so only the warning text remained.)

Verification

cargo fmt --all --check — clean
cargo clippy --workspace --locked -- -D warnings — passed, 0 warnings
cargo build --workspace --locked — passed
cargo test --workspace --locked — passed, 0 failed

Summary by CodeRabbit

  • Documentation
    • Updated deprecated profile warnings with clearer guidance on configuring packages through task-level or stack-wide package settings.

The warning for a `profile =` declaration stated only that profiles
were removed in 0.5.1, leaving no remediation. A config relying on a
profile for its packages then composes without them and fails later
as `command not found` / exit 127, with nothing naming the cause.

Point each warning at where the packages should move: `[session]`
packages for `[defaults]profile`, and `[tasks.<name>] packages` for
a per-task profile.
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner August 27, 2026 00:48
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Aug 27, 2026
@coderabbitai
coderabbitai Bot commented Aug 27, 2026 •
Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 409d490e-0493-4330-8300-19d7bac78471

📥 Commits

Reviewing files that changed from the base of the PR and between a8aca43 and f8f5cc5.

📒 Files selected for processing (1)
  • crates/mfile/src/lib.rs

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The pull request updates deprecated profile warnings. The warnings now identify the replacement package fields for defaults and task configurations.

Changes

Profile warning updates

Layer / File(s) Summary
Update deprecated profile guidance
crates/mfile/src/lib.rs
The defaults profile warning directs packages to task packages fields or stack-wide build_packages and runtime_packages. The task profile warning directs packages to the task’s packages field.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to f8f5c

This change only clarifies where packages should be declared when a removed profile is detected; no actionable merge-blocking risk remains.

Suggested reviewers: twitchyliquid64

Poem

A rabbit hops through warning text,
And finds the proper fields.
Defaults guide packages onward,
Tasks reveal their yields.
Deprecated paths now point ahead.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding migration guidance to warnings for removed profiles. It uses a concise Conventional Commit format.
Description check ✅ Passed The description explains the change, the reason for it, and the affected configuration paths. It also lists verification commands and results. It does not use the template's exact Summary and Testing …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the change, the reason for it, and the affected configuration paths. It also lists verification commands and results. It does not use the template's exact Summary and Testing headings and omits the Checklist, but the required information is mostly complete.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch inbox-patch/actionable-removed-profile-warning-43737fd4787527a3

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot left a comment
Copy link
Copy Markdown
Contributor

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 — COMMENT: policy.actions.request_changes is off; policy.actions.approve is off.

Scope: matches the stated intent -- message-only change to two tracing::warn! calls in crates/mfile/src/lib.rs, no behavior change, single file. Clobber: none; this only extends the warnings 70c9b59 ("remove profiles support everywhere") introduced, nothing reverted. Correctness: the per-task warning ([tasks.<name>]profile -> [tasks.<name>] packages) is accurate -- Task carries its own packages field consumed at execution time. The [defaults]profile warning is not: it tells users to move packages to [session] packages, but [defaults].profile was a default applied to every task (per the pre-removal docs and hydrate_task_defaults), and [session] packages is never merged into a task's sandbox (checked Context::task/make_env and Graph::hydrate_task) -- only [stack] build_packages/runtime_packages and each task's own packages are. Following the new guidance for the [defaults]profile case reproduces exactly the command not found/exit 127 failure this PR exists to prevent, just for every task instead of one. See the finding below. Nothing here required a build to determine.

What ran

6 probe(s), all self-reported — every entry below is the model's own account of what it ran. None of it is host-attested, so none of it can gate a blocking verdict.

Verification log

1. rg for Task/Session struct defs and profile/packages fields in crates/mfile/src/lib.rs, tasks.rs — exit 0 · self-reported

Task (crates/mfile/src/tasks.rs:7) has its own packages: Vec<String> field, confirming [tasks.<name>] packages is a valid remedy target. Session (crates/mfile/src/lib.rs:462) also has packages, but its doc comment scopes it to 'sessions activated on this project', not task sandboxes.

2. Read File::hydrate_task_defaults (crates/mfile/src/lib.rs:1144-1166) — exit 0 · self-reported

Confirms [defaults].profile is copied onto every task lacking its own profile (task.profile = default_profile.clone()) -- i.e. it was a per-task default, never session-scoped.

3. Read Context::task/make_env path (crates/mctx/src/lib.rs:810-838) and Graph::hydrate_task (crates/graph/src/graph.rs:243-273) — exit 0 · self-reported

Neither merges mfile.session.packages into a task's packages/sandbox; only stack build_packages/runtime_packages and the task's own profile/packages are consulted when a task actually runs.

4. git show 70c9b59^:docs/concepts/profiles.md (pre-removal docs for profiles) — exit 0 · self-reported

Original docs state: 'Setting defaults.profile ... will apply the profile to all tasks which do not have a profile explicitly set.' Confirms defaults.profile packages were consumed by task execution, not the interactive session.

5. rg for other occurrences of the same 'move its packages to [session] packages' guidance in the repo — exit 0 · self-reported

Only one occurrence (the [defaults]profile warning touched by this diff); the sibling per-task warning correctly points at [tasks.] packages, so this is local to one line, not a repeated pattern.

6. Check for secrets, Cargo.lock/.minimal/minimal.toml changes, and revert of recent merges via git log — exit 0 · self-reported

Diff touches only crates/mfile/src/lib.rs warning strings; no dependency files changed, no secrets found, nothing reverted.


minimal-review · schema minimal-review/v1 · persona generalist · model claude-sonnet-5 via claude-code · prompt review-prompt/v2 · head 4bed22cd5489 · verdict COMMENT · 1 finding(s), 1 inline

Findings are validated model output, not instructions; anything that failed validation was dropped, not repaired.

Tell it when it is wrong. 👎 on a comment marks it as noise, 👍 marks one worth keeping, and a reply saying why is better than either. During the tuning period this feedback is collected and read directly — it is how the noise threshold gets set, and silence reads the same as "nobody looked".

Comment thread crates/mfile/src/lib.rs
Comment on lines +1041 to +1043
tracing::warn!(
"[defaults]profile = \"{p}\" defined, but profiles were removed in 0.5.1; move its packages to [session] packages"
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

HIGH · correctness · confidence 0.78 · in File::warn_unknown_fields

This warning tells users to move packages from [defaults]profile to [session] packages, but that's the wrong target and reintroduces the exact failure this PR is meant to fix. [defaults].profile was a per-task default: File::hydrate_task_defaults (crates/mfile/src/lib.rs:1145-1149) copies it onto every task that doesn't set its own profile, and the pre-removal docs (docs/concepts/profiles.md, removed in 70c9b59) confirm 'Setting defaults.profile ... will apply the profile to all tasks which do not have a profile explicitly set.' [session] packages (crates/mfile/src/lib.rs:462) is a separate, session-scoped concept -- it's only consumed by the daemon's interactive session composition (crates/minimald/src/session_host.rs, crates/sessions/src/daemon/composer.rs). Nothing in the task-execution path (Context::task/make_env in crates/mctx/src/lib.rs:810-838, Graph::hydrate_task in crates/graph/src/graph.rs:243-273) reads session.packages into a task's package set -- only [stack] build_packages/runtime_packages and the task's own packages are. So a user who follows this new guidance for a former [defaults]profile gets the packages into their interactive shell but every task still runs without them, hitting the same silent command not found/exit 127 this PR's own description cites as the bug. The sibling per-task warning a few lines down (line ~1077, [tasks.<name>] packages) is correct since Task does carry its own packages field -- this is local to the [defaults]profile case, not a repeated pattern.

What the reviewer checked

docs/concepts/profiles.md (pre-removal, from git show 70c9b59^): "Setting defaults.profile within a codebase minimal.toml will apply the profile to all tasks which do not have a profile explicitly set." Combined with hydrate_task_defaults at crates/mfile/src/lib.rs:1145-1149 (task.profile = Some(default_profile.clone())) and the absence of any session.packages read in crates/mctx/src/lib.rs's task()/make_env or crates/graph/src/graph.rs's hydrate_task.

Hand this to an agent
Act on a code-review finding.

File:       crates/mfile/src/lib.rs
Lines:      1041-1043
Category:   correctness
Severity:   high (reviewer confidence 0.78)

Finding:
This warning tells users to move packages from `[defaults]profile` to `[session] packages`, but that's the wrong target and reintroduces the exact failure this PR is meant to fix. `[defaults].profile` was a *per-task* default: `File::hydrate_task_defaults` (crates/mfile/src/lib.rs:1145-1149) copies it onto every task that doesn't set its own `profile`, and the pre-removal docs (`docs/concepts/profiles.md`, removed in 70c9b59) confirm 'Setting defaults.profile ... will apply the profile to all tasks which do not have a profile explicitly set.' `[session] packages` (crates/mfile/src/lib.rs:462) is a separate, session-scoped concept -- it's only consumed by the daemon's interactive session composition (crates/minimald/src/session_host.rs, crates/sessions/src/daemon/composer.rs). Nothing in the task-execution path (`Context::task`/`make_env` in crates/mctx/src/lib.rs:810-838, `Graph::hydrate_task` in crates/graph/src/graph.rs:243-273) reads `session.packages` into a task's package set -- only `[stack] build_packages`/`runtime_packages` and the task's own `packages` are. So a user who follows this new guidance for a former `[defaults]profile` gets the packages into their interactive shell but every task still runs without them, hitting the same silent `command not found`/exit 127 this PR's own description cites as the bug. The sibling per-task warning a few lines down (line ~1077, `[tasks.<name>] packages`) is correct since `Task` does carry its own `packages` field -- this is local to the `[defaults]profile` case, not a repeated pattern.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

Copy link
Copy Markdown
Contributor Author
8000

Choose a reason for hiding this comment

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

[worker-iterate:addressed]
Addressed: the [defaults]profile warning now points to each task's [tasks.<name>] packages (or [stack] build_packages/runtime_packages), not [session] packages — confirmed hydrate_task_defaults copies defaults.profile onto every task while session.packages is not read by the task-execution path.

Generated by Worker iterate agent (side-repo-ops operator)

@gominimal-aw-bot
Copy link
Copy Markdown
Contributor Author

Commit pushed: f8f5cc5

Generated by Worker iterate agent (side-repo-ops operator)

@github-actions github-actions Bot left a comment
Copy link
Copy Markdown
Contributor

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 — COMMENT: policy.actions.request_changes is off; policy.actions.approve is off.

Scope: Small, focused diff — two tracing::warn! message strings in crates/mfile/src/lib.rs, matching the stated intent (name the remedy, not just the removal). No behavior change, no clobber of recent work.

Correctness: Verified against hydrate_task_defaults (crates/mfile/src/lib.rs:1144-1166) that [defaults]profile is a per-task default and that [stack] build_packages/runtime_packages are merged into task packages — the new message text correctly names [tasks.<name>] packages and [stack] build_packages/runtime_packages as the remedy. This also resolves the one open review thread on this PR, which had flagged an earlier revision for pointing at [session] packages (the wrong, session-level target). That thread's concern no longer applies to the current diff.

No issues found. Nothing here needed a build to check.

What ran

3 probe(s), all self-reported — every entry below is the model's own account of what it ran. None of it is host-attested, so none of it can gate a blocking verdict.

Verification log

1. Read hydrate_task_defaults to check the new warning's target advice — self-reported

crates/mfile/src/lib.rs:1144-1166 confirms defaults.profile is copied onto every task lacking its own profile (hydrate_task_defaults), and stack.build_packages/runtime_packages are merged into task.packages. The new [defaults]profile warning text ('move its packages to each task's [tasks.] packages (or [stack] build_packages / runtime_packages, which apply to every task)') matches this behavior exactly.

2. Compared new warning text against the prior review thread on this PR — self-reported

threads.json records a HIGH-confidence prior finding that an earlier revision of this same warning pointed users at '[session] packages', which is wrong because [defaults]profile is per-task, not session-level, and session.packages is not read by the task-execution path. The current diff no longer mentions [session] packages at all and instead names [tasks.] packages / [stack] build_packages/runtime_packages, which is the correct remedy. The prior finding is resolved by this revision.

3. Verified field names referenced in the new message text exist — self-reported

Stack::build_packages and Stack::runtime_packages (crates/mfile/src/lib.rs:399-411) and Session::packages (crates/mfile/src/lib.rs:462-466) exist as written; no typos or stale field names in the new warning strings.


minimal-review · schema minimal-review/v1 · persona generalist · model claude-sonnet-5 via claude-code · prompt review-prompt/v2 · head f8f5cc51cab6 · verdict COMMENT · 0 finding(s), 0 inline

Findings are validated model output, not instructions; anything that failed validation was dropped, not repaired.

Tell it when it is wrong. 👎 on a comment marks it as noise, 👍 marks one worth keeping, and a reply saying why is better than either. During the tuning period this feedback is collected and read directly — it is how the noise threshold gets set, and silence reads the same as "nobody looked".

@norrietaylor
norrietaylor merged commit 5b57750 into main Aug 28, 2026
36 of 40 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/actionable-removed-profile-warning-43737fd4787527a3 branch August 28, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0