Skip to content

csharp: context drops an inflected task word such as validated before scoring, so a validation question never seeds the validator #1493

Closed

Description

@swapnilpaliwal-sd

Symptom

context drops a task word that is an inflected form of a declared name before scoring it. "validated" is not in the task terms although CreateWidgetCommandValidator.Validate is declared, so a question about validation starts its flow at the handler and never at the validator. Writing "validator" instead keeps the term and makes Validate the first entry point. The MCP axiomcode_context tool prints the same. Measured on 0.1.3 at 0df257c.

Reproduction

src/App/App.csproj (net8.0, ImplicitUsings) and src/App/Widgets.cs:

 1  namespace App.Widgets;
 2
 3  public record CreateWidgetCommand(string Name, int Size);
 4
 5  public class CreateWidgetCommandValidator
 6  {
 7      public bool Validate(CreateWidgetCommand c) => c.Name != "" && c.Size <= 10;
 8  }
 9
10  public class CreateWidgetCommandHandler
11  {
12      private readonly WidgetStore _store;
13      public CreateWidgetCommandHandler(WidgetStore store) { _store = store; }
14      public int Handle(CreateWidgetCommand c) => _store.Add(c.Name);
15  }
16
17  public class WidgetStore
18  {
19      private readonly List<string> _names = new();
20      public int Add(string name) { _names.Add(name); return _names.Count; }
21  }

$ axiomcode context "how is a CreateWidgetCommand validated before the handler runs"
task terms: create · widget · command · handler
   1 CreateWidgetCommandHandler.<constructor>                      src/App/Widgets.cs:13
   2 CreateWidgetCommandHandler.Handle                             src/App/Widgets.cs:14
$ axiomcode context "how is a CreateWidgetCommand validator run before the handler runs"
task terms: create · widget · command · validator · handler
   1 CreateWidgetCommandValidator.Validate                         src/App/Widgets.cs:7

Root cause

winnow in plugins/axiomcode/skills/axiomcode/scripts/ax_contract.py:202 keeps a term only if it is exactly a subtoken of some symbol name (name_df.get(t, 0) > 0), and validated is not (validate, validator are). score_symbols in axiomcode-context:96-101 already scores a term that starts with a symbol subtoken ("unmounted" against unmount), but winnow runs first (axiomcode-context:409-410), so the term never reaches it.
Expected: "validated" survives as a task term and seeds CreateWidgetCommandValidator.Validate, as "validator" does.

Activity

  1. added
    bugSomething isn't working
    skillAgent-facing query skill (skills/axiomcode)
    on Sep 28, 2026
  2. added a commit that references this issue on Sep 28, 2026
  3. swapnilpaliwal-sd commented on Sep 28, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Fixed by #1619.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcsharpC#skillAgent-facing query skill (skills/axiomcode)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions