Skip to content

feat(vsix): correlate views and custom editors, and list settings - #14979

Draft
akshad-exe wants to merge 30 commits into
morluto:mainfrom
akshad-exe:feat/vsix-view-editor-registrations
Draft

akshad-exe wants to merge 30 commits into
morluto:mainfrom
akshad-exe:feat/vsix-view-editor-registrations

Conversation

@akshad-exe

@akshad-exe akshad-exe commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extends correlate_vsix_registrations to 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

  • Absence is reported only for complete coverage: skipped or unparsed sources, graphs without callee_fact_modules, or incompletely read declarations give undetermined. Menus are grouped by name.
  • contributes.declarations adds views.*[].id and customEditors[].viewType; contributes.settings lists configuration properties with their types.
  • Joined with literal registerTreeDataProvider, createTreeView, registerWebviewViewProvider and registerCustomEditorProvider calls.
  • Not included: reads of settings in code, languages, debuggers and other contribution points.

Evidence

Published extensions from Open VSX, analyzed without execution:

Extension Settings Declared views
promptx-chat-participant 0.14.3 9 4 registered
flowrelay 1.11.0 1 4 registered
agent-kanban-vscode 0.6.1 2 1 undetermined (analysis truncated; its source passes a class constant as the ID)
shiny 1.5.1 13 none in this report

No tested extension exercised custom editors; they are covered by unit tests only.

Validation

  • check:fast, format:check, docs:check: passed
  • 140 selected test files, 4339 tests: passed (head 65549484c); after the later branch-selection fix (93ea3adcb), check:fast and targeted tests passed
  • Full suite: not run

Author readiness

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

akshad-exe and others added 5 commits November 28, 2026 11:42
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
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
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
@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 3/5 · The PR needs fixes before merging because replaced functions can still be reported as registered.RetriggerView in GreptileConfidence Score: 3/5 Tier: plus

[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.

Findings

  1. P1 Replaced functions look registered ▶
  2. P1 Replaced functions look registered ▶
Fix 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.

Summary

Adds static matching between VSIX declarations and JavaScript registration calls.

  • VSIX reports list declared commands, contributions, and settings.
  • JavaScript analysis records calls rooted in the VS Code module.
  • The correlation report compares VSIX declarations with static registrations.
  • The VSIX reader identity now lives with shared provider identities.

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]
Loading

Reviews (7) · Last reviewed commit: "merge: take the VS Code correlation fixe..." · Reviewed by Greptile

akshad-exe and others added 3 commits November 28, 2026 12:57
…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

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 was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T10:34:55.331018Z
We couldn’t complete this review. Comment @codex review to try again.
93ea3ad Draft marked ready
ℹ️ 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.

@akshad-exe
akshad-exe marked this pull request as draft November 28, 2026 17:38
akshad-exe and others added 9 commits November 28, 2026 23:14
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
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
Comment on lines +154 to +157
...((bindingId !== null && written(bindingId, path)) ||
written(origin.specifier, member)
? POSSIBLE
: {}),

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.

P1 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!

Comment on lines +508 to +513
const { node } = unwrapJavaScriptExpression(
unwrapPureSemanticSequenceExpression(root, state),
);
return t.isCallExpression(node)
? readSemanticRequireOriginCandidate(node, state)?.origin
: undefined;

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.

P1 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.

This branch has not been deployed

No deployments
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.

2 participants