Skip to content

test(vscode): accept submenu entries in the menu command-id check - #8296

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/project-thread-ewfcb8
Oct 17, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/project-thread-ewfcb8

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Before: main CI's vscode job has failed in test:e2e since #8280 (runs 17271 and 17277): Command Menus Manifest › every menu and keybinding command id is a contributed command fails with references unregistered command undefined.

After: that check skips the editor/context submenu entry (which has no command) and instead asserts the entry names a contributed submenu. The test passes.

The test collected entry.command from every editor/context entry, but #8280 added a { submenu: "ripr.editorContext" } entry, so it read undefined. The product manifest is correct; only the test was stale. The hosted vscode job is skipped on ordinary PRs without full-ci, which is why #8280 merged without seeing it.

How: edited editors/vscode/test/suite/command_menus_manifest.test.ts. Reproduced the failure on main with mocha (1 failing), and with the change all 7 pass. Needs the full-ci label to run the hosted vscode job.


Generated by Claude Code

The editor/context menu now holds a submenu entry that carries no command,
so the every-command-is-contributed check failed on undefined. Skip submenu
entries there and assert they name a contributed submenu instead.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vdTiS1fD3kG5zhUNFnr3j
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven added the full-ci Run required, advisory, and release-like CI lanes. label Oct 17, 2026 — with Claude
@EffortlessSteven EffortlessSteven self-assigned this Oct 17, 2026
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 2ef371cd-a69e-462e-bfa1-51f6dc69999c
📥 Commits

Reviewing files that changed from the base of the PR and between 60a22c6 and ca61189.

📒 Files selected for processing: 2
  • editors/vscode/test/suite/command_menus_manifest.test.ts
  • xtask/tests/common/ripr_help.rs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Summary by CodeRabbit

  • Tests
    • Improved checks for editor menu contributions, including verification that referenced submenus are available.
    • Reduced the chance of temporary test workspace name collisions during concurrent test runs.

Walkthrough

The VS Code manifest test now validates command IDs and submenu references separately. The test scratch-directory helper adds a process-wide atomic sequence number to generated directory names.

Changes

VS Code Manifest Checks

Layer / File(s) Summary
Validate commands and submenus
editors/vscode/test/suite/command_menus_manifest.test.ts
The test excludes submenu entries from command-ID checks and verifies that each referenced submenu is contributed.

Scratch Directory Uniqueness

Layer / File(s) Summary
Add a sequence to scratch names
xtask/tests/common/ripr_help.rs
The scratch helper adds an incrementing process-wide atomic sequence number to each scratch-directory name.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to ca611

The change lets the VS Code manifest check accept valid submenu entries while still checking their contributions, and gives concurrent test workspaces distinct names. No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the problem, cause, implementation, and reported test results, but it does not follow the repository template. It omits required sections such as Summary, Source Boundary, Sco… Rewrite the description using the repository template. Complete the required sections, mark applicable checkboxes, record source-of-truth links and scope, document proof and unresolved CI results, state claim boundaries and rollback steps, …
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: updating the VS Code command-menu test to accept submenu entries.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, cause, implementation, and reported test results, but it does not follow the repository template. It omits required sections such as Summary, Source Boundary, Scope, Proof, Claim Boundary, Rollback, Engineering Check, and Gates.

Resolution

Rewrite the description using the repository template. Complete the required sections, mark applicable checkboxes, record source-of-truth links and scope, document proof and unresolved CI results, state claim boundaries and rollback steps, and use n/a for the CI Economics fields if they do not apply.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the menu entries,
Then counts each scratch path as it grows.
Commands and submenus find their checks,
New names avoid the same old rows.
The rabbit hops through tests and goes.

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Member Author

The vscode job now gets past the manifest test (381 passing in the first host run, so the original failure is fixed). It then fails in a second host run: Real multi-root server acceptance › ambiguity → A → B → active-root removal with code actions … failed: Canceled in phase select root A. That suite was not reachable on main while the manifest test failed first, and it passed on main run 17266 (cb8ef72). The cancellation names VS Code chat/SCM editors, which looks environmental rather than caused by this test-only diff, but I haven't established that yet. The run is still in progress so I can't re-run it; I'll re-run the failed job once when it completes and report back if it fails again.


Generated by Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Decision

  • Needs reviewer attention before upstream: findings remain.

Confirmed findings

  • Hosted vscode job is the only runner that exercises this suite on PRs without 'full-ci' label (per PR body); trust hinges on that CI gate, locally reproduced only with mocha. Acceptable but worth flagging.

Verification questions

  • Confirm submenu correctness branch is only asserted for editor/context; other menus (ripr.editorContext, future menus) still skip submenu validation.
  • Confirm contributedSubmenus set is keyed by entry.id; PR body does not confirm manifest contributes.submenus is populated in editors/vscode/package.json, so the new assert could be tautological if no submenu is contributed.
  • Confirm filter on !entry.submenu correctly excludes submenu-only entries from command-id check, and the parallel submenu-existence loop asserts entry.submenu resolves to a contributed submenu id.
  • Confirm negative path missing: test does not assert that a submenu entry WITHOUT a contributed submenu target is rejected. Two entries can both have submenu set and still all pass if contributedSubmenus is empty.
  • Confirm the filter !entry.submenu is the correct discrimination predicate: it excludes only the new ripr.editorContext submenu entry while preserving all real command entries for registration checks.
  • Confirm trust-affecting late.

Refuted

  • The new submenu-assertion loop is tautological when no submenu entries exist in editor/context, since the for-loop body never runs.; refuted because: Loop still meaningfully executed on real package.json (which contains the #8280-added submenu entry); non-tautological on the actual fixture. Race with empty inputs is theoretical.
  • The new submenu-registration block could pass vacuously because contributedSubmenus is built from manifest.contributes?.submenus ?? [] and could be empty.; refuted because: If submenus is missing, the Set is empty and any entry.submenu value fails the has check; the assertion is strictly stricter than the old command-id check, not weaker.

Test proof

  • Focused HEAD proof failed (exit 101): cargo test --locked --package vscode --test command_menus_manifest. This is a current failure, not a red/green witness.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Copy link
Copy Markdown
Member Author

Re-ran the failed vscode job once (multi-root "Canceled" failure). On the automated review: its two "tautological" concerns were refuted by the review itself, and the failed "focused proof" ran cargo test --package vscode, which isn't how this suite runs (it's a mocha/VS Code host suite, which passed 381 tests in the first host run). The real manifest has the ripr.editorContext submenu contributed, so the new assertion is exercised.


Generated by Claude Code

Two tests in one process could read the same clock tick and create the
same scratch directory name, failing with AlreadyExists in rust-coverage.
Add a process-wide sequence number to the name.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vdTiS1fD3kG5zhUNFnr3j

Copy link
Copy Markdown
Member Author

rust-coverage failed on 633ba38 in ripr_public_guide_contract with create exclusive scratch root … File exists, unrelated to the vscode test diff. Cause: Scratch::new in xtask/tests/common/ripr_help.rs named its directory from pid + nanosecond clock only, so two concurrent tests in one process can collide. Pushed ca61189 adding a process-wide sequence number to the name. The vscode re-run from the earlier comment is also still outstanding.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

rust-coverage on ca61189: every test passed (the scratch-dir collision is gone), then coverage failed at llvm-profdata merge with invalid instrumentation profile data (file header is corrupt) on two .profraw files. That is the corrupt-profile recurrence tracked in #4978, a producer problem unrelated to this test-only diff. Re-ran the failed job once.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

In-session results on ca61189 (the hosted CI here only ran because I added full-ci to a draft; I'll follow the merge-ready flow from now on):

  • command_menus_manifest.test.js under mocha: 7 passing (fails 1/7 on main without the change).
  • cargo test -p xtask --test ripr_public_guide_contract: 19 passed.
  • cargo xtask precommit: re-running now; I'll add the merge-ready label once it passes.

Generated by Claude Code

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 03:12
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven
EffortlessSteven enabled auto-merge (squash) October 17, 2026 03:12

Copy link
Copy Markdown
Member Author

rust-coverage (run 38997913289, triggered by the ready-for-review/label events) hit the same corrupt-.profraw merge error as before (#4978) after all tests passed. The same commit ca61189 passed rust-coverage in run 38993136188, so this isn't from the diff. Re-running this run's failed job. The truncated profile is plausibly left by the process-tree-kill tests (timeout_reaps_primary_and_terminates_descendant) killing instrumented children mid-write; I'll note that on #4978 rather than widen this PR.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Run required, advisory, and release-like CI lanes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants