Skip to content

perf(sdk): reuse prepared paths and findings across planning batches - #2977

Draft
mldangelo-oai wants to merge 1 commit into
mainfrom
mdangelo/codex/simplify-prepared-plan-inputs-9870af01
Draft

mldangelo-oai wants to merge 1 commit into
mainfrom
mdangelo/codex/simplify-prepared-plan-inputs-9870af01

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Summary

Component planning repeatedly walked the same directories, and scan matching repeatedly read the same historical IDs. Preparing those lookups once reduces work on large inventories and scan histories.

Changes

Component planning shares directory counts across prompts, compaction, splitting, and validation. It searches outward from the midpoint for a directory boundary. Deduplication queues final pair review after every nomination approves.

The matcher resolves overlapping identity links in the catalogue, presents each issue’s latest occurrence, and expands its ordered history in results. A shared index routes results to each historical scan. Evidence paging measures JSON escapes and continuation offsets incrementally. The patch removes 149 net lines.

Testing

On this commit, 486 SDK tests with 41,087 assertions passed on Linux, with 3 skips. The run also passed SDK and plugin builds, type checks, and formatting.

To exercise transitive identity reuse and rejection of missing scan data before saving, run cd sdk/typescript && bun test --timeout 30000 --seed 12345 tests-ts/cli-workbench.test.ts.

In earlier synthetic probes, directory visits fell from 131,992 to 71,992 across 12,000 paths, and historical ID reads fell from 561,600 to 4,680 across 120 scans of 40 records each. The single-scan probe added about 0.36 ms. Windows-only environment and path cases were skipped on Linux.

Risk and rollout

Automatic and all-history matching check for per-scan conflicts before saving. A later write failure leaves earlier comparisons saved. Untyped SDK callers passing an empty Map or Set in place of a findings array may now receive an empty result.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks—no material issues found in this merge-safety review. Shared indexes preserve directory coverage, ordered finding history and transitive identity links. Deduplication still requires every nomination and the final pair review to approve, and all per-scan conflicts are checked before the first batch write.

Validation: 357 focused tests passed across seven CLI, catalogue, component-planning, deduplication and comparison suites; three Windows-specific cases were skipped. Fresh SDK/plugin builds, types and formatting passed; exact-head hosted CI has 54 successes and two conditional skips. Tests used synthetic model/provider responses on Linux. Native Windows/macOS, live services and independent performance benchmarks were not exercised.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants