Skip to content

evidence for the rows an answer is not sure of - #1808

Merged
swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
apps/typescript/evidence-for-uncertain-rows
Sep 30, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
apps/typescript/evidence-for-uncertain-rows

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

Rows an answer is not sure of ([by name], [one of a set], [registered], [text]) come without the code that decides them, so readers re-open the file for about half of all answers, and wrong name-matches get accepted.

  • New shared layer scripts/ax_evidence.py, used by impact, path, context, changed and test-impact in grep, prose and --json output, by the MCP tools and by the post-edit hook note.
  • For each of the 5 strongest non-exact rows it adds the call line and the deciding line: the parameter or field that types the receiver, the DI binding, the dispatch key, or the registration constant. Each row gets at most 2 lines of at most 160 chars. The remaining rows are only counted, and exact rows get nothing.
  • only_through: how many callables and tests are reached only through that row. --drop <file:line> and --exact ask again without it (MCP drop / exact).
  • alongside rows collapse to a count when evidence is on (--alongside lists them).
  • Switch for an A/B test: AXIOMCODE_EVIDENCE=on|off, --evidence/--no-evidence, MCP evidence. Default off, so every answer is unchanged unless it is turned on.
  • JSON rows gain evidence: {call, decider} and only_through: {callables, tests}.
  • Golden case in five languages (TS name-match on a Map field / an any parameter, dispatch key, registration constant; JS; Python __init__ param; Java Function.apply; C# dynamic field). Controls: a resolved-only answer is byte-identical with the switch on and off, and switch off is byte-identical to base.

Checked: golden case 14/14 (0/14 on base); language suites ts 98/0, js, py 42/0, java 79/0, cs pass; CLI cases fail the same 9 checks as base; TS probes 31/74 before and after, 0 regressed; product edges 9977 = 9977; p90 answer growth with evidence on: 0–1.42 KB across the five products (limit 1.5 KB).

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 02547c5 into apps/integration-0.1.9 Sep 30, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the apps/typescript/evidence-for-uncertain-rows branch September 30, 2026 06:37
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.

1 participant