Repository navigation
test(vscode): accept submenu entries in the menu command-id check - #8296
Conversation
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
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
The Generated by Claude Code |
There was a problem hiding this comment.
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.submenucorrectly excludes submenu-only entries from command-id check, and the parallel submenu-existence loop assertsentry.submenuresolves 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
submenuset and still all pass ifcontributedSubmenusis empty. - Confirm the filter
!entry.submenuis the correct discrimination predicate: it excludes only the newripr.editorContextsubmenu 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
contributedSubmenusis built frommanifest.contributes?.submenus ?? []and could be empty.; refuted because: If submenus is missing, the Set is empty and anyentry.submenuvalue fails thehascheck; 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.
|
Re-ran the failed 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
|
Generated by Claude Code |
|
Generated by Claude Code |
|
In-session results on ca61189 (the hosted CI here only ran because I added
Generated by Claude Code |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Generated by Claude Code |
Requested by Steven · project thread
Before: main CI's
vscodejob has failed intest:e2esince #8280 (runs 17271 and 17277):Command Menus Manifest › every menu and keybinding command id is a contributed commandfails withreferences unregistered command undefined.After: that check skips the
editor/contextsubmenu entry (which has nocommand) and instead asserts the entry names a contributed submenu. The test passes.The test collected
entry.commandfrom everyeditor/contextentry, but #8280 added a{ submenu: "ripr.editorContext" }entry, so it readundefined. The product manifest is correct; only the test was stale. The hostedvscodejob is skipped on ordinary PRs withoutfull-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 thefull-cilabel to run the hosted vscode job.Generated by Claude Code