C# Upgrade#276
Draft
joesobo wants to merge 11 commits into
Draft
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trello 201: C# Upgrade
Current State
codex/201-csharp-upgrade/Users/poleski/.codex/worktrees/201-csharp-upgrade/CodeGraphyV4Human Gates
packages/extension/tests/acceptance/specs/must not be edited, created, renamed, deleted, or committed without explicit approval.codegraphy-miniunless the human explicitly approves local focus-stealing runs.Request
Start Trello card
https://trello.com/c/rSYGlC3d/201-c-upgrade, then followdocs/agents/codegraphy-loop.md.Trello Card Summary
Goal: upgrade
examples/example-csharpso C# feels like a real, focused CodeGraphy demo project and has acceptance coverage that proves visible graph behavior.Important card requirements:
examples/example-csharp.examples/example-csharpa believable small project that intentionally demonstrates every visible supported C# node and edge toggle.examples/example-csharp, mutation for touched production files when required, and organize/typecheck/lint gates before review.Setup Context Read
AGENTS.mdCONTEXT.mddocs/agents/codegraphy-loop.mddocs/agents/loops/orchestrator.mddocs/agents/loops/specifier.mddocs/agents/loops/coder.mddocs/agents/loops/refactorer.mddocs/agents/loops/architect.mddocs/agents/acceptance-specs.mddocs/agents/issue-tracker.mddocs/agents/triage-labels.mddocs/agents/domain.mdpackages/extension/tests/acceptance/README.mdpackages/extension/tests/acceptance/specs/csharp-example.mdpackages/extension/tests/acceptance/specs/c-example.mdpackages/extension/tests/acceptance/specs/cpp-example.mdexamples/example-csharp/README.mdexamples/example-csharp/src/**/*.cspackages/plugin-csharp/src/plugin.tspackages/plugin-csharp/tests/plugin.test.tspackages/plugin-csharp/codegraphy.jsonpackages/plugin-csharp/README.mdInitial Observations
packages/core/src/treeSitter/runtime/analyzeCSharpwith a C# workspace index underpackages/core/src/treeSitter/runtime/csharpIndex.Event Log
2026-06-12T20:51:39Z - Orchestrator Setup
/Users/poleski/.codex/worktrees/201-csharp-upgrade/CodeGraphyV4on branchcodex/201-csharp-upgradefromorigin/main.2026-06-12T20:55:00Z - Draft PR Published
codex/201-csharp-upgrade.2026-06-12T21:02:00Z - Alignment Scope Clarified
examples/example-csharplook like expected C# support, matching expected Tree-sitter-supported nodes and edges; then make acceptance tests match that expected example.2026-06-12T21:08:00Z - Specifier Dispatch
packages/core/src/treeSitter/runtime/analyzeCSharpemitsclass,interface,enum, andmethodsymbols plus Imports, References, Calls, and Inherits relations. The C# plugin is metadata-only.packages/extension/tests/acceptance/specs/csharp-example.mdneeds an approved edit before Coder runs.2026-06-12T21:40:00Z - Specifier Inventory And Contract
docs/plans/201-csharp-upgrade-specifier-plan.md.packages/plugin-csharpis metadata-only and contributes supported extension/default-filter settings only.Imports,References,Calls, andInherits.Function,Class,Interface,Struct, andEnum.method, but the product Graph Scope row for C# isFunctionbecausesymbol:functionmatches bothfunctionandmethod. C# does not currently advertise the narrowerMethodnode type.Imports, uppercase typeReferences, object/static/inheritedCalls, and base-listInherits.examples/example-csharpinto a small file-scoped-namespace task-runner/service demo.src/Models/RunRequest.csandsrc/Models/RunStatus.cs, so every advertised C# symbol node type is visible.Program,Config,ApiService,BaseService,IRunner,Helpers,Formatter, and one intentional orphan class.packages/extension/tests/acceptance/specs/csharp-example.mdonly after human approval.Containsto prove file-to-symbol projection.Containsis unavailable for the upgraded C# symbol scenario, Coder should add the smallest Core capability test/fix that exposesContainsconsistently with C# symbol nodes.packages/extension/tests/acceptance/specs/csharp-example.md.packages/extension/tests/playwright-vscode/generated/acceptance.spec.ts.examples/example-csharp/README.md,examples/example-csharp/src/**/*.cs,examples/example-csharp/.codegraphy/settings.json, andexamples/README.md.c-example.md,cpp-example.md, and generic Graph Scope specs unless Coder changes shared Graph Scope capability behavior forContains.packages/extension/tests/acceptance/specs/csharp-example.md, or pause for an explicit spec-Markdown approval because the loop docs require it?docs/plans/201-csharp-upgrade-specifier-plan.md.2026-06-12T21:55:00Z - Orchestrator Receives Specifier
53c72492onorigin/codex/201-csharp-upgrade.examples/example-csharpsource/README/settings so the example visibly demonstrates expected current C# Tree-sitter-supported nodes and edges;Containscapability gap and add the smallest Core test/fix if needed;2026-06-12T22:42:00Z - Coder Example And Core Capability Pass
examples/example-csharpinto a small task-runner/service demo:Program.cscallsConfig.LoadConfig(), createsApiService, creates aRunRequeststruct, and formats the returned status throughHelpers.ApiService.csinheritsBaseService, implementsIRunner, calls inheritedStatus(), callsHelpers.IsRunnable(...), and referencesRunStatus.src/Models/RunRequest.csas the C# Struct target andsrc/Models/RunStatus.csas the C# Enum target.Orphan.csas an intentionally unrelated class.examples/example-csharp/README.mdandexamples/README.mdto describe current Core Tree-sitter C# behavior and the metadata-only C# plugin boundary.Containswhen C# symbol node capabilities are available.packages/core/tests/treeSitter/capabilities.test.tsfailed because C# edge capabilities wereimport,reference,call,inheritand missedcontains.containsto the C# entry inpackages/core/src/treeSitter/runtime/capabilities.ts.examples/example-csharp:13 files,13 nodes,22 edges.13 nodes / 0 edges13 nodes / 6 edges13 nodes / 7 edges13 nodes / 7 edges13 nodes / 2 edges13 nodes / 0 edgesProgram.cs -> Models/RunRequest.cs,Program.cs -> Services/ApiService.cs,Program.cs -> Utils/Helpers.cs,ApiService.cs -> Contracts/IRunner.cs,ApiService.cs -> Models/RunStatus.cs,ApiService.cs -> Utils/Helpers.cs.Program.cs -> Config.cs,Program.cs -> Models/RunRequest.cs,Program.cs -> Services/ApiService.cs,Program.cs -> Utils/Helpers.cs,ApiService.cs -> Models/RunStatus.cs,ApiService.cs -> Utils/Helpers.cs,Helpers.cs -> Formatter.cs.Program.cs -> Config.cs,Program.cs -> Models/RunRequest.cs,Program.cs -> Services/ApiService.cs,Program.cs -> Utils/Helpers.cs,ApiService.cs -> Services/BaseService.cs,ApiService.cs -> Utils/Helpers.cs,Helpers.cs -> Formatter.cs.ApiService.cs -> Contracts/IRunner.cs,ApiService.cs -> Services/BaseService.cs.32 nodes,41 edges.19total, grouped as7 class,9 methodunder Function,1 interface,1 struct,1 enum.32 nodes / 19 edges; representative edges includeModels/RunRequest.cs -> Models/RunRequest.cs#RunRequest:struct,Models/RunStatus.cs -> Models/RunStatus.cs#RunStatus:enum,Program.cs -> Program.cs#Main:method, andServices/ApiService.cs -> Services/ApiService.cs#Run:method.32 nodes / 7 edges; representative symbol edges includeProgram.cs#Main:method -> Config.cs#LoadConfig:method,Program.cs#Main:method -> Models/RunRequest.cs#RunRequest:struct,ApiService.cs#Run:method -> Services/BaseService.cs#Status:method, andHelpers.cs#FormatStatus:method -> Formatter.cs#FormatOutput:method.pnpm test tests/treeSitter/csharp/analyze.test.ts tests/treeSitter/csharpIndex.test.ts tests/treeSitter/capabilities.test.tsfrompackages/core: passed,18 tests.pnpm --filter @codegraphy-dev/core lint: passed.pnpm --filter @codegraphy-dev/core typecheck: passed.pnpm run check:acceptance-specs: passed; no human-owned acceptance spec Markdown edited.git diff --check: passed.Contains; a changeset may be needed in a later loop role if release policy applies to this PR.2026-06-12T22:48:00Z - Orchestrator Receives Coder And Enters Human Gate
e1ea6b0conorigin/codex/201-csharp-upgrade.packages/extension/tests/acceptance/specs/csharp-example.mdso the C# acceptance spec matches the upgradedexamples/example-csharpexample and the measured counts recorded above, then regenerate generated acceptance output.