refactor(plugin): split workbench publication helpers - #721
Merged
Merged
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. |
Collaborator
|
@codex security review |
|
Security review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
mldangelo-oai
approved these changes
Aug 28, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keep the authored plugin source compatible with deterministic downstream import checks without changing its CLI or runtime behavior.
Changes
workbench_db.pyintoworkbench_publication.pywhile preserving the existingworkbench_dbentry points.plugin-files.json.Testing
python -m pytest plugins/codex-security/tests/test_workbench_db_exports.py plugins/codex-security/tests/test_windows_report_e2e.py -q— 30 passedpython -m pytest plugins/codex-security/tests/test_workbench_db.py -q -k remediation— 8 passed, 93 deselectedpython -m pytest plugins/codex-security/tests/test_plugin_contract.py -q— 5 passedPYTHONPATH=plugins/codex-security/scripts python -m pytest plugins/codex-security/tests/test_cli_dry_runs.py -q— 3 passednpx -y bun@1.3.14 test --timeout 30000 sdk/typescript/tests-ts/publication-store.test.ts— 25 passedRisk and rollout
Low. This is a source-preserving module split plus formatting. The existing CLI entry points remain in
workbench_db.py, and the new module is included in the shipped plugin payload.Public disclosure review
Change impact
The workbench keeps its existing entry points while publication logic moves into a smaller shipped module.
flowchart LR subgraph column_0["Existing entry points"] direction TB node_0["Publication commands<br/><code>workbench_db</code>"] node_1["Remediation updates<br/><code>workbench_db</code>"] end subgraph column_1["Extracted logic"] direction TB node_2["Publication helpers<br/><code>workbench_publication.py</code>"] node_3["Transition validators<br/><code>workbench_remediation.py</code>"] end subgraph column_2["Runtime outcome"] direction TB node_4["Same runtime results"] node_5["Same remediation rules"] end node_0 -->|"delegates"| node_2 node_2 -->|"returns and ships"| node_4 node_1 -->|"checks"| node_3 node_3 -->|"enforces"| node_5 class node_0 context class node_1 context class node_2 changed class node_3 changed class node_4 affected class node_5 affected classDef changed fill:#d7f5e5,stroke:#237a4b,color:#111 classDef affected fill:#e6f0ff,stroke:#3569a8,color:#111 classDef context fill:#f2f3f5,stroke:#6e7781,color:#111Source evidence (9)
plugins/codex-security/scripts/workbench_db.py:L2433-L2441— workbench_db preserves the inspection and export callables and delegates to the extracted module.plugins/codex-security/scripts/workbench_db.py:L3410-L3417— The existing inspect-linear-publication command still calls the compatibility entry point.plugins/codex-security/scripts/workbench_publication.py:L27-L43— The extracted helpers receive workbench dependencies through WorkbenchPublicationContext.plugins/codex-security/scripts/workbench_publication.py:L380-L400— Export still returns the output path, scan result, and workspace state.plugins/codex-security/scripts/workbench_publication.py:L517-L520— Direct execution now provides the standard argparse help contract.plugins/codex-security/plugin-files.json:L65-L75— plugin-files.json includes workbench_publication.py in the installed runtime payload.plugins/codex-security/scripts/workbench_remediation.py:L56-L90— The remediation module retains the same state-transition and pending-action rules.sdk/typescript/tests-ts/publication-store.test.ts:L204-L238— The SDK test now patches the extracted module directly while checking native SQLite paths.plugins/codex-security/tests/test_cli_dry_runs.py:L21-L25— The source contract runs every Python script with --help and requires usage output.