Skip to content

refactor(plugin): simplify workbench owner calls - #1205

Merged
mldangelo-oai merged 1 commit into
mainfrom
refactor/pr1185-followup-06-python
Oct 3, 2026
Merged

mldangelo-oai merged 1 commit into
mainfrom
refactor/pr1185-followup-06-python

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Python workbench carries forwarding functions and repeated data handling around existing owners. Call those owners directly and consolidate equivalent operations.

Changes

  • Retain database, saved-result, validation and Windows stream behavior at their current owners.
  • Update Python and SDK probe consumers together, including explicit dependency configuration for synthetic Deep Scan overrides.
  • Keep finalization and recovery assertions with the changed call sites.

Testing

On rebased head 4f70ecc3, 699 tests and 110 subtests passed, with two skips, across 12 Python regression modules covering finalization, saved exports, completion binding, standard/deep results, and threat-model projection. Ruff check/format, SDK CI compilation, portable plugin source checks and tests, and MCP types passed. The rebase preserves all seven new threat-model helper implementations.

Earlier combined-source validation passed the full Python suite (1,520 tests and 109 subtests, six skips) and seven SDK workbench owners (59 tests, one platform skip). Those complete suites were not rerun on this rebased head. Fresh hosted checks are pending.

Risk and rollout

The removal includes current caller closure. Synthetic probes must configure the provider they override; production initialization continues to configure Deep Scan before dispatch.

This patch has no source prerequisite within the series. Squash-merge it into main after review and checks pass.

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 3, 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-03T20:52:03.988663Z 4f70ecc Manual request
🔒 Security Review ✅ Completed 2026-10-03T20:52:08.796494Z 4f70ecc New commits
ℹ️ 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.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review the current head 410e85b.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The refactor preserves existing behavior, updates affected probes and tests, and introduces no identified blocking issues.

Review effort: Balanced
Findings: None

What changed in this PR

Simplifies Python workbench ownership by removing forwarding functions, consolidating equivalent helpers, and updating dependent tests and SDK probes.

Changes:

  • Calls database, validation, Deep Scan, and filesystem owners directly.
  • Consolidates repeated test fixtures and collection logic.
  • Updates probes for explicit Deep Scan dependency configuration.
File Description
sdk/​typescript/​tests-ts/​workbench-canonical-paths.test.ts Configures synthetic Deep Scan dependencies.
sdk/​typescript/​tests-ts/​support/​workbench-command.ts Adds a shared workbench test command.
sdk/​typescript/​tests-ts/​deep-scan-workbench.test.ts Uses shared command and explicit configuration.
sdk/​typescript/​tests-ts/​deep-scan-timestamp-compat.test.ts Configures timestamp probe dependencies.
plugins/​codex-security/​tests/​workbench_test_support.py Adds shared loaders and fixtures.
plugins/​codex-security/​tests/​test_workbench_timestamps.py Overrides the dependency owner directly.
plugins/​codex-security/​tests/​test_workbench_db_exports.py Calls saved-result ownership directly.
plugins/​codex-security/​tests/​test_windows_scope_streams.py Patches the stream-check owner.
plugins/​codex-security/​tests/​test_windows_scan_local_files.py Uses the shared script loader.
plugins/​codex-security/​tests/​test_windows_report_e2e.py Uses the shared Windows backend fixture.
plugins/​codex-security/​tests/​test_validate_tracking_source.py Shares scan fixtures and standard hashing.
plugins/​codex-security/​tests/​test_validate_scan_contract.py Shares validator fixtures and hashing.
plugins/​codex-security/​tests/​test_sarif_projection.py Uses the shared script loader.
plugins/​codex-security/​tests/​test_report_projection.py Removes duplicate loading logic.
plugins/​codex-security/​tests/​test_finalize_scan_contract.py Reuses shared fixtures and backend behavior.
plugins/​codex-security/​tests/​test_capability_profiles.py Consolidates fallback tests.
plugins/​codex-security/​scripts/​workbench_validation.py Delegates validation to existing owners.
plugins/​codex-security/​scripts/​workbench_target.py Removes unused forwarding helpers.
plugins/​codex-security/​scripts/​workbench_target_state.py Simplifies standalone argument handling.
plugins/​codex-security/​scripts/​workbench_source_excerpt.py Simplifies standalone argument handling.
plugins/​codex-security/​scripts/​workbench_schema.py Simplifies standalone argument handling.
plugins/​codex-security/​scripts/​workbench_scan_usage.py Consolidates counting and deduplication.
plugins/​codex-security/​scripts/​workbench_scan_start.py Calls text normalization directly.
plugins/​codex-security/​scripts/​workbench_remediation.py Simplifies standalone argument handling.
plugins/​codex-security/​scripts/​workbench_progress.py Inlines UTF-16 length calculation.
plugins/​codex-security/​scripts/​workbench_native_indexes.py Uses Counter for scan totals.
plugins/​codex-security/​scripts/​workbench_db.py Removes wrappers and calls owners directly.
plugins/​codex-security/​scripts/​workbench_constants.py Owns shared positive-integer parsing.
plugins/​codex-security/​scripts/​workbench_cli.py Imports shared integer parsing.
plugins/​codex-security/​scripts/​windows_scan_local_files.py Simplifies standalone argument handling.
plugins/​codex-security/​scripts/​report_projection.py Removes redundant projection wrappers.
plugins/​codex-security/​scripts/​rank_preview.py Uses insertion-ordered dictionaries for uniqueness.
plugins/​codex-security/​scripts/​generate_rank_input.py Consolidates validation and assignment handling.
plugins/​codex-security/​scripts/​finalize_scan_contract.py Removes hashing and validation forwarders.
plugins/​codex-security/​scripts/​filesystem_identity.py Simplifies standalone argument handling.
plugins/​codex-security/​scripts/​deep_scan_workbench.py Calls configured dependencies directly.
plugins/​codex-security/​scripts/​config_preflight.py Reuses shared integer parsing.
plugins/​codex-security/​mcp-app/​src/​python_command.ts Simplifies executable stat checking.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 410e85b0e9

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The Python workbench carries forwarding functions and repeated data handling around existing owners. Call those owners directly and consolidate equivalent operations.

@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.

Reviewed 410e85b0e97b5c27ea931aa343653e786654eb07 against its own base 3642a76a53173e012f579737d1b6cf4096379af2 with exactly three independent high-reasoning full-diff reviews, including every test diff, plus root verification. No serious introduced code defect identified.

51 focused SDK tests passed (2 skipped); 336 Python tests and 66 subtests passed (2 skipped). Fresh native host build, plugin/SDK builds, types, formatting, Ruff and portable checks passed. An optional pytest-plugin cleanup callback emitted a sandbox process-list denial after the successful test run.

Local validation was on macOS arm64. No model execution, local Windows run or full installed-package smoke. Reviewed sources remained unchanged. This review covers this exact head; it does not establish combined-stack validation against current main.

GitHub currently reports a merge conflict against the updated base branch. Any changed patch from conflict resolution needs a new review.

@mldangelo-oai
mldangelo-oai force-pushed the refactor/pr1185-followup-06-python branch from 410e85b to 4f70ecc Compare October 3, 2026 20:48
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review the current head 4f70ecc.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The refactoring preserves existing behavior while removing redundant delegation and updating affected probes consistently.

Review effort: Balanced
Findings: None

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 4f70ecc3cb

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@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.

Approved reviewed head 4f70ecc3cbaf6f002363f11eed4f526dfbcdc801 against 775e48ffbf682075e60303eb019131aa2390c3b2.

All 38 files have the same ordered added/removed PR contributions as the previously approved head. I retained the three independent full-diff reviews, including every test diff, and separately inspected the six inherited touched-file changes from #1133. No serious introduced findings remain.

Fresh validation at this head passed: 51 SDK tests with 2 skipped; 352 Python tests plus 66 passing subtests with 2 skipped; 9 portable source tests; native host, plugin and SDK builds; types, formatting, Ruff 0.16.9 and source compatibility. All 38 reviewed source files still match the head. Python logged sandbox permission diagnostics but exited successfully. Local macOS arm64 only; no model execution, source edits, installed-package smoke or local Windows run.

Hosted node-ci37152833472 attempt1 is still running. This approval covers the reviewed source; it does not assert completed CI or merge readiness.

@mldangelo-oai
mldangelo-oai merged commit 37cd0ed into main Oct 3, 2026
70 of 86 checks passed
@mldangelo-oai
mldangelo-oai deleted the refactor/pr1185-followup-06-python branch October 3, 2026 22:06
@github-actions github-actions Bot mentioned this pull request Oct 3, 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.

4 participants