Repository navigation
fix: support starter files without a local stack - #553
mattrossman wants to merge 3 commits into
Conversation
…un-spark-evals-with-starter-files-and # Conflicts: # evals/cli/build-database-002-stack-lifecycle/stack.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
barryroodt
left a comment
There was a problem hiding this comment.
Looking good, left some feedback inline.
Also noticed that the docs-eval planning checklist in evals/docs/.claude/skills/docs-eval-planning/references/prompt-rules.md still needs preinstallCli and startLocalStack, might be worth a follow-up?
| ? toIdentifierList(data.services) | ||
| : undefined, | ||
| projectRunning: data.projectRunning, | ||
| preinstallCli: data.preinstallCli, |
There was a problem hiding this comment.
Must fix: flag the old keys before the open eval PRs merge.
This silently drops projectRunning and skipCliInstall, and both defaults flip. Around 20 open eval PRs rely on the old defaults (docs batch #537, #544 to #563, plus #543, #410, #399, #401, #309). They merge without conflicts, so nothing flags the change. Their evals then run with no CLI and no stack, which makes a score drop look like a model regression.
I'd throw a "renamed to" error naming startLocalStack or preinstallCli for the old key, and give the authors a heads-up about both defaults.
| `${promptPath}: ships a local/ workspace but declares interface: ${interfaceKind}, expected cli` | ||
| ); | ||
| } | ||
| return interfaceKind === 'cli' || preinstallCli ? 'local-stack' : 'tools'; |
There was a problem hiding this comment.
Smaller: handle preinstallCli on MCP and REST evals.
The flag switches the eval to a local-stack session. Platform-lite and the remote/ seed never start, and MCP falls back to docs-only unless hostedProject is set. No eval does this yet, but list would schedule a CI pair for spark that the run loop skips, so CI gets no result.
We could restrict the flag to interface: cli. If we keep it independent of interface as the README suggests, I'd have list skip experiments without localStack for these evals too.
| sessionArchivePath: sessionArchivePath(expName, ev.id, runIndex), | ||
| }); | ||
| const agentRunEndedAt = Date.now(); | ||
| const hostWorkspace = cliSandbox |
There was a problem hiding this comment.
Smaller: skip the workspace copy when the scorer won't use it.
All current experiments use sandboxed agents, so every MCP and REST run now pays for a docker cp. Even an eval with no local/ whose scorer never reads hostWorkspace can fail before scoring if that copy fails.
Gating the copy on ev.localDir would keep the old cost for those runs. Another option is to copy when the scorer first asks for the workspace. The local-stack-only comment at run-vercel-evals.ts:831 needs an update too.
| An experiment can pass `localStackRuntime({ env: { SUPABASE_EXPERIMENTAL_STACK: '1' } })` to turn on feature-flagged CLI behaviour for every eval it runs. The eval itself stays flag-agnostic, so once the feature graduates you drop the entry and the eval's history carries on. Names the harness manages itself (`PATH`, `HOME`, `DOCKER_HOST`, hosted-link credentials and so on) are rejected. | ||
|
|
||
| Scorers check what the agent produced, never what the harness provisioned: with `projectRunning: true` (the default) the running stack and the seeded `local/` workspace are setup, so score only the deltas the agent made on top; with `projectRunning: false` the agent creates that state itself, so depending on it is fair game. | ||
| Scorers check what the agent produced. When `startLocalStack: true`, score changes to the provisioned stack and workspace. |
There was a problem hiding this comment.
Smaller: spell out which workspace changes count toward the score.
The harness now copies local/ even when the stack stays off. With the default settings, a scorer author could read this as permission to give the agent credit for a file the harness put there.
Maybe "Starter files from local/ are harness setup, as is the stack when startLocalStack: true. Score only the agent's changes on top."
| The frontmatter has no `services:` key. The sandbox shim turns it into | ||
| `supabase start -x <container names>`, which the managed stack rejects. With | ||
| `projectRunning: false` the harness starts no stack at all — both are the | ||
| `startLocalStack` defaults to false the harness starts no stack at all — both are the |
There was a problem hiding this comment.
Nit: tidy up the wording around the new default.
"With startLocalStack defaults to false the harness starts no stack" reads a little oddly here. The same wording shows up in build-database-002-stack-lifecycle/README.md:95 and build-cli-004-worktree-stacks/README.md:46, and again in investigate-database-001-slow-query/README.md:93.
"With startLocalStack unset, the harness starts no stack" would work here.
|
Hi @mattrossman! Thanks for the PR. I've rebased my changes on top of your branch and everything's working correctly. The only remaining tweak I had to do in the framework is to give EVAL access to the agent sandbox, so the EVAL can evaluate the generated app. Do you want to include that in these changes as well? You can find my commit here: #526 |
| const handle = await createBareSandbox({ localDir: seed }); | ||
| try { | ||
| const result = await handle.sandbox.exec( | ||
| "printf 'updated' > app.txt" |
There was a problem hiding this comment.
This test still passes if createBareSandbox ignores localDir: printf 'updated' > app.txt creates the file whether or not the starter file was copied in, and the export check only looks for the new value. Could you first check inside the sandbox that app.txt reads starter, then overwrite it?
(spawned from discussion on #526)
Today, the harness assumes
local/starter files belong to a CLI local-stack eval, so REST and MCP evals can’t use them.This PR copies
local/files into the workspace independently of local stack setup. Evals now use explicitpreinstallCliandstartLocalStackfrontmatter to opt in to CLI installation and stack startup.CLI eval with a running stack
CLI eval where the agent starts the stack
Both setup fields default to
false. Existing CLI evals are migrated to preserve their initial setup.Verified a temporary MCP eval edited a starter file and updated a platform-lite project without starting a local stack, passing both checks (Braintrust trace).
Closes AI-1551