Skip to content

CanarysAutomations/Draft-Debug-with-GHCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShopSphere Platform — Debug with GitHub Copilot Custom Agents

Objective

A hands-on workshop where you act as an on-call engineer responding to a P0 production incident on a live e-commerce platform. You will use GitHub Copilot — Chat, Agent Mode, Custom Agents, and CLI — to trace, diagnose, and fix five real bugs before the morning stand-up.

Duration ~45 min (9 mandatory + 2 optional exercises · ~5 min each)
Audience Developers (Intermediate / Senior)
Format Instructor-led + Hands-on Lab
Stack Python FastAPI · Java Spring Boot (reference)

Prerequisites

  • GitHub Copilot license (Chat + Agent Mode enabled)
  • Python 3.12+ installed
  • gh CLI installed and authenticated (gh auth login)
  • VS Code with the GitHub Copilot extension
cd python-services/checkout-service
pip install -r requirements.txt
python demo.py          # confirm the incident is reproducible

Table of Contents

Mandatory — follow in order (~45 min)

# Exercise Copilot Feature
01 Reproduce the Incident — (baseline)
02 Analyze Logs with #file #file
04 Debug Live Error with @terminal @terminal
05 Find All Bugs with #codebase #codebase
07 Fix Bug #1 with #selection #selection
08 Fix Bugs #2 & #3 with Agent Mode Agent mode
09 Build Your Debug Agent Custom agent (create)
10 Run Your Agent on Bugs #4 & #5 Custom agent (run)
11 Generate Tests with CLI gh copilot CLI

Optional — complete if time allows (~10 min)

# Exercise Copilot Feature
03 Map Architecture with Chat multi-#file
06 Create Instructions File copilot-instructions.md

Full exercise details and copy-paste prompts: workshop/EXERCISES.md


Bugs in the Code

Five intentional bugs are hidden across the checkout service. Your job is to find and fix all of them.

# Bug File Symptom
1 discount can be None — no null guard checkout_service.py TypeError crash for ~50% of users
2 asyncio.create_task() never awaited checkout_service.py Silent payment failures
3 Exception caught but not logged with context checkout_service.py Errors swallowed — useless logs
4 Timeout set to 1s in config, never enforced in code payment_client.py + config.yaml Timeouts never fire
5 No retry on transient payment failures payment_client.py 50% random payment errors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors