Skip to content

Fix stale codegen references in copilot-instructions.md - #2555

Open
rinceyuan wants to merge 1 commit into
github:mainfrom
rinceyuan:docs/stale-codegen-refs
Open

Fix stale codegen references in copilot-instructions.md#2555
rinceyuan wants to merge 1 commit into
github:mainfrom
rinceyuan:docs/stale-codegen-refs

Conversation

@rinceyuan

Copy link
Copy Markdown
Contributor

.github/copilot-instructions.md points contributors and coding agents at a type-generation entry point that was removed in February. Four references are stale.

Line Says Reality
16 nodejs/scripts/generate-session-types.ts File does not exist
26 npm run generate:session-types Script does not exist
71 scripts/codegen/java.ts Real path is java/scripts/codegen/java.ts
72 npm run generate:session-types Script does not exist

#464 (RPC codegen, 2026-02-13) deleted the script and replaced the npm task in the same commit:

$ git show 7e069fd6 -- nodejs/package.json
-    "generate:session-types": "tsx scripts/generate-session-types.ts",
+    "generate": "cd ../scripts/codegen && npm run generate",

$ git log --diff-filter=D --oneline -1 -- nodejs/scripts/generate-session-types.ts
7e069fd6 RPC codegen (#464)

The document already had the correct command elsewhere, so it contradicted itself — line 67 says cd nodejs && npm run generate while lines 26 and 72 named the deleted task. This aligns them.

Verification

generate:session-types survived nowhere but this file, and nothing references it after the change:

$ git grep -rn -E 'generate:session-types|nodejs/scripts/generate-session-types'
                      # (no output)

Every path the file now claims resolves:

$ ls -d scripts/codegen java/scripts/codegen/java.ts java/sdk/src/generated/java nodejs/src/generated
scripts/codegen  java/scripts/codegen/java.ts  java/sdk/src/generated/java  nodejs/src/generated

scripts/codegen is confirmed as the producer of the Node output that line 72 describes:

$ grep -n 'nodejs/src/generated' scripts/codegen/typescript.ts
602:    const outPath = await writeGeneratedFile("nodejs/src/generated/session-events.ts", annotatedTs);
960:    const outPath = await writeGeneratedFile("nodejs/src/generated/rpc.ts", rpcTs);

Scope

Only the four stale references. The Maven command on line 71 is left as-is — the codegen profile is real (java/sdk/pom.xml, whose own comment documents mvn generate-sources -Pcodegen), and its workingDirectory is ${project.parent.basedir}/scripts/codegen, which confirms java/scripts/codegen as the correct generator location.

nodejs/scripts/generate-session-types.ts and the generate:session-types npm script were both removed by github#464, which replaced them with scripts/codegen and 'npm run generate'. The Java generator path was also missing its java/ prefix.
Copilot AI balanced review requested due to automatic review settings September 7, 2026 02:29
@rinceyuan
rinceyuan requested a review from a team as a code owner September 7, 2026 02:29

Copilot AI 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.

🟢 Approval recommended

All updated references match the repository’s current codegen paths and scripts.

Pull request overview

Updates contributor instructions to reference the current centralized code-generation workflow.

Changes:

  • Replaces deleted Node.js generator references with npm run generate.
  • Corrects the Java generator path.
File summaries
File Description
.github/copilot-instructions.md Corrects stale codegen paths and commands.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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