Skip to content

refactor: simplify scanner imports and SDK test setup - #2136

Merged
mldangelo-oai merged 1 commit into
mainfrom
mdangelo/codex/simplify-imports-test-setup
Oct 29, 2026
Merged

mldangelo-oai merged 1 commit into
mainfrom
mdangelo/codex/simplify-imports-test-setup

Conversation

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Summary

Remove 493 maintained lines across SDK scanner normalization and tests. The import pipeline already establishes each record's ID before projecting its evidence. The pipeline now attaches that ID directly to the projected evidence.

Changes

  • Share SARIF rule indexing between the two readers with identical duplicate-ID and sparse-array behavior. Keep the Snyk reader's sparse-array handling and cover it with a regression test.
  • Share fixture setup and assertions for local import, replay and update. Each adapter still exercises its file format, provenance and evidence. Group equivalent Cloud preview cases while preserving their per-format inputs and assertions.
  • Give individual test checkouts and temporary directories an asynchronous disposer. Tests that own several resources retain their existing cleanup order.

Testing

  • SDK build, plugin bundle build, type checks and formatting passed.
  • Ran all 19 changed test suites with seed 12345. On Linux, 741 passed and the Windows-only case skipped. The results include all eight upstream CLI scan-title cases.
  • In separate runs, 325 tests passed across six provider normalization and repository-import suites. Compared 138 valid, malformed and sparse inputs against the previous implementation for local and Cloud imports, including rule lookup by index. Outputs and thrown error types and messages matched.
  • Checked test-directory and report-fixture cleanup on normal returns and exceptions, including canonical and symlinked temporary paths.

Risk and rollout

The finding ID, exclusion order, and local and Cloud evidence formats are preserved. The cleanup change is confined to the test harness. If the test body and its disposer both fail, the runtime preserves both errors in a SuppressedError.

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T17:59:01.612688Z fb7cf6b PR opened
🔒 Security Review ✅ Completed 2026-10-29T17:59:45.221063Z fb7cf6b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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 for simplifying this. Owner-level merge-safety review: no blocking findings. Finding IDs, duplicate handling, provenance, and local/Cloud evidence remain consistent; cleanup changes are confined to tests. SDK/plugin builds, types, formatting, 286 scanner tests, 570 base/head comparisons, and cleanup checks passed locally with CI-pinned Bun 1.3.14. The full changed-suite run could not pass locally because of sandbox filesystem protections; exact-head CI is green across Linux, macOS, and Windows.

@mldangelo-oai
mldangelo-oai merged commit 49e9368 into main Oct 29, 2026
64 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/simplify-imports-test-setup branch October 29, 2026 20:40
@github-actions github-actions Bot mentioned this pull request Oct 29, 2026
3 tasks done
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