Skip to content

Latest commit

 

History

History
92 lines (63 loc) · 2.27 KB

File metadata and controls

92 lines (63 loc) · 2.27 KB

Lab 05 — Review, Test, & Verify

Objective

Review the generated change adversarially, test it, and produce evidence that it is ready for handoff.

Materials

  • examples/demo-app/src/auth/session-store.ts
  • examples/demo-app/tests/auth/refresh-token.test.ts

Steps

  1. Implement Phase 1 only.
  2. Inspect the diff for scope drift.
  3. Run adversarial code review.
  4. Add meaningful tests.
  5. Run pnpm test.
  6. Fix failures without guessing.
  7. Create PR handoff notes.

Suggested Verification Commands

cd examples/demo-app
pnpm test
pnpm demo

Example Review Prompt

Review this change as if you are the strictest reviewer on the team.

Focus on:
1. scope drift,
2. behavioral regressions,
3. missing tests,
4. unnecessary complexity,
5. mismatch with the Implementation Plan.

Return findings first, ordered by severity.

Example PR Handoff Structure

Use this outline:

  • summary of what changed
  • files touched
  • tests run
  • risks or open questions
  • follow-up work

Review Questions

Use these questions during the diff review:

  • Did the change follow the Implementation Plan?
  • Did it touch files outside the approved work package?
  • What assumptions are still untested?
  • What would a skeptical reviewer flag?
  • Is there a simpler implementation that preserves behavior?

Deliverables

  • working code branch or patch
  • review findings
  • verification evidence
  • PR handoff
  • reusable verification gate candidate

Reused Later

The review findings, verification evidence, and PR handoff become required workflow phases and output artifacts in Lab 06.

Reference Solution

One correct end-state is a single change in SessionStore.rotate (src/auth/session-store.ts): delete the previously presented refresh token from the store when the new one is issued, so only the new token validates. Compare against your own change after review and testing — do not start from it.

Pass Criteria

This lab passes when:

  • the diff has been reviewed against the plan
  • verification commands were actually run
  • the evidence is recorded clearly enough for a reviewer to evaluate
  • the PR handoff explains risks, follow-ups, and what was verified

Suggested Reflection

What issue would have escaped if you had only run tests and skipped a structured diff review?