Skip to content

FOX-118: Check submodule contents before deleting a workspace - #83

Open
jamarks wants to merge 2 commits into
mainfrom
agent/fox-118-check-submodule-contents-before-deleting
Open

jamarks wants to merge 2 commits into
mainfrom
agent/fox-118-check-submodule-contents-before-deleting

Conversation

@jamarks

@jamarks jamarks commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Why: workspaces.mjs:197-206 and :222-226: the deletion guard inspects only the superproject. I created a pushed, clean checkout containing a pushed submodule, then placed only-local.private inside the submodule under its committed *.private ignore rule. Parent git status --porcelain and parent ls-files -z --others --ignored --exclude-standard both returned empty, while the submodule's ls-files returned the local file; blockers('w1') returned []. Deleting the workspace would erase that ignored submodule file.

Hardened workspace deletion to check populated submodules recursively for dirty, ignored, or unpushed work and block deletion when a check fails.

Try it: Use workspace folder deletion; it now keeps the folder when a submodule has local work.

Verified: node --test tests/workspaces.test.mjs: pass (23/23, exit 0); npm test: pass (252/252, exit 0); git diff --check: pass (exit 0).

Change: 2 files, 124 lines. Tests pass (npm test), run by the job.

Linear: https://linear.app/fox-cli/issue/FOX-118/check-submodule-contents-before-deleting-a-workspace

Merging publishes it to release on the job's next run.

Made by a fox job (20261104-160013-e71dc1).

Hardened workspace deletion to check populated submodules recursively for dirty, ignored, or unpushed work and block deletion when a check fails.

Linear: https://linear.app/fox-cli/issue/FOX-118/check-submodule-contents-before-deleting-a-workspace
@jamarks

jamarks commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

🔧 fox review (gpt-6-sol): Fixed a data-loss case in the PR’s submodule deletion check.

  • Fixed: deinitialized or missing submodule worktrees no longer pass deletion checks when Git data remains in the parent repository; added a regression test.

Fixes pushed to this branch in 52810ed; tests pass (npm test), run by the job.

fox-review: 52810ed

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.

1 participant