Skip to content

Issue 298 prerelease fixes - #304

Merged
slowdini merged 4 commits into
devfrom
issue-298-prerelease-fixes
Sep 2, 2026
Merged

Issue 298 prerelease fixes#304
slowdini merged 4 commits into
devfrom
issue-298-prerelease-fixes

Conversation

@slowdini

@slowdini slowdini commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Closes #298

slowdini and others added 4 commits September 1, 2026 20:38
`teardown-guard` swept only the invocation cwd, but the write guard now
arms inside each per-(group, condition) task env. Run mid-campaign it
printed "No write guard was installed — nothing to remove" while both
envs held live guards — the most costly moment for a false all-clear,
since the command exists for hand-editing files the guard would block.

It already accepted `CommonArgs`; the dispatch discarded them. Thread
them through and walk the iteration's staged envs the way `teardown` and
the `finalize` reminder already do, still without touching the staged
skill set or the workspace. Where those flags resolve no run, the sweep
now names the scopes it actually checked and warns that the env guards
were not among them.

Before:
    $ eval-magic teardown-guard --iteration 1
    No write guard was installed — nothing to remove.

After:
    $ eval-magic teardown-guard --skill demo --workspace-dir ws --iteration 1
    🛡 Write guard removed: 2 task envs in iteration 1.

    $ eval-magic teardown-guard          # from an unrelated cwd
    No write guard was installed — nothing to remove (checked the invocation cwd).
    ⚠ Task env guards were not checked, so any that were armed still are: …
       Add the run's target flags, or run `eval-magic teardown`.

Verified: cargo test, cargo clippy --all-targets -- -D warnings,
cargo fmt --check, plus a real run → teardown-guard against a scaffolded
skill.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJjf8XMm1e1XtRZaGnkmvr
Every dispatch prompt designates `<eval-root>/tmp` for temporary work and
tells the agent to use it. An agent that complied then had everything it
put there measured as part of its change: in one prerelease run `tmp/`
accounted for 3 of 11 files touched and 228 of 296 lines added. That
trips `diff_scope` budgets on throwaway notes, puts scratch files in the
`diff.patch` a judge reads as the deliverable, and does so asymmetrically
— only in the arm that happened to use the directory it was told to use.

`.eval-magic-outputs/` already never counts, for the same reason. The
scratch directory now shares that treatment, on both surfaces: the env's
`.git/info/exclude` and each harness's `framework_ignore_paths`.

Both were spelling the outputs entry separately, and the diff-scope test
fixture spelled it a third time — so the fixture could not fail when the
rule changed. `sandbox::framework_owned_entries` is now the one
definition all three read.

Only files created under `tmp/` are affected: gitignore rules never apply
to tracked paths, so a codebase that genuinely tracks a `tmp/` directory
keeps its files measured.

Verified: cargo test, cargo clippy --all-targets -- -D warnings,
cargo fmt --check, plus a real `run` — a scratch file under `tmp/` is
invisible to `git status` in the staged env while the agent's own file
still shows, and both arms get the same `.prettierignore` block.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJjf8XMm1e1XtRZaGnkmvr
Teardown's kept-iteration warning offered `.eval-magic/<skill>/` as the
directory to delete. That was right before the eval home moved out of the
skill repo; since then no such path exists, and the hint printed it one
line below a `promote-baseline` command carrying the correct absolute
`--workspace-dir`.

`ctx.workspace_root` was already in scope and already rendered correctly
by `command_target_args` in the same message.

Before:
    eval-magic promote-baseline … --workspace-dir /home/u/.local/share/eval-magic/skills-c61a1930 …
    or delete .eval-magic/working-with-tdd/ manually to discard.

After:
    or delete /home/u/.local/share/eval-magic/skills-c61a1930/working-with-tdd/ manually to discard.

The existing teardown test could not catch this: it runs with
EVAL_MAGIC_WORKSPACE_DIR=.eval-magic, where the two spellings coincide.
The new case puts the workspace elsewhere.

Verified: cargo test, cargo clippy --all-targets -- -D warnings,
cargo fmt --check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJjf8XMm1e1XtRZaGnkmvr
Review follow-ups on the #298 fixes.

`envs_phrase` read the iteration out of `checked` with `unwrap_or_default`,
which no call site can reach — but a future one would silently print
"iteration 0". Take the iteration as an argument so the invariant is in
the signature.

The task repository's exclude file now covers more than the outputs dir,
so its failure message says "framework path exclusion".

Verified: cargo test, cargo clippy --all-targets -- -D warnings,
cargo fmt --check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJjf8XMm1e1XtRZaGnkmvr
@slowdini
slowdini merged commit 8bc5962 into dev Sep 2, 2026
7 checks passed
@slowdini
slowdini deleted the issue-298-prerelease-fixes branch September 2, 2026 01:40
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.

Three smaller issues from a full codebase-backed run (teardown-guard, scratch dir in diff scope, stale discard path)

1 participant