M67: code intelligence tools on both backends, and a repo map - #57
RandyNorthrup wants to merge 6 commits into
Conversation
The model finds definitions, references and symbols the way the editor does, from VS Code's own language services (PLAN.md D49, M67). - src/core/codeIntel/: find_definition, find_references, workspace_symbols, document_symbols, hover, call_hierarchy and repo_map over a LanguageServiceHost; inputs confined like the file tools' (D24), results workspace-relative, sorted, capped, with what lies outside the workspace left out and counted; "no language service" instead of an empty answer; a 20-second deadline per call. - src/host/codeIntel/languageServices.ts: the vscode.execute… commands. - Model API: native read tools (no card in any mode, Restricted Mode included) and rename_symbol, planned before its card, judged as an edit (protected when any file is), re-checked after approval, written file by file with one patch for Revert and rewind. The repo map in the prompt behind museSpark.modelApiRepoMap (off, machine-scoped). - Muse Code: the same tools on the ide server, readOnlyHint on each (and on getDiagnostics); renameSymbol returns a diff and writes nothing. - The file tools' one-hunk patch moved to codeText.ts as changeHunk, shared with the rename. - Tests: unit suites over a fake language service, the adapter over the vscode mock, an integration suite over a TypeScript fixture (VS Code stable and 1.125.0), live case19 of the Model API sweep (3 requests), the code-intel harness scenario; 20 red drills in docs/certification/m67.md. - Docs: README, CHANGELOG, PLAN (as built, Q10, Q11), AGENTS layout, SECURITY, PRIVACY; strings in all 15 tables. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ap bounded Every finding from the three class reviews of c5c4045, in one pass: - A rename's every edit range must cover exactly the old name in the text written, and the position's file must still be the text the provider answered on, or it is refused (P1). - File operations in a rename are read from WorkspaceEdit._allEntries() (size only counts text edits in VS Code); unreadable means refused. - Each file is checked again right before its own write; a change partway stops the rest with a revertable patch; Stop after approval writes nothing. - Repo map only in a trusted workspace, never pinned empty or failed, three tries at most, a child task uses its parent's map, the Stop listener is removed and the file listing is bounded. - Hover held back when defined only outside the workspace and the languages' libraries; unsaved files: positions refused, lines from the editor, noted. - rename_symbol matches Edit hooks, which get the planned files; a Stop while planning still leaves the call its row and output. - Protected files named first on the card; a failed rename with a patch keeps review, revert and rewind; an edit row's file is only a path. - No Promise.withResolvers in the repo map (Node 20 for VS Code 1.99); the M67 commands and WorkspaceEdit._allEntries checked in 1.99.0. - Honest "no language service" wording; the live stand-in skips string literals and asserts main.ts exactly; certification updated with the live Muse Code capture through the ide server and the red drills. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…est call sites Grok Build's review of 585af10 (one P1, five P2), all fixed: - An editor with unsaved changes is matched to a file by its real path too (ToolIo.unsavedFiles, unsavedDocumentPath), so a workspace opened through a link no longer lets a rename write over unsaved edits; lines and targets are read at the editor's own path. - The repo map drops a batch the time or a Stop cuts off, and says "no language service" only when every lookup ran and found nothing. - The rename plan shown to PreToolUse hooks is the plan written. - Outgoing call sites name the file of the function asked about; of several call items the one declared at the position is asked and the others are counted. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db23f6a2c6
ℹ️ 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".
… path Codex on PR #57 (two P2s), each fixed with its siblings: - The repo map counts every line it renders against its budget: the lead, the count of files left out, the notes, and the prompt section's heading. repo_map refuses a max_tokens too small for its own fixed text and names the size that would do; an empty map is held to the budget too. - document_symbols opens and outlines the file through openAsEdited, at the path of an editor holding unsaved changes to it, as the other tools already do. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
What
M67 (PLAN D49): the model finds definitions, references and symbols the way an IDE does, from VS Code's own language services, instead of grepping.
find_definition,find_references,workspace_symbols,document_symbols,hover,call_hierarchyandrepo_mapare read tools (no card in any mode, stopped by Stop).rename_symbolis planned before its card, judged as an edit (protected when any of its files is), rechecked file by file after approval and again right before each write, written atomically, and leaves one revertable patch across its files. The repo map goes into the prompt whilemuseSpark.modelApiRepoMap(machine-scoped) is on.ideserver (findDefinition…renameSymbol), eachreadOnlyHint: true;renameSymbolreturns a unified diff and writes nothing.src/core/codeIntel/(novscode), the adapter insrc/host/codeIntel/languageServices.ts(results converted to plain data, hover parsed with zod). The file tools' one-hunk patch moved intocodeText.tsunchanged so the rename shares it.Review
Three-class review by Claude Code agents, then two Grok Build rounds on the Kubuntu rig. Every finding was fixed with its class siblings (585af10, db23f6a): stale renames refused, file operations seen, unsaved editors matched by real path (symlinked roots), a cut-off repo-map batch dropped, the plan a hook saw is the plan written, call-hierarchy sites named honestly. Findings and answers are in
docs/certification/m67.md.Gate
Complete
npm run qualityon the Mac mini rig for be43dabb (db23f6a adds only the certification text): 187 test files passed, 2,794 tests, a11y 340 pages with 0 rules violated, no leaks, 0 Semgrep findings, exit=0 (lint:psruns on Windows only; no PowerShell changed). Integration suite 15 passing on VS Code stable and 1.125.0. Red drills recorded in the certification record.Live
muse-spark-1.3-contributor, empty temporary workspace): 3 requests, all 200, est. $0.0007; 4 references found, 4 edits in 2 files, the import left intact.ideserver (AGENTS rule 13): 4 model attempts from the CLI's trace log; Muse Code listed the tools, showed its own approval card formcp__ide__findReferencesdespitereadOnlyHint: true, and passed our text through verbatim.🤖 Generated with Claude Code