Repository navigation
fix(workflow): detect changes inside untracked directories - #1149
Merged
Merged
Conversation
Signed-off-by: ydflow <314143294+ydflow@users.noreply.github.com>
|
No findings in the specified diff. The Git option addresses the directory-collapsing issue, and the regression tests cover edits, additions, removals, and an unchanged directory. Both workflow guides are updated consistently. The PR description documents sufficient testing, including four representative built-CLI runs and persisted-result checks. A fake tool is adequate for this verification; no full provider × agent matrix is required. Review was read-only; I did not run, build, or install PR code. |
This was referenced Oct 15, 2026
jeff-r2026
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A read-only prompt step can edit, add, or remove files inside an already untracked directory and still finish successfully.
git status --porcelaincollapses the directory to?? notes/, so both snapshots hash a directory asmissingeven when its contents changed.Request
--untracked-files=allso the existing snapshot comparison hashes individual files. Add regression cases for edits, additions, removals with another file remaining, and an unchanged directory. Clarify the existing read-only behavior in both workflow guides.Type of Change
Test Plan
npm run buildnpx tsc --noEmitnpm run lintnpx vitest run(full suite not run locally)On Windows with Node 24.19.0:
npx vitest run workflow-local-driver: 16 passed. The three mutation cases fail against the unchanged upstream runtime at27a026fc3073543c77a41a2bf6c0feb4c7b235d0, reportingsucceededinstead offailed.npx vitest run workflow --exclude src/__tests__/workflow-cache.test.ts: 188 passed across 8 files.workflow-cache.test.ts: 282 passed, 24 failed. The same 24 failures reproduce in a separate baseline worktree at27a026f: WindowsEPERMwhen its fixtures create file symlinks. No failures were suppressed or changed by this PR.Real CLI verification after build
Used a fresh Git repository, isolated
HOME/USERPROFILE,teamai init --self --agent claude --force, andteamai pull. A fakeclaudeexecutable onPATHruns as a real child process, writes a valid result toTEAMAI_WORKFLOW_RESULT, and edits/adds/removes a file in the pre-existing untrackednotes/directory.notes/keep.txtstays present for every case.Ran the built CLI four times:
Checked each persisted run JSON and confirmed mutations remain in place for inspection. This exercises CLI routing, the local driver, executable resolution/spawn, and run persistence. It uses a fake tool, not a live model; other agent backends are left to CI.
Related Issues
Found through source inspection of the read-only prompt behavior introduced by #1120. No existing issue or open PR addressing this directory snapshot defect was found at submission time. #1126 and #1148 change other workflow runtime paths, not this snapshot function.
Notes for Reviewers
The runtime change is one Git option.
gitStatusfeeds the twosnapshotWorktreecalls around the prompt adapter; the existingchangedPathsresult already reportsread_only_dirtythroughreportAttempt. No run-state format or lease/report semantics change.Prepared with assistance from an AI coding agent.