dojo.md 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/courses/GENERATION_LOG.md +27 -0
  2. package/courses/api-error-handling/course.yaml +16 -0
  3. package/courses/api-error-handling/scenarios/level-1/error-response-format.yaml +131 -0
  4. package/courses/api-error-handling/scenarios/level-1/http-status-codes-basics.yaml +90 -0
  5. package/courses/api-error-handling/scenarios/level-1/rate-limiting-basics.yaml +135 -0
  6. package/courses/api-error-handling/scenarios/level-1/request-validation-errors.yaml +208 -0
  7. package/courses/api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +189 -0
  8. package/courses/api-error-handling/scenarios/level-2/idempotency-retry-logic.yaml +159 -0
  9. package/courses/api-error-handling/scenarios/level-2/rfc-7807-problem-details.yaml +178 -0
  10. package/courses/api-error-handling/scenarios/level-2/webhook-error-handling.yaml +211 -0
  11. package/courses/api-error-handling/scenarios/level-3/distributed-tracing-errors.yaml +275 -0
  12. package/courses/github-actions-cicd/course.yaml +10 -0
  13. package/courses/github-actions-cicd/scenarios/level-1/actions-and-runners.yaml +58 -0
  14. package/courses/github-actions-cicd/scenarios/level-1/basic-workflow-syntax.yaml +52 -0
  15. package/courses/github-actions-cicd/scenarios/level-1/branch-protection-checks.yaml +63 -0
  16. package/courses/github-actions-cicd/scenarios/level-1/environment-variables-secrets.yaml +65 -0
  17. package/courses/github-actions-cicd/scenarios/level-1/first-cicd-shift.yaml +62 -0
  18. package/courses/github-actions-cicd/scenarios/level-1/job-dependencies-outputs.yaml +62 -0
  19. package/courses/github-actions-cicd/scenarios/level-1/simple-ci-pipeline.yaml +57 -0
  20. package/courses/github-actions-cicd/scenarios/level-1/workflow-debugging.yaml +90 -0
  21. package/courses/github-actions-cicd/scenarios/level-1/workflow-status-notifications.yaml +59 -0
  22. package/courses/github-actions-cicd/scenarios/level-1/workflow-triggers.yaml +56 -0
  23. package/courses/github-actions-cicd/scenarios/level-2/concurrency-control.yaml +58 -0
  24. package/courses/github-actions-cicd/scenarios/level-2/conditional-execution.yaml +60 -0
  25. package/courses/github-actions-cicd/scenarios/level-2/custom-actions-development.yaml +55 -0
  26. package/courses/github-actions-cicd/scenarios/level-2/dependency-caching.yaml +58 -0
  27. package/courses/github-actions-cicd/scenarios/level-2/deployment-workflows.yaml +61 -0
  28. package/courses/github-actions-cicd/scenarios/level-2/github-packages-publishing.yaml +59 -0
  29. package/courses/github-actions-cicd/scenarios/level-2/intermediate-cicd-shift.yaml +68 -0
  30. package/courses/github-actions-cicd/scenarios/level-2/matrix-builds.yaml +59 -0
  31. package/courses/github-actions-cicd/scenarios/level-2/reusable-workflows.yaml +61 -0
  32. package/courses/github-actions-cicd/scenarios/level-2/workflow-cost-optimization.yaml +61 -0
  33. package/courses/github-actions-cicd/scenarios/level-3/advanced-cicd-shift.yaml +64 -0
  34. package/courses/github-actions-cicd/scenarios/level-3/compliance-automation.yaml +68 -0
  35. package/courses/github-actions-cicd/scenarios/level-3/docker-action-development.yaml +65 -0
  36. package/courses/github-actions-cicd/scenarios/level-3/github-environments.yaml +65 -0
  37. package/courses/github-actions-cicd/scenarios/level-3/monorepo-ci.yaml +68 -0
  38. package/courses/github-actions-cicd/scenarios/level-3/oidc-cloud-deployments.yaml +55 -0
  39. package/courses/github-actions-cicd/scenarios/level-3/release-automation.yaml +61 -0
  40. package/courses/github-actions-cicd/scenarios/level-3/security-hardening.yaml +63 -0
  41. package/courses/github-actions-cicd/scenarios/level-3/self-hosted-runners.yaml +60 -0
  42. package/courses/github-actions-cicd/scenarios/level-3/workflow-optimization.yaml +59 -0
  43. package/courses/github-actions-cicd/scenarios/level-4/cicd-data-architecture.yaml +63 -0
  44. package/courses/github-actions-cicd/scenarios/level-4/cicd-economics-roi.yaml +63 -0
  45. package/courses/github-actions-cicd/scenarios/level-4/cicd-executive-communication.yaml +58 -0
  46. package/courses/github-actions-cicd/scenarios/level-4/cicd-incident-response.yaml +60 -0
  47. package/courses/github-actions-cicd/scenarios/level-4/cicd-org-design.yaml +59 -0
  48. package/courses/github-actions-cicd/scenarios/level-4/cicd-platform-architecture.yaml +63 -0
  49. package/courses/github-actions-cicd/scenarios/level-4/cicd-training-program.yaml +65 -0
  50. package/courses/github-actions-cicd/scenarios/level-4/cicd-vendor-evaluation.yaml +59 -0
  51. package/courses/github-actions-cicd/scenarios/level-4/enterprise-cicd-governance.yaml +55 -0
  52. package/courses/github-actions-cicd/scenarios/level-4/expert-cicd-shift.yaml +60 -0
  53. package/courses/github-actions-cicd/scenarios/level-5/cicd-ai-future.yaml +63 -0
  54. package/courses/github-actions-cicd/scenarios/level-5/cicd-behavioral-science.yaml +70 -0
  55. package/courses/github-actions-cicd/scenarios/level-5/cicd-board-strategy.yaml +56 -0
  56. package/courses/github-actions-cicd/scenarios/level-5/cicd-consulting-engagement.yaml +61 -0
  57. package/courses/github-actions-cicd/scenarios/level-5/cicd-industry-benchmarks.yaml +63 -0
  58. package/courses/github-actions-cicd/scenarios/level-5/cicd-ma-integration.yaml +73 -0
  59. package/courses/github-actions-cicd/scenarios/level-5/cicd-product-development.yaml +68 -0
  60. package/courses/github-actions-cicd/scenarios/level-5/cicd-regulatory-landscape.yaml +72 -0
  61. package/courses/github-actions-cicd/scenarios/level-5/comprehensive-cicd-system.yaml +66 -0
  62. package/courses/github-actions-cicd/scenarios/level-5/master-cicd-shift.yaml +76 -0
  63. package/courses/github-pr-review/scenarios/level-2/api-change-review.yaml +82 -0
  64. package/courses/github-pr-review/scenarios/level-2/automated-review-tooling.yaml +53 -0
  65. package/courses/github-pr-review/scenarios/level-2/cross-team-review.yaml +61 -0
  66. package/courses/github-pr-review/scenarios/level-2/intermediate-review-shift.yaml +66 -0
  67. package/courses/github-pr-review/scenarios/level-2/performance-review-patterns.yaml +99 -0
  68. package/courses/github-pr-review/scenarios/level-2/review-disagreement-resolution.yaml +64 -0
  69. package/courses/github-pr-review/scenarios/level-2/review-metrics-analysis.yaml +63 -0
  70. package/courses/github-pr-review/scenarios/level-2/review-turnaround-sla.yaml +54 -0
  71. package/courses/github-pr-review/scenarios/level-2/stacked-pr-review.yaml +65 -0
  72. package/courses/github-pr-review/scenarios/level-3/advanced-review-shift.yaml +65 -0
  73. package/courses/github-pr-review/scenarios/level-3/ai-powered-review.yaml +58 -0
  74. package/courses/github-pr-review/scenarios/level-3/compliance-review-process.yaml +64 -0
  75. package/courses/github-pr-review/scenarios/level-3/cross-functional-review.yaml +60 -0
  76. package/courses/github-pr-review/scenarios/level-3/incident-driven-review.yaml +63 -0
  77. package/courses/github-pr-review/scenarios/level-3/large-scale-review-operations.yaml +55 -0
  78. package/courses/github-pr-review/scenarios/level-3/monorepo-review-process.yaml +68 -0
  79. package/courses/github-pr-review/scenarios/level-3/review-automation-platform.yaml +61 -0
  80. package/courses/github-pr-review/scenarios/level-3/review-culture-design.yaml +62 -0
  81. package/courses/github-pr-review/scenarios/level-3/review-data-pipeline.yaml +62 -0
  82. package/courses/github-pr-review/scenarios/level-4/enterprise-review-operations.yaml +61 -0
  83. package/courses/github-pr-review/scenarios/level-4/expert-review-shift.yaml +62 -0
  84. package/courses/github-pr-review/scenarios/level-4/review-data-architecture.yaml +69 -0
  85. package/courses/github-pr-review/scenarios/level-4/review-economics-roi.yaml +63 -0
  86. package/courses/github-pr-review/scenarios/level-4/review-executive-communication.yaml +61 -0
  87. package/courses/github-pr-review/scenarios/level-4/review-incident-postmortem.yaml +69 -0
  88. package/courses/github-pr-review/scenarios/level-4/review-org-design.yaml +62 -0
  89. package/courses/github-pr-review/scenarios/level-4/review-platform-architecture.yaml +64 -0
  90. package/courses/github-pr-review/scenarios/level-4/review-training-program.yaml +66 -0
  91. package/courses/github-pr-review/scenarios/level-4/review-vendor-evaluation.yaml +76 -0
  92. package/courses/github-pr-review/scenarios/level-5/comprehensive-review-system.yaml +68 -0
  93. package/courses/github-pr-review/scenarios/level-5/master-review-shift.yaml +73 -0
  94. package/courses/github-pr-review/scenarios/level-5/review-ai-future.yaml +69 -0
  95. package/courses/github-pr-review/scenarios/level-5/review-behavioral-science.yaml +66 -0
  96. package/courses/github-pr-review/scenarios/level-5/review-board-strategy.yaml +62 -0
  97. package/courses/github-pr-review/scenarios/level-5/review-consulting-engagement.yaml +62 -0
  98. package/courses/github-pr-review/scenarios/level-5/review-devtools-product.yaml +71 -0
  99. package/courses/github-pr-review/scenarios/level-5/review-industry-benchmarks.yaml +64 -0
  100. package/courses/github-pr-review/scenarios/level-5/review-ma-integration.yaml +76 -0
  101. package/courses/github-pr-review/scenarios/level-5/review-regulatory-landscape.yaml +78 -0
  102. package/courses/postgresql-query-optimization/course.yaml +11 -0
  103. package/courses/postgresql-query-optimization/scenarios/level-1/explain-analyze-basics.yaml +80 -0
  104. package/courses/postgresql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +77 -0
  105. package/courses/postgresql-query-optimization/scenarios/level-1/index-fundamentals.yaml +76 -0
  106. package/courses/postgresql-query-optimization/scenarios/level-1/join-basics.yaml +73 -0
  107. package/courses/postgresql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +62 -0
  108. package/courses/postgresql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +69 -0
  109. package/courses/postgresql-query-optimization/scenarios/level-1/select-star-problems.yaml +69 -0
  110. package/courses/postgresql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +63 -0
  111. package/courses/postgresql-query-optimization/scenarios/level-1/vacuum-and-statistics.yaml +62 -0
  112. package/courses/postgresql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +74 -0
  113. package/courses/postgresql-query-optimization/scenarios/level-2/autovacuum-tuning.yaml +76 -0
  114. package/courses/postgresql-query-optimization/scenarios/level-2/composite-index-design.yaml +81 -0
  115. package/courses/postgresql-query-optimization/scenarios/level-2/covering-indexes.yaml +74 -0
  116. package/courses/postgresql-query-optimization/scenarios/level-2/cte-optimization.yaml +83 -0
  117. package/courses/postgresql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +66 -0
  118. package/courses/postgresql-query-optimization/scenarios/level-2/join-optimization.yaml +72 -0
  119. package/courses/postgresql-query-optimization/scenarios/level-2/partial-and-expression-indexes.yaml +75 -0
  120. package/courses/postgresql-query-optimization/scenarios/level-2/query-planner-settings.yaml +62 -0
  121. package/courses/postgresql-query-optimization/scenarios/level-2/subquery-optimization.yaml +67 -0
  122. package/courses/postgresql-query-optimization/scenarios/level-2/window-function-optimization.yaml +63 -0
  123. package/courses/postgresql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
  124. package/courses/postgresql-query-optimization/scenarios/level-3/connection-pooling.yaml +60 -0
  125. package/courses/postgresql-query-optimization/scenarios/level-3/full-text-search-optimization.yaml +66 -0
  126. package/courses/postgresql-query-optimization/scenarios/level-3/jsonb-optimization.yaml +88 -0
  127. package/courses/postgresql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +80 -0
  128. package/courses/postgresql-query-optimization/scenarios/level-3/materialized-view-optimization.yaml +73 -0
  129. package/courses/postgresql-query-optimization/scenarios/level-3/parallel-query-execution.yaml +74 -0
  130. package/courses/postgresql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +71 -0
  131. package/courses/postgresql-query-optimization/scenarios/level-3/specialized-index-types.yaml +67 -0
  132. package/courses/postgresql-query-optimization/scenarios/level-3/write-optimization.yaml +65 -0
  133. package/courses/postgresql-query-optimization/scenarios/level-4/data-architecture-analytics.yaml +64 -0
  134. package/courses/postgresql-query-optimization/scenarios/level-4/database-executive-communication.yaml +64 -0
  135. package/courses/postgresql-query-optimization/scenarios/level-4/database-migration-planning.yaml +57 -0
  136. package/courses/postgresql-query-optimization/scenarios/level-4/enterprise-database-governance.yaml +52 -0
  137. package/courses/postgresql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +73 -0
  138. package/courses/postgresql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +62 -0
  139. package/courses/postgresql-query-optimization/scenarios/level-4/optimizer-internals.yaml +69 -0
  140. package/courses/postgresql-query-optimization/scenarios/level-4/performance-sla-design.yaml +58 -0
  141. package/courses/postgresql-query-optimization/scenarios/level-4/read-replica-optimization.yaml +62 -0
  142. package/courses/postgresql-query-optimization/scenarios/level-4/vendor-evaluation.yaml +73 -0
  143. package/courses/rest-api-error-handling/course.yaml +11 -0
  144. package/courses/rest-api-error-handling/scenarios/level-1/authentication-errors.yaml +71 -0
  145. package/courses/rest-api-error-handling/scenarios/level-1/content-negotiation-errors.yaml +63 -0
  146. package/courses/rest-api-error-handling/scenarios/level-1/error-logging-basics.yaml +63 -0
  147. package/courses/rest-api-error-handling/scenarios/level-1/error-response-format.yaml +58 -0
  148. package/courses/rest-api-error-handling/scenarios/level-1/first-error-handling-shift.yaml +67 -0
  149. package/courses/rest-api-error-handling/scenarios/level-1/http-status-codes.yaml +46 -0
  150. package/courses/rest-api-error-handling/scenarios/level-1/not-found-errors.yaml +52 -0
  151. package/courses/rest-api-error-handling/scenarios/level-1/rate-limiting-errors.yaml +56 -0
  152. package/courses/rest-api-error-handling/scenarios/level-1/request-validation-errors.yaml +59 -0
  153. package/courses/rest-api-error-handling/scenarios/level-1/server-error-handling.yaml +55 -0
  154. package/courses/rest-api-error-handling/scenarios/level-2/api-versioning-errors.yaml +66 -0
  155. package/courses/rest-api-error-handling/scenarios/level-2/batch-request-errors.yaml +61 -0
  156. package/courses/rest-api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +52 -0
  157. package/courses/rest-api-error-handling/scenarios/level-2/error-code-taxonomy.yaml +62 -0
  158. package/courses/rest-api-error-handling/scenarios/level-2/error-monitoring-alerting.yaml +53 -0
  159. package/courses/rest-api-error-handling/scenarios/level-2/intermediate-error-shift.yaml +69 -0
  160. package/courses/rest-api-error-handling/scenarios/level-2/pagination-errors.yaml +66 -0
  161. package/courses/rest-api-error-handling/scenarios/level-2/retry-and-idempotency.yaml +60 -0
  162. package/courses/rest-api-error-handling/scenarios/level-2/rfc7807-problem-details.yaml +60 -0
  163. package/courses/rest-api-error-handling/scenarios/level-2/webhook-error-handling.yaml +55 -0
  164. package/courses/rest-api-error-handling/scenarios/level-3/advanced-error-shift.yaml +72 -0
  165. package/courses/rest-api-error-handling/scenarios/level-3/api-gateway-errors.yaml +71 -0
  166. package/courses/rest-api-error-handling/scenarios/level-3/async-api-errors.yaml +67 -0
  167. package/courses/rest-api-error-handling/scenarios/level-3/caching-error-scenarios.yaml +65 -0
  168. package/courses/rest-api-error-handling/scenarios/level-3/chaos-engineering-apis.yaml +62 -0
  169. package/courses/rest-api-error-handling/scenarios/level-3/database-error-handling.yaml +79 -0
  170. package/courses/rest-api-error-handling/scenarios/level-3/distributed-error-propagation.yaml +63 -0
  171. package/courses/rest-api-error-handling/scenarios/level-3/error-budgets-sre.yaml +61 -0
  172. package/courses/rest-api-error-handling/scenarios/level-3/error-correlation.yaml +58 -0
  173. package/courses/rest-api-error-handling/scenarios/level-3/graphql-vs-rest-errors.yaml +73 -0
  174. package/courses/rest-api-error-handling/scenarios/level-4/compliance-error-handling.yaml +65 -0
  175. package/courses/rest-api-error-handling/scenarios/level-4/enterprise-error-governance.yaml +62 -0
  176. package/courses/rest-api-error-handling/scenarios/level-4/error-analytics-platform.yaml +65 -0
  177. package/courses/rest-api-error-handling/scenarios/level-4/error-cost-optimization.yaml +63 -0
  178. package/courses/rest-api-error-handling/scenarios/level-4/error-executive-communication.yaml +60 -0
  179. package/courses/rest-api-error-handling/scenarios/level-4/error-handling-architecture.yaml +67 -0
  180. package/courses/rest-api-error-handling/scenarios/level-4/error-org-design.yaml +68 -0
  181. package/courses/rest-api-error-handling/scenarios/level-4/error-sla-design.yaml +65 -0
  182. package/courses/rest-api-error-handling/scenarios/level-4/error-training-program.yaml +61 -0
  183. package/courses/rest-api-error-handling/scenarios/level-4/expert-error-shift.yaml +63 -0
  184. package/courses/rest-api-error-handling/scenarios/level-5/comprehensive-error-system.yaml +68 -0
  185. package/courses/rest-api-error-handling/scenarios/level-5/error-ai-future.yaml +75 -0
  186. package/courses/rest-api-error-handling/scenarios/level-5/error-behavioral-science.yaml +73 -0
  187. package/courses/rest-api-error-handling/scenarios/level-5/error-board-strategy.yaml +60 -0
  188. package/courses/rest-api-error-handling/scenarios/level-5/error-consulting-engagement.yaml +58 -0
  189. package/courses/rest-api-error-handling/scenarios/level-5/error-industry-benchmarks.yaml +72 -0
  190. package/courses/rest-api-error-handling/scenarios/level-5/error-ma-integration.yaml +68 -0
  191. package/courses/rest-api-error-handling/scenarios/level-5/error-product-development.yaml +66 -0
  192. package/courses/rest-api-error-handling/scenarios/level-5/error-regulatory-landscape.yaml +80 -0
  193. package/courses/rest-api-error-handling/scenarios/level-5/master-error-shift.yaml +73 -0
  194. package/dist/cli/commands/add.d.ts.map +1 -1
  195. package/dist/cli/commands/add.js +6 -5
  196. package/dist/cli/commands/add.js.map +1 -1
  197. package/dist/cli/commands/generate.d.ts.map +1 -1
  198. package/dist/cli/commands/generate.js +4 -0
  199. package/dist/cli/commands/generate.js.map +1 -1
  200. package/dist/cli/commands/list.d.ts.map +1 -1
  201. package/dist/cli/commands/list.js +6 -18
  202. package/dist/cli/commands/list.js.map +1 -1
  203. package/dist/cli/commands/train.d.ts.map +1 -1
  204. package/dist/cli/commands/train.js +18 -18
  205. package/dist/cli/commands/train.js.map +1 -1
  206. package/dist/cli/index.js +93 -55
  207. package/dist/cli/index.js.map +1 -1
  208. package/dist/cli/run-demo.js +2 -1
  209. package/dist/cli/run-demo.js.map +1 -1
  210. package/dist/cli/setup.d.ts +18 -0
  211. package/dist/cli/setup.d.ts.map +1 -0
  212. package/dist/cli/setup.js +154 -0
  213. package/dist/cli/setup.js.map +1 -0
  214. package/dist/engine/agent-bridge.d.ts +5 -2
  215. package/dist/engine/agent-bridge.d.ts.map +1 -1
  216. package/dist/engine/agent-bridge.js +36 -9
  217. package/dist/engine/agent-bridge.js.map +1 -1
  218. package/dist/engine/loader.d.ts +21 -0
  219. package/dist/engine/loader.d.ts.map +1 -1
  220. package/dist/engine/loader.js +54 -1
  221. package/dist/engine/loader.js.map +1 -1
  222. package/dist/engine/training-loop.d.ts.map +1 -1
  223. package/dist/engine/training-loop.js +1 -0
  224. package/dist/engine/training-loop.js.map +1 -1
  225. package/dist/engine/training.d.ts.map +1 -1
  226. package/dist/engine/training.js +1 -0
  227. package/dist/engine/training.js.map +1 -1
  228. package/dist/generator/skill-generator.d.ts +1 -1
  229. package/dist/generator/skill-generator.d.ts.map +1 -1
  230. package/dist/generator/skill-generator.js +21 -2
  231. package/dist/generator/skill-generator.js.map +1 -1
  232. package/dist/mcp/server.d.ts.map +1 -1
  233. package/dist/mcp/server.js +11 -26
  234. package/dist/mcp/server.js.map +1 -1
  235. package/dist/mcp/session-manager.d.ts +3 -1
  236. package/dist/mcp/session-manager.d.ts.map +1 -1
  237. package/dist/mcp/session-manager.js +44 -22
  238. package/dist/mcp/session-manager.js.map +1 -1
  239. package/dist/types/schemas.d.ts +38 -13
  240. package/dist/types/schemas.d.ts.map +1 -1
  241. package/dist/types/schemas.js +9 -5
  242. package/dist/types/schemas.js.map +1 -1
  243. package/package.json +1 -1
@@ -0,0 +1,211 @@
1
+ name: "Webhook Error Handling and Retry Logic"
2
+ level: 2
3
+ difficulty: intermediate
4
+ description: "Implement webhook delivery with exponential backoff retry strategy and dead letter queues"
5
+
6
+ context: |
7
+ Build a webhook delivery system for payment events. Handle failed deliveries with
8
+ exponential backoff, respect HTTP error codes (don't retry 4xx), and move permanently
9
+ failed webhooks to dead letter queue for inspection.
10
+
11
+ scenario:
12
+ state:
13
+ webhooks:
14
+ "wh_payment_complete":
15
+ url: "https://customer-1.example.com/webhooks/payments"
16
+ status: "active"
17
+ retry_count: 0
18
+ last_attempt: null
19
+ events:
20
+ "evt_001": { type: "payment.completed", customer_id: "cust_1", status: "pending" }
21
+ "evt_002": { type: "payment.completed", customer_id: "cust_2", status: "pending" }
22
+ webhook_endpoints:
23
+ "https://customer-1.example.com/webhooks/payments":
24
+ response_status: 500
25
+ consecutive_failures: 0
26
+ "https://customer-2.example.com/webhooks/payments":
27
+ response_status: 404
28
+ consecutive_failures: 0
29
+
30
+ endpoint: "Internal: Webhook Delivery System"
31
+
32
+ test_cases:
33
+ - name: "successful_webhook_delivery"
34
+ event: "evt_001"
35
+ webhook_url: "https://customer-1.example.com/webhooks/payments"
36
+ endpoint_status: 200
37
+ expected_result: "delivered"
38
+ expected_retry_count: 0
39
+
40
+ - name: "temporary_failure_retry"
41
+ event: "evt_001"
42
+ webhook_url: "https://customer-1.example.com/webhooks/payments"
43
+ endpoint_status: 503
44
+ retry_strategy: "exponential_backoff"
45
+ expected_retries:
46
+ - attempt: 1
47
+ delay: 1
48
+ endpoint_status: 503
49
+ - attempt: 2
50
+ delay: 5
51
+ endpoint_status: 503
52
+ - attempt: 3
53
+ delay: 30
54
+ endpoint_status: 200
55
+ result: "delivered"
56
+
57
+ - name: "timeout_is_retriable"
58
+ event: "evt_001"
59
+ webhook_url: "https://customer-1.example.com/webhooks/payments"
60
+ endpoint_behavior: "timeout"
61
+ endpoint_timeout_ms: 35000
62
+ expected_retries:
63
+ - attempt: 1
64
+ delay: 1
65
+ result: "timeout"
66
+ - attempt: 2
67
+ delay: 5
68
+ result: "timeout"
69
+ - attempt: 3
70
+ delay: 30
71
+ endpoint_status: 200
72
+ result: "delivered"
73
+
74
+ - name: "404_not_found_not_retried"
75
+ event: "evt_001"
76
+ webhook_url: "https://nonexistent.example.com/webhooks/payments"
77
+ endpoint_status: 404
78
+ expected_retries: 0
79
+ expected_result: "dead_letter_queue"
80
+ expected_reason: "endpoint_not_found"
81
+
82
+ - name: "401_unauthorized_not_retried"
83
+ event: "evt_001"
84
+ webhook_url: "https://customer-2.example.com/webhooks/payments"
85
+ endpoint_status: 401
86
+ expected_retries: 0
87
+ expected_result: "dead_letter_queue"
88
+ expected_reason: "authorization_failed"
89
+
90
+ - name: "400_bad_request_not_retried"
91
+ event: "evt_001"
92
+ webhook_url: "https://customer-3.example.com/webhooks/payments"
93
+ endpoint_status: 400
94
+ expected_retries: 0
95
+ expected_result: "dead_letter_queue"
96
+ expected_reason: "malformed_request"
97
+
98
+ - name: "max_retries_exceeded"
99
+ event: "evt_001"
100
+ webhook_url: "https://customer-1.example.com/webhooks/payments"
101
+ endpoint_status: 502
102
+ max_retries: 5
103
+ expected_retries:
104
+ - attempt: 1
105
+ delay: 1
106
+ endpoint_status: 502
107
+ - attempt: 2
108
+ delay: 5
109
+ endpoint_status: 502
110
+ - attempt: 3
111
+ delay: 30
112
+ endpoint_status: 502
113
+ - attempt: 4
114
+ delay: 120
115
+ endpoint_status: 502
116
+ - attempt: 5
117
+ delay: 300
118
+ endpoint_status: 502
119
+ expected_result: "dead_letter_queue"
120
+ expected_reason: "max_retries_exceeded"
121
+
122
+ - name: "jitter_prevents_thundering_herd"
123
+ events_count: 100
124
+ all_failing: true
125
+ retry_schedule: "exponential_with_jitter"
126
+ expected_behavior: "retry_attempts_spread_across_time"
127
+
128
+ - name: "idempotency_prevents_duplicates"
129
+ event: "evt_001"
130
+ webhook_url: "https://customer-1.example.com/webhooks/payments"
131
+ attempt_1_result: "timeout"
132
+ attempt_1_delivered: true
133
+ attempt_2_result: 200
134
+ expected_behavior: "idempotent_delivery (delivered once)"
135
+
136
+ assertions:
137
+ - type: "api_called"
138
+ description: "Webhook called with event payload"
139
+ test: "webhook POST includes event data"
140
+
141
+ - type: "api_called"
142
+ description: "5xx errors are retried"
143
+ test: "502/503 errors trigger retry"
144
+
145
+ - type: "api_called"
146
+ description: "4xx errors are not retried"
147
+ test: "404/401/400 moved to dead letter queue"
148
+
149
+ - type: "outcome"
150
+ description: "Exponential backoff used"
151
+ test: "retry delays follow: 1s, 5s, 30s, 120s, 300s"
152
+
153
+ - type: "api_called"
154
+ description: "Jitter added to prevent thundering herd"
155
+ test: "retry_schedule uses jitter"
156
+
157
+ - type: "api_called"
158
+ description: "Dead letter queue stores permanently failed"
159
+ test: "max_retries_exceeded moves to DLQ"
160
+
161
+ - type: "outcome"
162
+ description: "Idempotent delivery"
163
+ test: "webhook called once despite retries"
164
+
165
+ learning_objectives:
166
+ - "Understand transient vs permanent webhook failures"
167
+ - "Implement exponential backoff retry strategy"
168
+ - "Distinguish retriable (5xx) vs non-retriable (4xx) errors"
169
+ - "Add jitter to prevent synchronized retries"
170
+ - "Implement dead letter queue for manual inspection"
171
+ - "Track retry attempts and timing"
172
+ - "Handle webhook idempotency"
173
+
174
+ retry_strategy:
175
+ "retriable_status_codes": [408, 429, 500, 502, 503, 504]
176
+ "non_retriable_status_codes": [400, 401, 403, 404, 405, 410]
177
+ "transient_failures": ["timeout", "connection_reset", "dns_failure"]
178
+ "backoff_pattern": "exponential: 1s, 5s, 30s, 120s, 300s"
179
+ "max_attempts": 5
180
+ "jitter": "random 0-10% of delay"
181
+
182
+ headers:
183
+ "X-Webhook-ID": "Unique webhook endpoint identifier"
184
+ "X-Event-ID": "Unique event identifier for idempotency"
185
+ "X-Delivery-Attempt": "Attempt number (1, 2, 3, ...)"
186
+ "X-Webhook-Signature": "HMAC signature for verification"
187
+
188
+ dead_letter_queue:
189
+ "storage": "Separate database table or queue"
190
+ "retention": "30 days minimum for inspection"
191
+ "alerting": "Alert ops team after 10 DLQ entries"
192
+ "manual_retry": "Allow manual redelivery from UI"
193
+
194
+ monitoring:
195
+ "metrics":
196
+ - "delivery_success_rate"
197
+ - "delivery_latency_p50/p95/p99"
198
+ - "retry_count_distribution"
199
+ - "dlq_entries_rate"
200
+ "alerts":
201
+ - "delivery_success_rate < 95%"
202
+ - "dlq_entries > 100 in 1 hour"
203
+
204
+ common_mistakes:
205
+ - "Retrying 404 Not Found (never succeeds)"
206
+ - "No exponential backoff (overwhelming server)"
207
+ - "No jitter (thundering herd effect)"
208
+ - "Unbounded retries (never gives up)"
209
+ - "Not idempotent (duplicate deliveries)"
210
+ - "No dead letter queue (lost events)"
211
+ - "Not respecting Retry-After header"
@@ -0,0 +1,275 @@
1
+ name: "Distributed Tracing and Error Correlation"
2
+ level: 3
3
+ difficulty: advanced
4
+ description: "Track errors across multiple services using correlation IDs and distributed tracing"
5
+
6
+ context: |
7
+ Build a microservice system where a single user request flows through Order Service
8
+ → Payment Service → Shipping Service. Implement distributed tracing with correlation
9
+ IDs to track errors across all services and perform root cause analysis.
10
+
11
+ scenario:
12
+ state:
13
+ services:
14
+ order_service:
15
+ url: "http://order-api:3000"
16
+ status: "healthy"
17
+ payment_service:
18
+ url: "http://payment-api:3001"
19
+ status: "healthy"
20
+ shipping_service:
21
+ url: "http://shipping-api:3002"
22
+ status: "healthy"
23
+ orders:
24
+ "ord_001": { customer_id: "cust_1", total: 100, status: "pending" }
25
+
26
+ endpoint: "POST /api/v1/orders"
27
+
28
+ test_cases:
29
+ - name: "successful_order_with_trace"
30
+ request:
31
+ path: "/api/v1/orders"
32
+ body: { customer_id: "cust_1", items: ["item_1"] }
33
+ headers:
34
+ X-Correlation-ID: "trace_123"
35
+ service_calls:
36
+ - service: "order_service"
37
+ action: "create_order"
38
+ status: 201
39
+ trace_id: "trace_123"
40
+ span_id: "span_order_1"
41
+ duration_ms: 50
42
+ - service: "payment_service"
43
+ action: "charge_card"
44
+ status: 200
45
+ trace_id: "trace_123"
46
+ parent_span: "span_order_1"
47
+ span_id: "span_payment_1"
48
+ duration_ms: 200
49
+ - service: "shipping_service"
50
+ action: "create_shipment"
51
+ status: 201
52
+ trace_id: "trace_123"
53
+ parent_span: "span_order_1"
54
+ span_id: "span_shipping_1"
55
+ duration_ms: 100
56
+ expected_response:
57
+ status: 201
58
+ order_id: "ord_002"
59
+ expected_trace:
60
+ spans:
61
+ - span_order_1: "50ms"
62
+ - span_payment_1: "200ms"
63
+ - span_shipping_1: "100ms"
64
+ total_time: "350ms"
65
+
66
+ - name: "payment_service_timeout_traced"
67
+ request:
68
+ path: "/api/v1/orders"
69
+ body: { customer_id: "cust_1", items: ["item_1"] }
70
+ headers:
71
+ X-Correlation-ID: "trace_456"
72
+ service_calls:
73
+ - service: "order_service"
74
+ action: "create_order"
75
+ status: 201
76
+ trace_id: "trace_456"
77
+ span_id: "span_order_2"
78
+ duration_ms: 50
79
+ - service: "payment_service"
80
+ action: "charge_card"
81
+ status: 504
82
+ error: "gateway_timeout"
83
+ trace_id: "trace_456"
84
+ parent_span: "span_order_2"
85
+ span_id: "span_payment_2"
86
+ duration_ms: 30000
87
+ error_details:
88
+ message: "Payment processing took too long"
89
+ timeout_ms: 30000
90
+ expected_response:
91
+ status: 502
92
+ error:
93
+ code: "PAYMENT_SERVICE_UNAVAILABLE"
94
+ correlation_id: "trace_456"
95
+ distributed_trace:
96
+ spans:
97
+ - name: "POST /orders"
98
+ service: "order_service"
99
+ span_id: "span_order_2"
100
+ status: "error"
101
+ - name: "POST /charges"
102
+ service: "payment_service"
103
+ parent_span: "span_order_2"
104
+ span_id: "span_payment_2"
105
+ status: "error"
106
+ error_type: "timeout"
107
+
108
+ - name: "cascading_failure_visible_in_trace"
109
+ request:
110
+ path: "/api/v1/orders"
111
+ body: { customer_id: "cust_1", items: ["item_1"] }
112
+ headers:
113
+ X-Correlation-ID: "trace_789"
114
+ service_calls:
115
+ - service: "order_service"
116
+ action: "create_order"
117
+ status: 201
118
+ trace_id: "trace_789"
119
+ span_id: "span_order_3"
120
+ - service: "payment_service"
121
+ action: "charge_card"
122
+ status: 500
123
+ trace_id: "trace_789"
124
+ parent_span: "span_order_3"
125
+ span_id: "span_payment_3"
126
+ error: "database_connection_failed"
127
+ - service: "shipping_service"
128
+ action: "create_shipment"
129
+ status: 500
130
+ trace_id: "trace_789"
131
+ parent_span: "span_order_3"
132
+ span_id: "span_shipping_3"
133
+ error: "order_not_confirmed"
134
+ expected_response:
135
+ status: 502
136
+ distributed_trace:
137
+ critical_path: "trace_789 → order_service fails payment → shipping can't proceed"
138
+ error_summary: "Payment service database unavailable, causing cascade"
139
+
140
+ - name: "error_context_preserved_across_services"
141
+ request:
142
+ path: "/api/v1/orders"
143
+ headers:
144
+ X-Correlation-ID: "trace_101"
145
+ X-Request-ID: "req_101"
146
+ X-User-ID: "user_123"
147
+ propagated_headers:
148
+ - service: "order_service"
149
+ headers: { X-Correlation-ID: "trace_101", X-Request-ID: "req_101", X-User-ID: "user_123" }
150
+ - service: "payment_service"
151
+ headers: { X-Correlation-ID: "trace_101", X-Request-ID: "req_101", X-User-ID: "user_123" }
152
+ - service: "shipping_service"
153
+ headers: { X-Correlation-ID: "trace_101", X-Request-ID: "req_101", X-User-ID: "user_123" }
154
+ expected_behavior: "all services log with same correlation ID"
155
+
156
+ - name: "root_cause_analysis_via_trace"
157
+ incident:
158
+ symptom: "Orders taking 30+ seconds"
159
+ correlation_ids: ["trace_111", "trace_112", "trace_113"]
160
+ analysis:
161
+ - step: "1. Review distributed trace"
162
+ finding: "All traces show: order_service 50ms, payment_service 25000ms, shipping_service 5000ms"
163
+ - step: "2. Identify critical path"
164
+ finding: "Payment service is bottleneck"
165
+ - step: "3. Check payment service logs"
166
+ finding: "SELECT * FROM charges WHERE status='processing' returns 10000 rows"
167
+ - step: "4. Check metrics"
168
+ finding: "Database CPU at 95%, pending queries at 10000"
169
+ - step: "5. Root cause"
170
+ finding: "Payment processing queries missing index, causing full table scans"
171
+ - step: "6. Solution"
172
+ action: "Add index on charges(status, created_at)"
173
+
174
+ - name: "trace_context_loss_error"
175
+ request:
176
+ path: "/api/v1/orders"
177
+ headers:
178
+ X-Correlation-ID: "trace_202"
179
+ service_calls:
180
+ - service: "order_service"
181
+ trace_id: "trace_202"
182
+ passes_header: true
183
+ - service: "payment_service"
184
+ trace_id: "trace_202"
185
+ passes_header: false # Bug: forgot to propagate
186
+ implicit_trace: "span_payment_lost"
187
+ expected_problem: "Payment service error not correlated with order trace"
188
+ solution: "Add middleware to always propagate X-Correlation-ID"
189
+
190
+ assertions:
191
+ - type: "api_called"
192
+ description: "Correlation ID propagated to all services"
193
+ test: "X-Correlation-ID passed through service chain"
194
+
195
+ - type: "api_called"
196
+ description: "Trace IDs captured in logs"
197
+ test: "all log entries include trace_id"
198
+
199
+ - type: "outcome"
200
+ description: "Error path visible in distributed trace"
201
+ test: "trace shows which service failed and why"
202
+
203
+ - type: "api_called"
204
+ description: "Timing data collected per service"
205
+ test: "trace includes duration for each span"
206
+
207
+ - type: "outcome"
208
+ description: "Root cause identifiable from trace"
209
+ test: "cascading_failure_visible_in_trace shows error progression"
210
+
211
+ learning_objectives:
212
+ - "Understand importance of correlation IDs in microservices"
213
+ - "Implement trace ID propagation across service calls"
214
+ - "Collect span timing for performance analysis"
215
+ - "Correlate logs across multiple services"
216
+ - "Identify root cause from distributed traces"
217
+ - "Detect cascading failures in real-time"
218
+ - "Perform effective post-mortem analysis"
219
+
220
+ correlation_headers:
221
+ "X-Correlation-ID": "Unique ID for entire request"
222
+ "X-Request-ID": "Specific request identifier"
223
+ "X-Trace-ID": "OpenTelemetry trace ID"
224
+ "X-Span-ID": "OpenTelemetry span ID"
225
+ "X-Parent-Span-ID": "Parent span for nesting"
226
+
227
+ trace_structure:
228
+ "trace_id": "abc123def456"
229
+ "spans":
230
+ - "span_id": "span_order_1"
231
+ "operation": "create_order"
232
+ "service": "order_service"
233
+ "start_time": "2024-01-01T10:00:00.000Z"
234
+ "duration_ms": 50
235
+ "status": "OK"
236
+ "child_spans": ["span_payment_1", "span_shipping_1"]
237
+ - "span_id": "span_payment_1"
238
+ "operation": "charge_card"
239
+ "service": "payment_service"
240
+ "start_time": "2024-01-01T10:00:00.050Z"
241
+ "duration_ms": 200
242
+ "status": "OK"
243
+ "parent_span": "span_order_1"
244
+
245
+ tools:
246
+ "OpenTelemetry": "Standard instrumentation library"
247
+ "Jaeger": "Distributed tracing backend"
248
+ "Zipkin": "Alternative tracing system"
249
+ "Datadog APM": "Commercial observability"
250
+ "AWS X-Ray": "AWS distributed tracing"
251
+ "Google Cloud Trace": "GCP tracing"
252
+
253
+ common_mistakes:
254
+ - "Not propagating correlation ID to called services"
255
+ - "No trace ID in error messages"
256
+ - "Losing context in async operations"
257
+ - "Not collecting timing data"
258
+ - "Insufficient log detail for debugging"
259
+ - "No central trace storage"
260
+ - "Can't query traces by error type"
261
+
262
+ post_mortem_example: |
263
+ Timeline:
264
+ 10:00:00 - Order received (trace_abc)
265
+ 10:00:00 - Order created in order_service (50ms)
266
+ 10:00:00 - Payment service called
267
+ 10:00:25 - Payment timeout after 25 seconds
268
+ 10:00:25 - Shipping service never called
269
+ 10:00:25 - 502 Bad Gateway returned
270
+
271
+ Trace shows: Payment service database locked
272
+ Root cause: Concurrent deployment and query
273
+ Fix: Add connection pooling, query timeout
274
+
275
+ Prevention: Monitor query latency in traces
@@ -0,0 +1,10 @@
1
+ id: github-actions-cicd
2
+ name: "GitHub Actions CI/CD Setup"
3
+ description: >
4
+ Master GitHub Actions for continuous integration and continuous
5
+ deployment. Learn workflow syntax, triggers, runners, caching,
6
+ matrix builds, reusable workflows, security hardening, deployment
7
+ strategies, self-hosted runners, and enterprise CI/CD operations.
8
+ levels: 5
9
+ scenarios_per_level: 10
10
+ tags: [development, GitHub, actions, CI/CD, automation, deployment, DevOps]
@@ -0,0 +1,58 @@
1
+ meta:
2
+ id: actions-and-runners
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Use actions and runners — understand GitHub-hosted runners, marketplace actions, and how to compose steps effectively"
7
+ tags: [github, actions, runners, marketplace, setup-actions, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're building a CI workflow for a full-stack TypeScript project
13
+ (React frontend + Express backend) and need to understand how to use
14
+ actions and runners effectively.
15
+
16
+ The project needs:
17
+ - Node.js 20 for the application
18
+ - PostgreSQL for integration tests
19
+ - Redis for caching tests
20
+ - The workflow should work on both ubuntu-latest and macos-latest
21
+ - Artifacts: upload test coverage reports and build output
22
+
23
+ Your teammate has questions about actions and runners:
24
+
25
+ Question 1: "What's the difference between 'uses' and 'run' in a
26
+ step? When should I use each?"
27
+
28
+ Question 2: "I see actions like 'actions/checkout@v4' — what does
29
+ the @v4 mean? Should I use @v4, @main, or a specific SHA?"
30
+
31
+ Question 3: "How do I add PostgreSQL and Redis as services in my
32
+ workflow? I heard you can run Docker containers alongside your job."
33
+
34
+ Question 4: "What are the resource limits of GitHub-hosted runners?
35
+ When would we need self-hosted runners?"
36
+
37
+ Question 5: "How do I share files between jobs? My build job
38
+ produces artifacts that the deploy job needs."
39
+
40
+ Task: Write a complete workflow that demonstrates: using marketplace
41
+ actions (checkout, setup-node, upload-artifact, download-artifact),
42
+ service containers (PostgreSQL and Redis), multi-OS matrix, and
43
+ artifact sharing between jobs. Answer all 5 questions with practical
44
+ examples from the workflow you wrote.
45
+
46
+ assertions:
47
+ - type: llm_judge
48
+ criteria: "Workflow correctly uses service containers — PostgreSQL and Redis are defined as services with proper image, ports, env vars, and health checks. The application connects to services using localhost or service names correctly"
49
+ weight: 0.35
50
+ description: "Correct service container configuration"
51
+ - type: llm_judge
52
+ criteria: "All 5 questions are answered accurately — uses vs run distinction, action versioning (@v4 vs SHA pinning with security trade-offs), service containers syntax, runner resource limits (7GB RAM, 14GB SSD, 2 CPU for ubuntu), and artifact upload/download for cross-job file sharing"
53
+ weight: 0.35
54
+ description: "Accurate answers to all questions"
55
+ - type: llm_judge
56
+ criteria: "Workflow demonstrates practical patterns — multi-OS matrix, artifact upload in build job and download in deploy job, proper action version pinning, and the workflow would run successfully in a real repository"
57
+ weight: 0.30
58
+ description: "Practical workflow patterns"
@@ -0,0 +1,52 @@
1
+ meta:
2
+ id: basic-workflow-syntax
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Write basic GitHub Actions workflows — learn YAML structure, jobs, steps, and runners to create your first CI pipeline"
7
+ tags: [github, actions, workflow, YAML, CI, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're setting up GitHub Actions for a new Node.js project for the
13
+ first time. The team needs a CI workflow that runs on every push and
14
+ pull request. The project uses Node.js 20, npm for package management,
15
+ and has lint, test, and build scripts defined in package.json.
16
+
17
+ Requirements:
18
+ 1. File location: .github/workflows/ci.yml
19
+ 2. Triggers: push to main branch AND all pull requests
20
+ 3. Runner: ubuntu-latest
21
+ 4. Steps needed:
22
+ - Check out the repository code
23
+ - Set up Node.js 20
24
+ - Install dependencies with npm ci
25
+ - Run linting (npm run lint)
26
+ - Run tests (npm test)
27
+ - Build the project (npm run build)
28
+ 5. Include a descriptive workflow name
29
+ 6. Set NODE_ENV=test as an environment variable for the test step
30
+
31
+ Additionally, a teammate asks these questions:
32
+ - "What's the difference between 'npm install' and 'npm ci' in CI?"
33
+ - "Why do we use 'actions/checkout@v4' instead of just cloning?"
34
+ - "Should lint, test, and build be separate jobs or steps in one job?"
35
+
36
+ Task: Write the complete workflow YAML file and answer all 3 questions.
37
+ Explain the purpose of each section of the workflow (name, on, jobs,
38
+ steps) and note any best practices you're following.
39
+
40
+ assertions:
41
+ - type: llm_judge
42
+ criteria: "Workflow YAML is correct and complete — proper indentation, name/on/jobs structure, correct trigger syntax for push (main) and pull_request, uses actions/checkout@v4 and actions/setup-node@v4 with node-version: 20, all 6 steps present, NODE_ENV set correctly"
43
+ weight: 0.35
44
+ description: "Correct and complete workflow YAML"
45
+ - type: llm_judge
46
+ criteria: "Questions are answered accurately — npm ci vs npm install (ci uses lockfile, faster, clean install), actions/checkout provides optimized shallow clone with auth token, and the single-job-vs-multiple-jobs trade-off is explained (single job is simpler for small projects, multiple jobs allow parallelism)"
47
+ weight: 0.35
48
+ description: "Accurate question answers"
49
+ - type: llm_judge
50
+ criteria: "Best practices are explained — why npm ci is preferred in CI, why action versions should be pinned, why ubuntu-latest is the default choice, and each workflow section is explained clearly for someone new to GitHub Actions"
51
+ weight: 0.30
52
+ description: "Best practices explanation"
@@ -0,0 +1,63 @@
1
+ meta:
2
+ id: branch-protection-checks
3
+ level: 1
4
+ course: github-actions-cicd
5
+ type: output
6
+ description: "Set up branch protection with status checks — configure required CI checks that must pass before merging PRs"
7
+ tags: [github, actions, branch-protection, status-checks, merge-requirements, basics]
8
+
9
+ state: {}
10
+
11
+ trigger: |
12
+ You're the tech lead setting up branch protection for your team's
13
+ repository. Currently, anyone can push directly to main and merge
14
+ PRs without CI passing. After a broken deployment last week, the
15
+ team agreed to enforce CI checks.
16
+
17
+ Repository setup:
18
+ - Main branch: production deployments happen from here
19
+ - Develop branch: integration branch for features
20
+ - Feature branches: individual developer work
21
+
22
+ CI workflow (already exists):
23
+ - Job "lint": ESLint + TypeScript checks
24
+ - Job "test": Jest unit tests
25
+ - Job "e2e": Cypress E2E tests (sometimes flaky)
26
+ - Job "build": Production build
27
+
28
+ Requirements:
29
+ 1. No direct pushes to main (all changes via PR)
30
+ 2. At least 1 code review approval required
31
+ 3. Required status checks before merging:
32
+ - lint must pass (always)
33
+ - test must pass (always)
34
+ - build must pass (always)
35
+ - e2e should be required but has a 10% flaky failure rate
36
+ 4. Dismiss stale reviews when new commits are pushed
37
+ 5. Require branches to be up to date with main before merging
38
+ 6. Allow repository admins to bypass in emergencies
39
+
40
+ The team debates:
41
+ - "Should we make e2e tests required if they're flaky?"
42
+ - "What about hotfixes — do we need a fast path?"
43
+ - "How do we handle merge conflicts with 'require up to date'?"
44
+
45
+ Task: Write the complete branch protection configuration (as you
46
+ would set it in GitHub Settings or via the API), address the 3 team
47
+ debates with recommendations, explain how status checks interact
48
+ with GitHub Actions job names, and describe the developer workflow
49
+ under these new rules (from creating a branch to merging a PR).
50
+
51
+ assertions:
52
+ - type: llm_judge
53
+ criteria: "Branch protection config is complete — requires PR, required reviewers (1), dismisses stale reviews, requires status checks (lint, test, build), requires branch up-to-date, and admin bypass is configured. The config is expressed clearly (either UI steps or API payload)"
54
+ weight: 0.35
55
+ description: "Complete branch protection config"
56
+ - type: llm_judge
57
+ criteria: "Team debates are resolved pragmatically — the flaky e2e question gets a nuanced answer (make required but add retry, or make non-required but track), hotfix fast-path is defined (admin bypass with post-merge review), and merge conflict mitigation is addressed (merge queue or frequent rebasing)"
58
+ weight: 0.35
59
+ description: "Pragmatic debate resolution"
60
+ - type: llm_judge
61
+ criteria: "Status check naming is explained — clarifies that required checks match job names in the workflow YAML, explains what happens when a workflow is skipped (path filters), and the developer workflow is described step-by-step from branch creation to merge"
62
+ weight: 0.30
63
+ description: "Clear status check and workflow explanation"