feat: publish custom findings and persist dedupe groups - #667
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ 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. |
zcrab-oai
left a comment
There was a problem hiding this comment.
One validated P1 persistence issue: successful HTTP status currently masks missing dedupe-group acknowledgments.
|
|
||
| async storeDedupeGroups(groups: readonly string[][]): Promise<void> { | ||
| if (groups.length === 0) return; | ||
| await this.post("v1/dedupe-groups", { groups }); |
There was a problem hiding this comment.
[P1] Validate duplicate-group write acknowledgments before reporting success
Unlike publish(), this method discards the response body entirely. The added deduplication test explicitly posts a nonempty group, receives Response.json([],{status:201}), and still treats the group as persisted. If the service acknowledges only some groups, later workflow stages mark dedupe completed and retries skip the missing writes permanently. Validate that the receipt contains the expected persisted group memberships and throw on missing or malformed acknowledgments so the write can be retried.
* 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 <272643392+kmbroai@users.noreply.github.com> --------- Co-authored-by: kmbroai <272643392+kmbroai@users.noreply.github.com>
5128225
into
dev/kyleb/findings-deduplication
* 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 <272643392+kmbroai@users.noreply.github.com> --------- Co-authored-by: kmbroai <272643392+kmbroai@users.noreply.github.com> --------- Co-authored-by: kmbroai <272643392+kmbroai@users.noreply.github.com> --------- Co-authored-by: Kyle Brown <272643392+kmbroai@users.noreply.github.com>
* feat(typescript): add findings service plumbing * feat(typescript): persist findings and embeddings through the service API * test(typescript): extract findings service Docker smoke runner * refactor(test): translate findings storage fixture to TypeScript * refactor(server): omit provisional bulk dedupe endpoint * docs: use canonical plugin source in findings import example * fix(plugin): support isolated findings helper execution * test(plugin): include findings storage in schema expectations * test(plugin): update findings migration snapshots * test: read findings smoke fixture from canonical plugin source * feat(typescript): deduplicate scans through SDK and CLI (#661) * 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 <272643392+kmbroai@users.noreply.github.com> --------- Co-authored-by: kmbroai <272643392+kmbroai@users.noreply.github.com> --------- Co-authored-by: kmbroai <272643392+kmbroai@users.noreply.github.com> --------- Co-authored-by: Kyle Brown <272643392+kmbroai@users.noreply.github.com> * feat(container): publish findings service and distribute workflow runner (#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 <272643392+kmbroai@users.noreply.github.com> --------- Co-authored-by: kmbroai <272643392+kmbroai@users.noreply.github.com>
Summary
Stacked on #661. Complete the local scan-to-findings-service flow: publish completed findings from the CLI, review candidates locally, and persist the accepted duplicate relationships in SQLite.
Changes
plugins/codex-security/scripts/and inheriting the canonical generated-bundle workflow. Preserve the parent's two-stage, transitive deduplication behavior and update the write-back fixture to remove its obsolete whole-group reviewer.publish scan --to custom --findings-url http://localhost:3000and the SDK'spublishScanToCustom. The URL is an explicit service base URL with no default; publication posts complete sealed findings and their repository ID to/v1/bulk/findings. Existing scan selection and--dry-runwork without changing Linear or Cloud publication.finding_dedupe_groupsandfinding_dedupe_group_members. Findings can belong to multiple overlapping reviewed groups. Membership identifies a group idempotently; overlapping groups are not automatically united.POST /v1/dedupe-groupsfor atomic group batches andGET /v1/finding/{id}/dedupe-groupsfor readback. Missing members reject the entire batch.dedupepersist accepted groups after all reviews and fail if write-back fails. Preserve its existing result shape, required review fields, original findings, embeddings, and sealed scan artifacts.Testing
Canonical plugin source update (
3de1f167)build:pluginandcheck:plugin-sourcepassed on this branch: 119 generated plugin files, includingworkbench_findings.py, and no tracked files undersdk/typescript/_bundled_plugin.12345and4011281236, each with 1,978 passed, 29 skipped, and zero failures.pnpm run types(including the canonical MCP app),pnpm run format, andgit diff --checkpassed.pnpm run test:mcp) passed.Provisional endpoint cleanup (
a5b2b430)pnpm run types,pnpm run format, andgit diff --check: passed.TypeScript fixture update (
6bf5861f)Earlier verification
pnpm run test --seed 12345andpnpm run test(random seed2809160346) each passed 1,941 tests, with 28 skipped and no failures.pnpm run types,pnpm run format, andgit diff --check: passed.Risk and rollout
Deploy the updated findings service before using the updated
dedupe; older servers do not implement group write-back. The migration adds tables without rewriting findings or scan history. Groups are additive, and retries of the same memberships reuse the existing group. This does not update external issue trackers or replace stored findings with review-generated merged reports.The preview service's existing network and authentication setup is unchanged: keep it on a trusted local endpoint or behind an authenticated proxy. Custom publication sends findings only to the explicitly selected service and does not forward model credentials. This PR adds no dependencies or package-version changes beyond its updated base.
Public disclosure review