Skip to content

Improve test discovery skill for error semantics changes#1835

Merged
nathanjmcdougall merged 2 commits into
mainfrom
copilot/improve-test-discovery
Apr 7, 2026
Merged

Improve test discovery skill for error semantics changes#1835
nathanjmcdougall merged 2 commits into
mainfrom
copilot/improve-test-discovery

Conversation

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Agent missed 21 downstream test failures when refactoring collapsed distinct error paths (missing-key → default vs invalid-type → raise) into a single default-returning wrapper. The usethis-python-test-affected-find skill lacked guidance for this class of refactoring.

  • Added "Detect changes to error semantics" general principle to the skill, placed after "Trace callers, not just callees" as a refinement of that idea
  • Guides agents to check whether original code distinguished between failure modes before collapsing them, and to trace transitive callers whose tests may assert on specific exception propagation
  • Bumped skill version 1.1 → 1.2

Add a new "Detect changes to error semantics" general principle that
guides agents to trace transitive callers and run their tests when a
refactoring changes which errors a function raises (e.g., collapsing
distinct missing-key vs invalid-type error paths into a single
default-returning behaviour).

Bump skill version from 1.1 to 1.2.

Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/eaac8d05-162b-4e1c-998c-dd7768575e6f

Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix test discovery for refactored callsites with different error semantics Improve test discovery skill for error semantics changes Apr 7, 2026
Copilot AI requested a review from nathanjmcdougall April 7, 2026 02:53
@nathanjmcdougall nathanjmcdougall marked this pull request as ready for review April 7, 2026 04:17
@nathanjmcdougall nathanjmcdougall merged commit 2b7ea31 into main Apr 7, 2026
1 check passed
@nathanjmcdougall nathanjmcdougall deleted the copilot/improve-test-discovery branch April 7, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants