FE-1166: Add executor run policy#302
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryMedium Risk Overview Worktree creation branches on substrate: default Verification reads Safety on git boundaries: Reviewed by Cursor Bugbot for commit e300f58. Bugbot is set up for automated code reviews on this repo. Configure here. |
e10205f to
86756d7
Compare
f76437d to
f87bfcc
Compare
f87bfcc to
047123f
Compare
lunelson
left a comment
There was a problem hiding this comment.
This is the right direction for isolating greenfield runs, and I like that the default path remains compatible.
One boundary concern before this lands: src/executor/worktree.ts now shells out to git init / git commit directly for the empty_dir substrate, while src/executor/TOPOLOGY.md still says executor core does not own subprocess/git effects and that real capabilities enter through app-layer ports. That changes the executor/app port boundary in a way future slices will likely copy.
Can we either move this run-local git initialization behind an injected port, or update the topology/decision to explicitly name this as the allowed exception and why it is not part of the app-layer git capability surface?
|
Fixed: removed the web run-policy/replanning metadata from the FE-1166 sidecar surface. Focused run route tests pass. |
f689244 to
e300f58
Compare
Merge activity
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e300f58. Configure here.
| metadataPath, | ||
| sideEffects: [], | ||
| }; | ||
| } |
There was a problem hiding this comment.
Empty dir idempotency stalls orchestration
Medium Severity
For substrate: "empty_dir", when run.json still has status: "created" but already records a valid isolated worktreeDir, createWorktree returns already_created without advancing metadata to worktree_created. drive() treats unchanged runStatus as a halt on worktree_create, so re-orchestration after resetting only status (while keeping worktreeDir) wedges the run.
Reviewed by Cursor Bugbot for commit e300f58. Configure here.



Why
Greenfield executor runs must not inherit the host repo, host
package.json, or host git history by default.This PR also fixes the failure mode caught by
run-mrbs97w9: anempty_dirworktree nested under Brunch could still letnpm testwalk up to the host package and promotion/preflight resolve against the host git root.What
substrate: "empty_dir"for isolated greenfield run directories.verifyProfilesupport, currently includingnpm_test.empty_dirworktrees as isolated git repos with an empty base commit.npm --prefix <worktreeDir> ....How To Test
npx vitest run src/executor/__tests__/worktree.test.ts src/app/__tests__/test-runner-port.test.ts src/app/__tests__/git-land-port.test.ts src/app/__tests__/git-host-promotion-port.test.ts src/executor/__tests__/promotion.test.ts src/executor/__tests__/host-promotion.test.ts src/executor/__tests__/orchestrate.test.ts src/.pi/extensions/__tests__/registry.test.tsnpm testTUI smoke path:
execute_launch: ready.execute_run_create { runId: "run-empty-1", substrate: "empty_dir", verifyProfile: "npm_test" }.execute_orchestrate { runId: "run-empty-1" }.git_worktree_addagainst the host.npm test started, but execute vianpm --prefix <run worktree> test.