feat(push): expand default ignore list and exempt features/#10
Open
QT-7274 wants to merge 1 commit into
Open
Conversation
The default IGNORED_REF_DIRS only excluded .git/node_modules/coverage/dist/tmp/states/.agents, which left common build-artifact directories on the scan path. On large repos this could push the JSON payload past V8's max string length and produce "Invalid string length" errors during `acai push --all`. Changes: - Extend IGNORED_REF_DIRS with common build/cache dirs: target, build, out, bin, obj, .next, .nuxt, .svelte-kit, .turbo, .cache, .parcel-cache, .vite, .astro, DerivedData, Pods, __pycache__, .venv, venv, .tox, .mypy_cache, .pytest_cache, .ruff_cache, vendor, .idea, .vscode, .DS_Store. - Intentionally do NOT add 'src-tauri'. It contains real Rust source under src-tauri/src/** that should be scanned. The heavy artifact is src-tauri/target/, which is already covered by the 'target' entry. - This set still uses exact-name matching. Glob patterns like '*.egg-info' are intentionally NOT supported here; a separate change introduces .acaiignore for that. - Always descend into the canonical features/ tree even if a subdirectory's name collides with an ignored build dir (e.g. features/build/login.feature.yaml for product 'build'). Tests: 4 new cases in push.test.ts cover target/build/.next/vendor/ __pycache__ exclusion, src-tauri/src descent, and features/build descent. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Why
acai push --allcurrently fails withInvalid string lengthon large repos that contain build artifacts under directories that aren't in the default ignore list (e.g. Rusttarget/, Taurisrc-tauri/target/, Java/Gradlebuild/, Next.js.next/, etc.). The CLI scans every file looking for ACID references, and a 10 GB build directory can push the resulting JSON payload past V8's max string length (~512 MB).I noticed this on a Tauri project that has ~10 GB under
src-tauri/target/and ~840 MB undercrates/. Reproduction is simple: any reasonably large compiled project will trigger it.What
Extend
IGNORED_REF_DIRSto cover the most common build/cache/IDE directories:target,build,out,bin,obj,.next,.nuxt,.svelte-kit,.turbo,.cache,.parcel-cache,.vite,.astro,DerivedData,Pods__pycache__,.venv,venv,.tox,.mypy_cache,.pytest_cache,.ruff_cachevendor.idea,.vscode,.DS_StoreIntentionally do NOT add
src-tauri. It contains real Rust source undersrc-tauri/src/**that should be scanned. The heavy artifact issrc-tauri/target/, which is already covered by the newtargetentry. (This was raised in adversarial review and corrected before submitting.)*.egg-info-style globs are intentionally NOT added. The set usesSet.has(name)exact-name matching, so glob entries silently no-op. Glob support is introduced in a follow-up PR (`.acaiignore`).Exempt the canonical
features/tree. A user can have a feature spec at `features/build/login.feature.yaml` (where `build` is the product name). Without an exemption, the new `build` entry would skip the entire subtree, silently dropping their spec. `walkFiles` now bypasses `IGNORED_REF_DIRS` checks once the path is under `features/`.Tests
4 new cases added to `src/core/push.test.ts`:
`AGENT=1 bun test src/core/push.test.ts` → 22 pass, 0 fail.
Full suite has 3 pre-existing failures unrelated to this change (skill.test.ts requires a release binary not built locally; acid-references.test.ts has a Chinese-path encoding issue specific to my dev env).
Follow-up
A second PR (
feat(push): support .acaiignore) builds on this one to add user-defined ignore patterns with gitignore-style syntax. Filed separately for clarity.🤖 Co-authored-by Claude