Skip to content

Create Test and Debug with GitHub Copilot exercise - #1

Merged
a-a-ron merged 3 commits into
mainfrom
a-a-ron-test-debug-with-copilot
Sep 30, 2026
Merged

a-a-ron merged 3 commits into
mainfrom
a-a-ron-test-debug-with-copilot

Conversation

@a-a-ron

@a-a-ron a-a-ron commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Creates a complete GitHub Skills exercise that teaches learners to use GitHub Copilot as a testing and debugging partner, not merely a code generator. The exercise uses a small intentionally buggy Python bill splitter and is designed for completion in under 45 minutes.

Five-step learner journey

  1. Explain unfamiliar code, run the baseline, and record a falsifiable debugging hypothesis.
  2. Generate focused pytest tests from explicit expected behavior and critically inspect the assertions.
  3. Add missing remainder and tip-rounding edge cases that expose the defect.
  4. Diagnose the root cause from failing tests, then fix and refactor using integer-cent distribution while preserving the public contract.
  5. Review the final diff and document test evidence plus a Copilot suggestion that was verified, revised, or rejected.

Grading strategy

  • Grades repository state and executable behavior rather than exact Copilot prompts or responses.
  • Uses visible starter tests, additional grading tests, and mutation-style fixtures that ensure learner-authored tests both reject buggy behavior and accept corrected behavior.
  • Provides deterministic, path-scoped transitions and actionable retry feedback for each milestone.
  • Isolates pull request test execution in a read-only job; write permissions are limited to static issue feedback, workflow transitions, and exercise completion.
  • Uses skills/exercise-toolkit@v0.9.3 for issue discovery, transitions, and completion.

Validation

  • Starter suite: 7 passing tests.
  • Simulated completed learner journey: 19 passing visible and grading tests.
  • All six workflow YAML files parse successfully.
  • Devcontainer JSON and Python sources validate successfully.
  • Milestone graders accept correct states and reject untouched, meaningless, or incomplete states.
  • Learner-facing links were checked successfully.

Prerequisites

Learners need basic Python, Git, and terminal familiarity; access to GitHub Copilot; and GitHub Codespaces or local VS Code. No paid or organization-only Copilot feature is required. This complements the existing Getting Started and Agent Mode exercises by focusing on evidence-driven testing, diagnosis, and verification.

Publishing assumptions

  • main remains the default branch.
  • The repository remains public and configured as a GitHub template.
  • GitHub Actions may create and update the exercise issue and enable or disable step workflows.
  • The published repository name remains skills/test-and-debug-with-github-copilot, matching the README copy link.

This PR intentionally remains unmerged for review.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 02:37
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The final workflow can approve stale or incomplete state and has a race between overlapping pull-request runs.

Review effort: Balanced
Findings: 2 High severity

Open (2)
What changed in this PR

Creates a five-step GitHub Skills exercise for evidence-driven Python testing and debugging with GitHub Copilot.

Changes:

  • Adds an intentionally buggy bill splitter, starter tests, and grading checks.
  • Implements sequential exercise workflows and learner instructions.
  • Adds Codespaces setup and project documentation.
File Description
.devcontainer/​devcontainer.json Configures the Python/Copilot development environment.
.gitignore Adds Python and editor exclusions.
DEBUGGING.md Provides the investigation-notes template.
README.md Documents and launches the exercise.
requirements.txt Pins pytest.
src/​__init__.py Defines the package.
src/​bill_splitter.py Adds the intentionally defective implementation.
tests/​test_bill_splitter.py Adds starter validation tests.
.github/​grading/​check_notes.py Grades debugging notes.
.github/​grading/​check_pr_body.py Grades final reflection content.
.github/​grading/​check_tests.py Mutation-checks learner-authored tests.
.github/​grading/​test_solution.py Adds solution behavior tests.
.github/​steps/​1-step.md Guides initial investigation.
.github/​steps/​2-step.md Guides focused test creation.
.github/​steps/​3-step.md Introduces failing edge cases.
.github/​steps/​4-step.md Guides the implementation fix.
.github/​steps/​5-step.md Guides final verification and review.
.github/​steps/​x-review.md Summarizes completed learning outcomes.
.github/​workflows/​0-start-exercise.yml Initializes the exercise.
.github/​workflows/​1-step.yml Grades debugging notes.
.github/​workflows/​2-step.yml Grades focused tests.
.github/​workflows/​3-step.yml Grades edge-case tests.
.github/​workflows/​3-last-step.yml Removes the obsolete template workflow.
.github/​workflows/​4-step.yml Grades the corrected implementation.
.github/​workflows/​5-step.yml Grades and completes the exercise.

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

Comment thread .github/workflows/5-step.yml
Comment thread .github/workflows/5-step.yml
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@a-a-ron
a-a-ron merged commit d71ea9d into main Sep 30, 2026
4 checks passed
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