Skip to content

test(sdk): reuse API and session fixtures - #1229

Merged
mldangelo-oai merged 24 commits into
mainfrom
mdangelo/codex/simplify-02-sdk-fixtures
Oct 5, 2026
Merged

mldangelo-oai merged 24 commits into
mainfrom
mdangelo/codex/simplify-02-sdk-fixtures

Conversation

@mldangelo-oai

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

Copy link
Copy Markdown
Collaborator

Summary

Share repeated API, session, cost and dashboard fixtures while preserving each test's assertions. Import persistence tests reuse their selected Python executable so unrelated interpreter discovery does not interrupt import and reimport coverage on Windows.

Changes

  • Reuse API runtime dependencies, named session options, worker-session setup and dashboard defaults.
  • Share import dependencies while retaining real Python workbench execution, filesystem checks, saved-scan assertions and per-test overrides.

Testing

Validated with Node 22.13.0 and Bun 1.3.14:

  • Focused API, post-scan, cost, dashboard and import tests: 324 passed, 4 platform-specific skips, zero failures.
  • pnpm run types, pnpm run format, pnpm run build:ci, and pnpm run build:plugin passed.
  • Two independent native review passes and separate verification reported no actionable findings.

Cross-platform validation runs in hosted CI.

Risk and rollout

Test-only change; production code and public CLI behavior are unchanged. Interpreter discovery remains covered by runtime tests, and import tests continue exercising real persistence and reimport behavior.

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.

codex and others added 19 commits October 3, 2026 19:14
Repository fixtures and hydration tools duplicate Git process setup. Share the existing invocation patterns with their actual consumers.
SDK entrypoints and tests repeat runtime, authentication and option setup. Share the setup at existing owners and introduce internal helpers with their first consumers.
Progress, activity and cost paths repeat scalar and JSON parsing. Reuse internal helpers and simplify presentation without changing the rendered diagnostics or cost arithmetic.
# Conflicts:
#	sdk/typescript/src/security-policy.ts
#	sdk/typescript/tests-ts/api-policy.test.ts
#	sdk/typescript/tests-ts/api-post-scan.test.ts
#	sdk/typescript/tests-ts/component-scan.test.ts
#	sdk/typescript/tests-ts/security-policy.test.ts
# Conflicts:
#	sdk/typescript/tests-ts/support/shell.ts
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review the current head SHA.

@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 4, 2026 20:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 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-05T07:35:17.089396Z 6bec53f New commits
🔒 Security Review ✅ Completed 2026-10-05T07:36:25.054147Z 6bec53f 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.

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 test-only refactoring preserves fixture values, overrides, isolation, and existing assertions.

Review effort: Balanced
Findings: None

What changed in this PR

Consolidates repeated SDK test setup into shared fixtures, building on #1209 without changing test behavior.

Changes:

  • Shares runtime dependency and session-writing fixtures.
  • Reuses worker-session and dashboard setup.
  • Removes redundant test-client environment overrides.
File Description
sdk/​typescript/​tests-ts/​support/​usage-rollout.ts Adds shared session fixtures.
sdk/​typescript/​tests-ts/​support/​api-events.ts Adds shared runtime dependencies.
sdk/​typescript/​tests-ts/​scan-dashboard.test.ts Reuses dashboard setup.
sdk/​typescript/​tests-ts/​cost.test.ts Reuses session fixtures.
sdk/​typescript/​tests-ts/​api.test.ts Reuses runtime and usage fixtures.
sdk/​typescript/​tests-ts/​api-post-scan.test.ts Removes a redundant environment override.

💡 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. Another round soon, please!

Reviewed commit: 3b140c3145

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

Reviewed the expanded actual PR diff at 3b140c31451e8b9d4638be658aae39c91a475105, with base b96739d5ba184bc745f7ce97605781f97eaf0a66 and merge base 634532d7f7fb21ccca49b4bca9bb9fa1df9308d6, in three fresh independent HIGH full-diff passes plus root synthesis. All 20 changed paths and 10 test/helper paths were included. No actionable introduced issue was established.

The current three-dot diff includes earlier production refactors already present in the base; those were reviewed without attributing them as new own-base changes. Shared API and usage fixtures were checked statically. Unchanged imported helpers, callers, runtime compatibility and TestClient environment defaults were outside the touched-file scope.

This updates the review scope after the base changed and preserves the original approval submission. Tests, builds and product models were not run. Source approval does not establish CI readiness, whole-stack integration or deployment.

Base automatically changed from refactor/pr1185-followup-09-progress to main October 4, 2026 21:54
@github-actions github-actions Bot added the skip-release-notes Omit internal changes from generated release notes label Oct 4, 2026
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review the current head e6589d7.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: e6589d7234

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

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 test-only fixture consolidation preserves existing variants and introduces no unresolved issues.

Review effort: Balanced
Findings: None

@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 the actual PR contribution at e6589d72346fe7cca8d5bd8f06f1c50fe10fb006 against explicit base b96739d5ba184bc745f7ce97605781f97eaf0a66. The actual GitHub diff, ordered three-dot and own-base changes, and all 24 touched-file and instruction snapshots match the originally reviewed contribution exactly. The original three independent HIGH full-diff reports remain applicable, including all six changed test/helper paths and 1,468 diff lines. No repeat source pass was needed, and no supported introduced issue was identified.

The intermediate expanded contribution remains recorded with its separate three-pass review at the prior head and base. This approval covers the current reconciled test-helper and fixture contribution. Unchanged imports, callers and test-client defaults were outside the reviewed scope; runtime behavior was not independently verified.

Tests, builds and product models were not run locally. Source approval does not establish CI readiness, whole-stack integration or deployment.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head 62512244b68f3702170872d7690f4ca45c128827, including the latest main integration and follow-up fixes.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 62512244b6

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

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 test-only refactor preserves fixture values, optional-field semantics, and per-test overrides without introducing unresolved issues.

Review effort: Balanced
Findings: None

@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 the actual PR contribution at 62512244b68f3702170872d7690f4ca45c128827 against 89aae242136312467790947f3b122ca3f607614f in exactly three fresh independent HIGH full-diff passes plus root synthesis. All six changed test/helper paths and all 1,800 diff lines were included. No actionable introduced issue was established.

The shared runtime dependencies, session metadata options, worker fixtures and dashboard defaults were reviewed statically. Unchanged imports and TestClient defaults remain outside the touched-file scope.

Tests, builds and product models were not run. Source approval does not establish CI readiness, whole-stack integration or deployment.

@mldangelo-oai
mldangelo-oai merged commit 0462b85 into main Oct 5, 2026
60 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/simplify-02-sdk-fixtures branch October 5, 2026 07:51
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.

4 participants