Skip to content

test(workbench): share setup for workspaces and saved scans - #1400

Merged
mldangelo-oai merged 1 commit into
mainfrom
mdangelo/codex/reuse-native-workspace-command-fixtures
Oct 7, 2026
Merged

mldangelo-oai merged 1 commit into
mainfrom
mdangelo/codex/reuse-native-workspace-command-fixtures

Conversation

@mldangelo-oai

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

Copy link
Copy Markdown
Collaborator

Summary

The workbench saves workspace settings, scan progress, and ownership information. Its tests repeatedly assemble the same commands to create and update that state. Share the command setup so each test's inputs, expected failures, and saved results are easier to see.

Changes

Add helpers for workspace creation/settings, scan startup, ownership claims, progress, cancellation, and saved coverage. Introduce each helper with its first callers while preserving command arguments, environment overrides, and expected-failure handling.

Testing

The recorded Python 3.12 run exercised the real workbench commands through temporary state directories. Cancellation cases rejected another thread's request, preserved the cancellation timestamp on a repeat request, and rejected late progress or completion. Handoff cases attached one continuation thread and rejected a different owner or claim token.

Progress cases reset counts when moving to a new phase and rejected decreasing counts within a phase. Database cases saved and reopened scan results; completed-example checks retained their schema assertions with the shared coverage helper.

To repeat from plugins/codex-security with Python test dependencies installed:

python -m pytest -q --tb=short tests/test_workbench_progress.py tests/test_workbench_cancellation.py tests/test_workbench_handoff.py tests/test_workbench_db.py tests/test_scan_contract_examples.py

Risk and rollout

Depends on #1399's direct Python contract tests. This changes test setup only; production behavior and existing assertions remain unchanged. Later fixture refactors reuse these helpers in separate PRs.

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 7, 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-07T04:44:56.895542Z a997fc1 New commits
🔒 Security Review ✅ Completed 2026-10-07T04:44:30.723595Z a997fc1 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.

@zcrab-oai zcrab-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 the diff and relevant surrounding code at a84c177, with an independent second pass. No obvious correctness or regression issues found. Full local platform suites were not rerun. CI still has failed or unfinished checks; those results remain separate from this source-review approval.

Base automatically changed from mdangelo/codex/run-native-contract-tests-on-platforms to main October 7, 2026 04:37
@github-actions github-actions Bot added the skip-release-notes Omit internal changes from generated release notes label Oct 7, 2026
@mldangelo-oai
mldangelo-oai force-pushed the mdangelo/codex/reuse-native-workspace-command-fixtures branch from a84c177 to a997fc1 Compare October 7, 2026 04:42

@zcrab-oai zcrab-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 the diff and relevant surrounding code at a997fc1, with an independent second pass. No obvious correctness or regression issues found. Full local platform suites were not rerun. CI still has failed, canceled, or unfinished checks; those results remain separate from this source-review approval.

@mldangelo-oai
mldangelo-oai merged commit 508c820 into main Oct 7, 2026
67 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/reuse-native-workspace-command-fixtures branch October 7, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release-notes Omit internal changes from generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants