Skip to content

🤖 tests: lint scripts tests and vscode/src; fix their findings - #7586

Merged
ThomasK33 merged 5 commits into
mainfrom
test-audit/p3-2-lint-scope
Oct 26, 2026
Merged

ThomasK33 merged 5 commits into
mainfrom
test-audit/p3-2-lint-scope

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

ESLint and oxlint now lint scripts/**/*.test.ts (47 files) and vscode/src/** (33 files), and this PR fixes the 163 findings there, including the 13 as any in vscode/src/webview/createVscodeOrpcLink.test.ts.

Background

The 2026-10-26 audit found that neither tree was in LINT_FILE_PATTERNS (scripts/lib/lint_targets.js), so no lint rule reached them, including the mock-restore rule. Both trees are already type-checked through tsconfig.tooling.json.

Implementation

  1. eslint.config.mjs: one block for both trees that lints against tsconfig.tooling.json (the project service would pick tsconfig.json, which does not include them), with the same base rules and no-unused-vars options as tests/. Two smaller blocks: the React hook rules for vscode/src/**/*.tsx, and the tests/ relaxations (require-await, no-empty-function off) for test files only.
  2. .oxlintrc.json mirrors those three blocks. make check-oxlint-config passes.
  3. scripts/lint.sh ESLINT_PATTERNS, LINT_FILE_PATTERNS and the oxlint roots (scripts, vscode/src) include the two trees.
  4. Fixes: eslint --fix for the stylistic rules, then real types where possible (getLastSent returns the typed message, JSON.parse results use DryReport/MutateReport, a declared acquireVsCodeApi replaces a @ts-ignore). Inline disables carry a reason: await-thenable for bun:test expect().rejects (the header 7 src tests already use), no-control-regex in 4 output-sanitizing assertions, and 4 single sites (AsyncIterator.return(), a last-resort String(data), an empty-trace-id ||, and the vscode module mock, which has no real module to restore under bun).
  5. Production behavior in vscode/src is unchanged. extension.ts keeps the empty-string-clears-selection rule explicitly, and App.tsx only moves a comment so no comment sits between two case labels.

Validation

  • Type-aware ESLint on both trees: 0 problems. make lint-full (every file): passes.
  • make typecheck, bun test ./vscode/src/ (163 pass, 1 skip) and bun test ./scripts/ (563 pass) pass.

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T13:22:50.394386Z 917f80e Manual request
🔒 Security Review ✅ Completed 2026-10-26T14:47:35.358083Z 917f80e Manual request
ℹ️ 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.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: ac6dff19a1

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac6dff19a1

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

Comment thread scripts/lib/lint_targets.js
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

22 agent steps · 7 replayed from cache · 15 model calls · 45.8k tokens (28% cached)
Spend: $0.08 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 1 step · 1 call 6.0s
🟢 a chat survives a restart of the server 1 step · 1 call 6.0s
🟢 compaction.e2e.ts · 1 passed 1 step · 1 call 4.4s
🟢 /compact replaces the old chat with a summary 1 step · 1 call 4.4s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 10.4s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 10.4s
🟢 settingsRoundTrip.e2e.ts · 1 passed 2 steps · 1 call 9.3s
🟢 a chat survives trips through Settings 2 steps · 1 call 9.3s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 4.5s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 4.5s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 3.5s
🟢 the agent opens the playground workspace 2 steps · 1 call 3.5s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 7.1s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 7.1s
🟢 todoNudge.e2e.ts · 1 passed 1 step · 1 call 2.9s
🟢 the agent finishes open TODO items after the turn-end nudge 1 step · 1 call 2.9s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 24.4s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 4.2s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 4.2s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 5.4s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.4s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 3.4s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 3.8s

e2e 0.20.0 · 1m 16s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 7.9k tokens (33% cached)
Spend: $0.01 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 6.7s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 6.7s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 7.6s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 7.6s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 6.4s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 6.4s

e2e 0.20.0 · 23.3s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $0.00 of the $1.00 cap (proxy ledger)

e2e 0.20.0 · 6.9s · 2 targets (web, phone) · run artifacts

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: a56b8350a0

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: a56b8350a0

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

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: fccb6408a6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fccb6408a6

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

Comment thread scripts/lib/lint_targets.js
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 917f80e370

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

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 917f80e370

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit b5cd9c6 Oct 26, 2026
107 of 112 checks passed
@ThomasK33
ThomasK33 deleted the test-audit/p3-2-lint-scope branch October 26, 2026 16:49
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.

1 participant