GitNexus/gitnexus/src/storage
BlackOvOoo 263ca353a6
fix: shard parse cache persistence on large repos (#1580)
* fix: shard parse cache persistence on large repos

* fix(parse-cache): validate shard keys, docs, and sharded-cache tests

- Reject non-sha256-hex keys from index.json before path.join (path traversal).

- saveParseCache: skip invalid keys defensively; try/catch per-shard JSON.stringify.

- Clarify save comment (tmp dir + rename vs atomic).

- Tests: hex keys throughout, traversal keys, multi-shard, version-mismatch+legacy, second save, legacy removal.

- AGENTS.md / GUARDRAILS.md: document .gitnexus/parse-cache/ vs legacy parse-cache.json.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(autofix): apply prettier + eslint fixes via /autofix command

---------

Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-16 07:19:06 +01:00
..
file-hash.ts feat(analyze): incremental indexing (parse cache + DB writeback + scope-res short-circuit) (#1479) 2026-05-12 13:14:56 +01:00
git.ts fix(server): sanitize repo name to prevent argument injection (#1305) 2026-05-11 09:38:07 +01:00
parse-cache.ts fix: shard parse cache persistence on large repos (#1580) 2026-05-16 07:19:06 +01:00
repo-manager.ts fix(cli): tolerate read-only workspace in ensureGitNexusIgnored (#1549) (#1550) 2026-05-14 17:26:34 +01:00