-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix: audit findings — 3 HIGH bugs, perf, docs, cleanup #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0db7658
fix: Bun worker onerror, batch CSS imports, sqlite wrapper improvements
SutuSebastian 3888190
fix: require JSX return or hook usage for component detection (audit #1)
SutuSebastian b6947e7
fix: include previously-indexed files in incremental and --files mode…
SutuSebastian 44f9e29
docs: fix Wyhash→SHA-256, symbols.kind values, query caching claim (a…
SutuSebastian 83057a5
refactor: remove unused analyzeDependencies, deduplicate fetchTableSt…
SutuSebastian 7a85734
perf: add statement cache for better-sqlite3 run()/query() (audit S3)
SutuSebastian 2c3791d
chore: remove dead eslint-disable-next-line directives
SutuSebastian c5aa7b9
chore: add changeset for audit findings
SutuSebastian f7f0cdd
test: enrich minimal fixture to cover all indexed tables
SutuSebastian c29d170
docs: align architecture, benchmark, golden-queries with audit fixes
SutuSebastian cb1ac83
chore: update changeset with docs and fixture additions
SutuSebastian 9b323fd
fix: address CodeRabbit review — closeDb try/finally, stale docstring…
SutuSebastian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| --- | ||
| "@stainless-code/codemap": patch | ||
| --- | ||
|
|
||
| Fix three HIGH-severity bugs found via cross-audit triangulation, plus performance and docs improvements. | ||
|
|
||
| **Bug fixes** | ||
|
|
||
| - Add missing `onerror` handler on Bun Worker — prevents silent promise hang when a parse worker crashes | ||
| - Require JSX return or hook usage for component detection — eliminates false positives (e.g. `FormatCurrency()` in `.tsx` files no longer indexed as a component) | ||
| - Include previously-indexed files in incremental and `--files` modes — custom-extension files indexed during `--full` no longer silently go stale | ||
|
|
||
| **Performance** | ||
|
|
||
| - Batch CSS imports instead of inserting one-at-a-time (both full-rebuild and incremental paths) | ||
| - Add `Map<string, Statement>` cache for `better-sqlite3` `run()`/`query()` — avoids ~2,000+ redundant `prepare()` calls on large projects | ||
| - Hoist `inner.query()` in `wrap()` to prepare once per call instead of per `.get()`/`.all()` | ||
| - Skip `PRAGMA optimize` on `closeDb` for read-only query paths | ||
|
|
||
| **Docs** | ||
|
|
||
| - Fix Wyhash → SHA-256 in architecture.md and SKILL.md (3 locations) | ||
| - Correct `symbols.kind` values (`variable` → `const`, `type_alias` → `type`) and `exports.kind` values | ||
| - Clarify `Database.query()` caching is Bun-only; Node re-prepares via wrapper | ||
|
|
||
| **Cleanup** | ||
|
|
||
| - Remove unused `analyzeDependencies: true` from CSS parser | ||
| - Deduplicate `fetchTableStats` (was duplicated across `index-engine.ts` and `run-index.ts`) | ||
| - Remove dead `eslint-disable-next-line` directives (oxlint doesn't enforce those rules) | ||
| - Fix `SCHEMA_VERSION` comment (said "2", value is `1`) |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.