Skip to content

Remediation Playbook: My source of truth

Not for students until the relevant workshop has happened.

Every deliberate pain point in the OrbitTasks codebase, mapped to the workshop that walks through the fix together with students (not as solo homework). Each row tells me where the issue lives, which workshop addresses it, and what the live-demo step is.

The key pedagogical move: students don't fix any of these on their own. I demonstrate the fix during the workshop, students follow along in their own clones, and they leave with the same green state.


Pain points and their workshops

#Pain pointFileFound inFixed inLive demo
115-second billing rollup test (real HTTP)apps/api/tests/reports.test.tsW1 baseline, W2 profilingW5 AI-assisted refactorW5 live-demo, step 4
2Flaky Promise.race timing testapps/api/tests/reports.test.tsW1 (when it fails)W2 root-cause analysisW2 live-demo, step 3
3maxWorkers: 1 in Jest configapps/api/jest.config.jsW2 profilingW3 CI/CD optimizationW3 live-demo, step 4
4collectCoverage: true always onapps/api/jest.config.jsW2 profilingW3 CI/CD optimizationW3 live-demo, step 3
5incremental: false in tsconfigapps/api/tsconfig.jsonW2 profilingW3 CI/CD optimizationW3 live-demo, step 2
6No npm cache in CI workflow.github/workflows/ci.ymlW1, W3W3 CI/CD optimizationW3 live-demo, step 1
7Sequential per-file deploy scriptscripts/deploy.shW2 profilingW3 CI/CD optimizationW3 live-demo, step 8
8Misleading README ("npm install && npm start")README.mdW4 auditW4 DevExW4 live-demo, step 2
9Broken setup.sh (typo: logss)scripts/setup.shW4 auditW4 DevExW4 live-demo, step 1
10Missing JWT_SECRET in .env.example.env.exampleW4 auditW4 DevExW4 live-demo, step 3
11Out-of-date architecture doc (mentions Postgres / Prisma)docs/architecture.mdW4 auditW4 DevExW4 live-demo, step 4
12~130-line god function for CSV exportapps/api/src/routes/reports.tsW2W5 AI-assisted refactorW5 live-demo, step 1
13Zero tests for auth.service.tsapps/api/src/services/auth.service.tsW2W5 AI-assisted refactorW5 live-demo, step 2
14TaskList renders 500 items (no virtualization)apps/web/tests/components/TaskList.test.tsxW2 profilingW5 AI-assisted refactorW5 live-demo, step 3
15CommentList flaky relative timestampapps/web/tests/components/CommentList.test.tsxW2 (when it fails)W5 AI-assisted refactorW5 live-demo, step 4
16Login flaky missing-waitFor testapps/web/tests/pages/Login.test.tsxW2 (when it fails)W5 AI-assisted refactorW5 live-demo, step 5
17Vitest singleFork: true no parallelismapps/web/vite.config.tsW2 profilingW3 CI/CD optimizationW3 live-demo, step 4
18Vitest coverage.enabled: true always onapps/web/vite.config.tsW2 profilingW3 CI/CD optimizationW3 live-demo, step 3
19No husky / pre-commit hook(project root)W4 auditW7 standardsW7 live-demo, step 1
20No AI usage policy(project root)W5 reflectionW7 standardsW7 live-demo, step 2

Reference branches (deterministic answer key)

The OrbitTasks repo (sample-repo/orbittasks, remote tbf-orbittasks) carries a cumulative stack of branches, one per code workshop, each holding that workshop's fixes pre-applied as one commit per live-demo step. main is the untouched baseline. Each branch builds on the previous, so w5-ai shows the repo after W2 through W5 combined. This is the answer key: a green, identical target to converge a drifting room onto, every cohort.

main (baseline, all pain points)
 └─ w2-profiling   flaky api tests fixed deterministically (fake timers)
     └─ w3-cicd     pipeline optimizations (cache, incremental, coverage, parallel, matrix+shard, deploy)
         └─ w4-devex   onboarding (setup.sh, README, .env, architecture, Makefile)
             └─ w5-ai     AI-assisted (refactor, auth tests, mock transport, virtualize, flaky FE fixes)
                 └─ w7-standards   husky+lint-staged+prettier, lint rule, PR template

W1, W6 and W8 make no code changes, so they have no branch. Each 0N-*/live-demo.md opens with a "Reference branch" block mapping every step to its commit. Verified on this build: test:api 231 tests in ~3s after the W5 mocks (was ~12 min), web 77 tests deterministic.

Three deliberate divergences from the older narration (flagged in the live-demo files):

  1. W2 owns the flaky-api fix (branch w2-profiling), so everything downstream stays green; W5 still fixes the web flaky tests.
  2. W3 keeps vitest isolate:true; flipping isolate:false over-shares jsdom here and breaks the web suite, so that stays a teaching beat, not the committed state.
  3. W5 mocks at the transport seam (one fetch stub mirroring the mock server) instead of six per-client mocks, and rewrites the TaskList 500-render test into a window assertion plus a visibleRange unit test.

Branches are local-only until pushed: git push origin w2-profiling w3-cicd w4-devex w5-ai w7-standards.

How to use this during the workshop

Before each workshop, open the corresponding live-demo.md in the workshop folder. That file has the exact step-by-step screen-share script:

  • workshops/02-profiling/live-demo.md
  • workshops/03-cicd/live-demo.md
  • workshops/04-devex/live-demo.md
  • workshops/05-ai/live-demo.md
  • workshops/07-standards/live-demo.md

The pattern in every live-demo:

  1. I set the scene (30s): "OK, in your handout you flagged this issue. Let's fix it together."
  2. I share screen and run/edit the offending file.
  3. Students mirror me in their own clones. They commit alongside me.
  4. I measure the before/after; students record the delta in their handout.
  5. I move to the next issue.

This is faster, lower-anxiety, and more authentic than "go figure it out and report back." Real teams do it this way too: engineers learn from senior engineers walking them through it the first time.

When not to do it live

Three situations where solo work is better:

  • The pain point is one a student already identified themselves and wants to fix on their own (encourage them).
  • The fix has many right answers (e.g., README content); let students draft their own version, then compare.
  • A student is significantly behind the group; give them solo catch-up time after class, not live-demo time.

Otherwise: demo it.