feat(typescript): persist findings and embeddings through the API - #660
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsBlocking findings (1)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Security Review
Here are some automated security review suggestions for this pull request.
Reviewed commit: 64e1aad676
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
zcrab-oai
left a comment
There was a problem hiding this comment.
Two validated findings introduced in this PR: one P1 migration regression affecting scan-only customers and one P2 SQLite concurrency issue.
* feat(typescript): deduplicate stored findings with Codex * refactor(typescript): group server deduplication modules * refactor(typescript): run scan deduplication in SDK and CLI * feat(typescript): scope finding retrieval by repository * refactor(typescript): trim redundant deduplication code * fix(typescript): restore complete deduplication reviews * refactor(typescript): trim deduplication setup and smoke bookkeeping * perf(typescript): reduce deduplication review work * test(plugin): include repository associations in schema expectations * test(plugin): update repository migration snapshots * test: read scan smoke manifest from canonical plugin source * feat: publish custom findings and persist dedupe groups (#667) * feat: publish custom findings and persist dedupe groups * refactor(test): translate write-back smoke assertions to TypeScript * test: align findings writeback with pair-only deduplication * test(plugin): include dedupe groups in schema expectations * test(plugin): update dedupe group migration snapshots * feat: persist resumable local findings workflows (#673) * feat: persist resumable local findings workflows * fix: store workflow metadata in explicit SQLite columns * test(plugin): align workflow helper and schema contracts * feat: checkpoint dedupe reviews and replay group writes (#674) * feat: checkpoint dedupe reviews and replay group writes * fix: keep workflow source snapshots within the checkout * fix: migrate dedupe checkpoint bindings to SQLite columns * test: retain required canonical ID in translated checkpoint checks * test: align checkpoint contracts with the updated findings stack * feat(server): add read-only findings dashboard (#679) * feat(server): add read-only findings dashboard * fix(dashboard): show workflows first * refactor(dashboard): simplify rendering and reuse workflow storage * fix(dashboard): preserve filters and completed result semantics * fix(dashboard): retain published repository identities in search * fix(dashboard): include deep scan activity in freshness * refactor(dashboard): use native selects and remove dropdown machinery * refactor(dashboard): show only stored findings and groups --------- Co-authored-by: kmbroai <[email protected]> --------- Co-authored-by: kmbroai <[email protected]> --------- Co-authored-by: kmbroai <[email protected]> --------- Co-authored-by: Kyle Brown <[email protected]>
Adopt the canonical plugin manifest location while preserving the consolidated findings, workflow, and dashboard runtime entries.
…ner (#666) * feat(typescript): deduplicate stored findings with Codex * refactor(typescript): group server deduplication modules * refactor(typescript): run scan deduplication in SDK and CLI * feat(typescript): scope finding retrieval by repository * refactor(typescript): trim redundant deduplication code * fix(typescript): restore complete deduplication reviews * feat(container): publish findings service image to GHCR * feat: publish custom findings and persist dedupe groups * refactor(container): trim findings release verification * refactor(typescript): trim deduplication setup and smoke bookkeeping * feat(container): add scanner workflow runner Compose * refactor(test): translate write-back smoke assertions to TypeScript * refactor(test): translate runner smoke fixtures to TypeScript * perf(typescript): reduce deduplication review work * test: align findings writeback with pair-only deduplication * test(plugin): include repository associations in schema expectations * test(plugin): include dedupe groups in schema expectations * test(plugin): update repository migration snapshots * test(plugin): update dedupe group migration snapshots * test: read scan smoke manifest from canonical plugin source --------- Co-authored-by: Kyle Brown <[email protected]>
Summary
Implement part 2 of the findings service: persist complete findings and embeddings through the existing HTTP endpoints and list stored findings with pagination.
Stacked on #653, with
dev/kyleb/findings-serviceas the base so this diff contains only part 2. After #653 merges, rebase this commit ontomainand retarget the PR.Changes
plugins/codex-security/scripts/source. The SDK bundle is generated bybuild:pluginand remains untracked. Preserve the existing findings operations and migration 33, update the checkout example to the canonical path, and make the extracted helper follow the neighboring scripts' isolated-import and help behavior.POST /v1/bulk/findingsto validate the existingFindingmodel, generate embeddings, and atomically store findings plus vectors. Return finding IDs in request order.GET /v1/findingswithlimit/offsetpagination, a default page size of 50, andnextOffset.text-embedding-3-largewith 1,536 dimensions, token-aware batching, lossless chunking, and normalized pooling. Add.env.exampleand document Compose credential setup and the API contracts. No CLI commands or flags are added.tsconfig.json, with a small mounted TypeScript helper using Node SQLite for storage checks. Both files are explicitly type-checked. YAML only sets up Bun and invokes the runner; helpers are excluded from npm and the production image.Testing
Canonical plugin source update (
cead95c4)build:pluginandcheck:plugin-sourcepassed on this branch: 119 generated plugin files, includingworkbench_findings.py, and no tracked files undersdk/typescript/_bundled_plugin.12345and1547932008, each with 1,941 passed, 29 skipped, and zero failures.pnpm run types(including the canonical MCP app),pnpm run format, andgit diff --checkpassed.Earlier verification
Verified at
2e7d40b7:12345and3562923079).pnpm run types,pnpm run format, andgit diff --check: passed.pnpm packandpnpm run check:package: passed with 314 archive entries. Inspected the archive: live server modules are present; the removed dedupe module and smoke fixtures are absent. Installed public imports, NodeNext types, CLI, 114 bundled plugin files, bundled Codex, and nested-worker checks passed.Risk and rollout
OPENAI_API_KEYorCODEX_API_KEY. Automated verification uses synthetic provider responses, not a live embedding API call.Public disclosure review