Repository navigation
feat(vsix): correlate views and custom editors, and list settings - #14979
akshad-exe wants to merge 30 commits into
Conversation
Record vscode callee facts in the JavaScript semantic graph, keep every declared command with its menus and keybindings, and add correlate_vsix_commands to report registered, missing, undetermined and undeclared commands from package and application Evidence. Refs morluto#3687 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Keep declared AI contributions in the VSIX report and join them with literal vscode chat and language model registrations. Refs morluto#3687 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Join declared views and custom editors with their provider registrations and keep declared configuration properties in the VSIX report. Refs morluto#3687 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
[Medium impact] The changes affect VSIX package reports and JavaScript application graphs used by the new correlation workflow. The PR needs fixes before merging because replaced functions can still be reported as registered. FindingsFix with agent prompt### Issue 1
src/domain/javascript/javascriptSemanticObjects.ts:508-513
A write such as `(0, require("vscode").commands).registerCommand = noop` now loses its `requireOrigin`. `expressionObjectIdentity` stops at the comma expression, and `requireRootOrigin` rejects the member expression it unwraps to. A later `require("vscode").commands.registerCommand("a", f)` is then reported as `registered` instead of `undetermined`.
Preserve the full write path in the producer's single walk, including pure comma expressions. The repository requires identity and uncertainty to survive across boundaries.
### Issue 2
src/domain/javascript/javascriptSemanticModuleCallee.ts:154-157
Writes through a wrapped import are recorded only under that binding, but the newly supported direct `require` call checks the module name. For example, `const v = __toESM(require("vscode")); v.commands.registerCommand = noop; require("vscode").commands.registerCommand("a", f);` produces a registration without `replacement: "possible"`. The join reports `registered` even though the function was replaced.
Share the wrapped import's possible module identity with the write index. The repository requires uncertainty to survive across these boundaries.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds static matching between VSIX declarations and JavaScript registration calls.
Checks were source-only; no tests were run. Whether this PR has been superseded could not be checked because GitHub access was unavailable. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
P[VSIX package] --> D[Declared IDs and settings]
J[JavaScript sources] --> C[Call facts and possible writes]
D --> M[Match declarations to calls]
C --> M
G[Coverage and unknowns] --> M
M --> E[Complete Evidence]
E --> S[Retained summary]
Reviews (7) · Last reviewed commit: "merge: take the VS Code correlation fixe..." · Reviewed by Greptile |
…larations unknown Reject value ambiguity as a vscode callee, record which callee facts a graph carries, treat skipped sources as unanalyzed, report unmatched registrations as undetermined when declarations are incomplete, retain each menu name once, and count statuses in one pass. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
…ions # Conflicts: # docs/guides/managed/vsix-package.md # src/domain/vsix/vsixRegistrationCorrelation.test.ts # src/domain/vsix/vsixRegistrationCorrelation.ts
…registrations # Conflicts: # docs/guides/managed/vsix-package.md # src/domain/vsix/vsixRegistrationCorrelation.test.ts
A selection whose branches name one module through require no longer reports a non-module alternative. Refs morluto#3687 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…acts A call omitted by a resource limit leaves its entry undetermined. A member written in the file, or a default member written on a require, is not resolved as the VS Code API. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
…larations unknown Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
…d menus unknown Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
… facts unknown Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
…sfer Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Source order does not establish whether a write to a vscode member ran before a call, so a written member now marks its calls as possibly replaced instead of dropping or keeping them by position. Menus and keybindings with unreadable rows are unknown. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
A registration built at run time may be any declared command, and a menu or keybinding field that is not text cannot be read. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Unresolved or possibly replaced registrations leave a contribution undetermined, unreadable declaration rows are unknown, computed writes mark a member as possibly replaced, and an oversized module callee is omitted with a resource-limit unknown. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
A binding that may hold something other than vscode keeps its call as a possible identity instead of dropping it. Computed writes mark members as possibly replaced, member lookups walk each path once, and an oversized module callee is omitted with a resource-limit unknown. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
| ...((bindingId !== null && written(bindingId, path)) || | ||
| written(origin.specifier, member) | ||
| ? POSSIBLE | ||
| : {}), |
There was a problem hiding this comment.
Replaced functions look registered
Writes through a wrapped import are recorded only under that binding, but the newly supported direct require call checks the module name. For example, const v = __toESM(require("vscode")); v.commands.registerCommand = noop; require("vscode").commands.registerCommand("a", f); produces a registration without replacement: "possible". The join reports registered even though the function was replaced.
Share the wrapped import's possible module identity with the write index. The repository requires uncertainty to survive across these boundaries.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/domain/javascript/javascriptSemanticModuleCallee.ts
Line: 154-157
Comment:
**Replaced functions look registered**
Writes through a wrapped import are recorded only under that binding, but the newly supported direct `require` call checks the module name. For example, `const v = __toESM(require("vscode")); v.commands.registerCommand = noop; require("vscode").commands.registerCommand("a", f);` produces a registration without `replacement: "possible"`. The join reports `registered` even though the function was replaced.
Share the wrapped import's possible module identity with the write index. The repository requires uncertainty to survive across these boundaries.
**Context Used:** AGENTS.md ([source](https://github.com/morluto/rea/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A5mgB1jLBG3CL4gxqa8xm8
| const { node } = unwrapJavaScriptExpression( | ||
| unwrapPureSemanticSequenceExpression(root, state), | ||
| ); | ||
| return t.isCallExpression(node) | ||
| ? readSemanticRequireOriginCandidate(node, state)?.origin | ||
| : undefined; |
There was a problem hiding this comment.
Replaced functions look registered
A write such as (0, require("vscode").commands).registerCommand = noop now loses its requireOrigin. expressionObjectIdentity stops at the comma expression, and requireRootOrigin rejects the member expression it unwraps to. A later require("vscode").commands.registerCommand("a", f) is then reported as registered instead of undetermined.
Preserve the full write path in the producer's single walk, including pure comma expressions. The repository requires identity and uncertainty to survive across boundaries.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/domain/javascript/javascriptSemanticObjects.ts
Line: 508-513
Comment:
**Replaced functions look registered**
A write such as `(0, require("vscode").commands).registerCommand = noop` now loses its `requireOrigin`. `expressionObjectIdentity` stops at the comma expression, and `requireRootOrigin` rejects the member expression it unwraps to. A later `require("vscode").commands.registerCommand("a", f)` is then reported as `registered` instead of `undetermined`.
Preserve the full write path in the producer's single walk, including pure comma expressions. The repository requires identity and uncertainty to survive across boundaries.
**Context Used:** AGENTS.md ([source](https://github.com/morluto/rea/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Extends
correlate_vsix_registrationsto views and custom editors, and lists declared settings.Refs #3687. Third part.
Depends on #14978. This branch contains the earlier commits, so review and merge those first. Only this part.
Change and scope
callee_fact_modules, or incompletely read declarations giveundetermined. Menus are grouped by name.contributes.declarationsaddsviews.*[].idandcustomEditors[].viewType;contributes.settingslists configuration properties with their types.registerTreeDataProvider,createTreeView,registerWebviewViewProviderandregisterCustomEditorProvidercalls.Evidence
Published extensions from Open VSX, analyzed without execution:
No tested extension exercised custom editors; they are covered by unit tests only.
Validation
check:fast,format:check,docs:check: passed65549484c); after the later branch-selection fix (93ea3adcb),check:fastand targeted tests passedAuthor readiness