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.
- package/courses/GENERATION_LOG.md +27 -0
- package/courses/api-error-handling/course.yaml +16 -0
- package/courses/api-error-handling/scenarios/level-1/error-response-format.yaml +131 -0
- package/courses/api-error-handling/scenarios/level-1/http-status-codes-basics.yaml +90 -0
- package/courses/api-error-handling/scenarios/level-1/rate-limiting-basics.yaml +135 -0
- package/courses/api-error-handling/scenarios/level-1/request-validation-errors.yaml +208 -0
- package/courses/api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +189 -0
- package/courses/api-error-handling/scenarios/level-2/idempotency-retry-logic.yaml +159 -0
- package/courses/api-error-handling/scenarios/level-2/rfc-7807-problem-details.yaml +178 -0
- package/courses/api-error-handling/scenarios/level-2/webhook-error-handling.yaml +211 -0
- package/courses/api-error-handling/scenarios/level-3/distributed-tracing-errors.yaml +275 -0
- package/courses/github-actions-cicd/course.yaml +10 -0
- package/courses/github-actions-cicd/scenarios/level-1/actions-and-runners.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-1/basic-workflow-syntax.yaml +52 -0
- package/courses/github-actions-cicd/scenarios/level-1/branch-protection-checks.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-1/environment-variables-secrets.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-1/first-cicd-shift.yaml +62 -0
- package/courses/github-actions-cicd/scenarios/level-1/job-dependencies-outputs.yaml +62 -0
- package/courses/github-actions-cicd/scenarios/level-1/simple-ci-pipeline.yaml +57 -0
- package/courses/github-actions-cicd/scenarios/level-1/workflow-debugging.yaml +90 -0
- package/courses/github-actions-cicd/scenarios/level-1/workflow-status-notifications.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-1/workflow-triggers.yaml +56 -0
- package/courses/github-actions-cicd/scenarios/level-2/concurrency-control.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-2/conditional-execution.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-2/custom-actions-development.yaml +55 -0
- package/courses/github-actions-cicd/scenarios/level-2/dependency-caching.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-2/deployment-workflows.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-2/github-packages-publishing.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-2/intermediate-cicd-shift.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-2/matrix-builds.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-2/reusable-workflows.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-2/workflow-cost-optimization.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-3/advanced-cicd-shift.yaml +64 -0
- package/courses/github-actions-cicd/scenarios/level-3/compliance-automation.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-3/docker-action-development.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-3/github-environments.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-3/monorepo-ci.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-3/oidc-cloud-deployments.yaml +55 -0
- package/courses/github-actions-cicd/scenarios/level-3/release-automation.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-3/security-hardening.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-3/self-hosted-runners.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-3/workflow-optimization.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-data-architecture.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-economics-roi.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-executive-communication.yaml +58 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-incident-response.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-org-design.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-platform-architecture.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-training-program.yaml +65 -0
- package/courses/github-actions-cicd/scenarios/level-4/cicd-vendor-evaluation.yaml +59 -0
- package/courses/github-actions-cicd/scenarios/level-4/enterprise-cicd-governance.yaml +55 -0
- package/courses/github-actions-cicd/scenarios/level-4/expert-cicd-shift.yaml +60 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-ai-future.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-behavioral-science.yaml +70 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-board-strategy.yaml +56 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-consulting-engagement.yaml +61 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-industry-benchmarks.yaml +63 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-ma-integration.yaml +73 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-product-development.yaml +68 -0
- package/courses/github-actions-cicd/scenarios/level-5/cicd-regulatory-landscape.yaml +72 -0
- package/courses/github-actions-cicd/scenarios/level-5/comprehensive-cicd-system.yaml +66 -0
- package/courses/github-actions-cicd/scenarios/level-5/master-cicd-shift.yaml +76 -0
- package/courses/github-pr-review/scenarios/level-2/api-change-review.yaml +82 -0
- package/courses/github-pr-review/scenarios/level-2/automated-review-tooling.yaml +53 -0
- package/courses/github-pr-review/scenarios/level-2/cross-team-review.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-2/intermediate-review-shift.yaml +66 -0
- package/courses/github-pr-review/scenarios/level-2/performance-review-patterns.yaml +99 -0
- package/courses/github-pr-review/scenarios/level-2/review-disagreement-resolution.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-2/review-metrics-analysis.yaml +63 -0
- package/courses/github-pr-review/scenarios/level-2/review-turnaround-sla.yaml +54 -0
- package/courses/github-pr-review/scenarios/level-2/stacked-pr-review.yaml +65 -0
- package/courses/github-pr-review/scenarios/level-3/advanced-review-shift.yaml +65 -0
- package/courses/github-pr-review/scenarios/level-3/ai-powered-review.yaml +58 -0
- package/courses/github-pr-review/scenarios/level-3/compliance-review-process.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-3/cross-functional-review.yaml +60 -0
- package/courses/github-pr-review/scenarios/level-3/incident-driven-review.yaml +63 -0
- package/courses/github-pr-review/scenarios/level-3/large-scale-review-operations.yaml +55 -0
- package/courses/github-pr-review/scenarios/level-3/monorepo-review-process.yaml +68 -0
- package/courses/github-pr-review/scenarios/level-3/review-automation-platform.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-3/review-culture-design.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-3/review-data-pipeline.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-4/enterprise-review-operations.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-4/expert-review-shift.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-4/review-data-architecture.yaml +69 -0
- package/courses/github-pr-review/scenarios/level-4/review-economics-roi.yaml +63 -0
- package/courses/github-pr-review/scenarios/level-4/review-executive-communication.yaml +61 -0
- package/courses/github-pr-review/scenarios/level-4/review-incident-postmortem.yaml +69 -0
- package/courses/github-pr-review/scenarios/level-4/review-org-design.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-4/review-platform-architecture.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-4/review-training-program.yaml +66 -0
- package/courses/github-pr-review/scenarios/level-4/review-vendor-evaluation.yaml +76 -0
- package/courses/github-pr-review/scenarios/level-5/comprehensive-review-system.yaml +68 -0
- package/courses/github-pr-review/scenarios/level-5/master-review-shift.yaml +73 -0
- package/courses/github-pr-review/scenarios/level-5/review-ai-future.yaml +69 -0
- package/courses/github-pr-review/scenarios/level-5/review-behavioral-science.yaml +66 -0
- package/courses/github-pr-review/scenarios/level-5/review-board-strategy.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-5/review-consulting-engagement.yaml +62 -0
- package/courses/github-pr-review/scenarios/level-5/review-devtools-product.yaml +71 -0
- package/courses/github-pr-review/scenarios/level-5/review-industry-benchmarks.yaml +64 -0
- package/courses/github-pr-review/scenarios/level-5/review-ma-integration.yaml +76 -0
- package/courses/github-pr-review/scenarios/level-5/review-regulatory-landscape.yaml +78 -0
- package/courses/postgresql-query-optimization/course.yaml +11 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/explain-analyze-basics.yaml +80 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/first-optimization-shift.yaml +77 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/index-fundamentals.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/join-basics.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/n-plus-one-queries.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/query-rewriting-basics.yaml +69 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/select-star-problems.yaml +69 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/slow-query-diagnosis.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/vacuum-and-statistics.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-1/where-clause-optimization.yaml +74 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/autovacuum-tuning.yaml +76 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/composite-index-design.yaml +81 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/covering-indexes.yaml +74 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/cte-optimization.yaml +83 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/intermediate-optimization-shift.yaml +66 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/join-optimization.yaml +72 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/partial-and-expression-indexes.yaml +75 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/query-planner-settings.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/subquery-optimization.yaml +67 -0
- package/courses/postgresql-query-optimization/scenarios/level-2/window-function-optimization.yaml +63 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/advanced-optimization-shift.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/connection-pooling.yaml +60 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/full-text-search-optimization.yaml +66 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/jsonb-optimization.yaml +88 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/lock-contention-analysis.yaml +80 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/materialized-view-optimization.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/parallel-query-execution.yaml +74 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/partitioning-strategies.yaml +71 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/specialized-index-types.yaml +67 -0
- package/courses/postgresql-query-optimization/scenarios/level-3/write-optimization.yaml +65 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/data-architecture-analytics.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/database-executive-communication.yaml +64 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/database-migration-planning.yaml +57 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/enterprise-database-governance.yaml +52 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/expert-optimization-shift.yaml +73 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/high-availability-architecture.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/optimizer-internals.yaml +69 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/performance-sla-design.yaml +58 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/read-replica-optimization.yaml +62 -0
- package/courses/postgresql-query-optimization/scenarios/level-4/vendor-evaluation.yaml +73 -0
- package/courses/rest-api-error-handling/course.yaml +11 -0
- package/courses/rest-api-error-handling/scenarios/level-1/authentication-errors.yaml +71 -0
- package/courses/rest-api-error-handling/scenarios/level-1/content-negotiation-errors.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-1/error-logging-basics.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-1/error-response-format.yaml +58 -0
- package/courses/rest-api-error-handling/scenarios/level-1/first-error-handling-shift.yaml +67 -0
- package/courses/rest-api-error-handling/scenarios/level-1/http-status-codes.yaml +46 -0
- package/courses/rest-api-error-handling/scenarios/level-1/not-found-errors.yaml +52 -0
- package/courses/rest-api-error-handling/scenarios/level-1/rate-limiting-errors.yaml +56 -0
- package/courses/rest-api-error-handling/scenarios/level-1/request-validation-errors.yaml +59 -0
- package/courses/rest-api-error-handling/scenarios/level-1/server-error-handling.yaml +55 -0
- package/courses/rest-api-error-handling/scenarios/level-2/api-versioning-errors.yaml +66 -0
- package/courses/rest-api-error-handling/scenarios/level-2/batch-request-errors.yaml +61 -0
- package/courses/rest-api-error-handling/scenarios/level-2/circuit-breaker-pattern.yaml +52 -0
- package/courses/rest-api-error-handling/scenarios/level-2/error-code-taxonomy.yaml +62 -0
- package/courses/rest-api-error-handling/scenarios/level-2/error-monitoring-alerting.yaml +53 -0
- package/courses/rest-api-error-handling/scenarios/level-2/intermediate-error-shift.yaml +69 -0
- package/courses/rest-api-error-handling/scenarios/level-2/pagination-errors.yaml +66 -0
- package/courses/rest-api-error-handling/scenarios/level-2/retry-and-idempotency.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-2/rfc7807-problem-details.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-2/webhook-error-handling.yaml +55 -0
- package/courses/rest-api-error-handling/scenarios/level-3/advanced-error-shift.yaml +72 -0
- package/courses/rest-api-error-handling/scenarios/level-3/api-gateway-errors.yaml +71 -0
- package/courses/rest-api-error-handling/scenarios/level-3/async-api-errors.yaml +67 -0
- package/courses/rest-api-error-handling/scenarios/level-3/caching-error-scenarios.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-3/chaos-engineering-apis.yaml +62 -0
- package/courses/rest-api-error-handling/scenarios/level-3/database-error-handling.yaml +79 -0
- package/courses/rest-api-error-handling/scenarios/level-3/distributed-error-propagation.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-3/error-budgets-sre.yaml +61 -0
- package/courses/rest-api-error-handling/scenarios/level-3/error-correlation.yaml +58 -0
- package/courses/rest-api-error-handling/scenarios/level-3/graphql-vs-rest-errors.yaml +73 -0
- package/courses/rest-api-error-handling/scenarios/level-4/compliance-error-handling.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-4/enterprise-error-governance.yaml +62 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-analytics-platform.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-cost-optimization.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-executive-communication.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-handling-architecture.yaml +67 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-org-design.yaml +68 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-sla-design.yaml +65 -0
- package/courses/rest-api-error-handling/scenarios/level-4/error-training-program.yaml +61 -0
- package/courses/rest-api-error-handling/scenarios/level-4/expert-error-shift.yaml +63 -0
- package/courses/rest-api-error-handling/scenarios/level-5/comprehensive-error-system.yaml +68 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-ai-future.yaml +75 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-behavioral-science.yaml +73 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-board-strategy.yaml +60 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-consulting-engagement.yaml +58 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-industry-benchmarks.yaml +72 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-ma-integration.yaml +68 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-product-development.yaml +66 -0
- package/courses/rest-api-error-handling/scenarios/level-5/error-regulatory-landscape.yaml +80 -0
- package/courses/rest-api-error-handling/scenarios/level-5/master-error-shift.yaml +73 -0
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +6 -5
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +4 -0
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +6 -18
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/train.d.ts.map +1 -1
- package/dist/cli/commands/train.js +18 -18
- package/dist/cli/commands/train.js.map +1 -1
- package/dist/cli/index.js +93 -55
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/run-demo.js +2 -1
- package/dist/cli/run-demo.js.map +1 -1
- package/dist/cli/setup.d.ts +18 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +154 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/engine/agent-bridge.d.ts +5 -2
- package/dist/engine/agent-bridge.d.ts.map +1 -1
- package/dist/engine/agent-bridge.js +36 -9
- package/dist/engine/agent-bridge.js.map +1 -1
- package/dist/engine/loader.d.ts +21 -0
- package/dist/engine/loader.d.ts.map +1 -1
- package/dist/engine/loader.js +54 -1
- package/dist/engine/loader.js.map +1 -1
- package/dist/engine/training-loop.d.ts.map +1 -1
- package/dist/engine/training-loop.js +1 -0
- package/dist/engine/training-loop.js.map +1 -1
- package/dist/engine/training.d.ts.map +1 -1
- package/dist/engine/training.js +1 -0
- package/dist/engine/training.js.map +1 -1
- package/dist/generator/skill-generator.d.ts +1 -1
- package/dist/generator/skill-generator.d.ts.map +1 -1
- package/dist/generator/skill-generator.js +21 -2
- package/dist/generator/skill-generator.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +11 -26
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session-manager.d.ts +3 -1
- package/dist/mcp/session-manager.d.ts.map +1 -1
- package/dist/mcp/session-manager.js +44 -22
- package/dist/mcp/session-manager.js.map +1 -1
- package/dist/types/schemas.d.ts +38 -13
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +9 -5
- package/dist/types/schemas.js.map +1 -1
- package/package.json +1 -1
|
@@ -441,3 +441,30 @@ Tracks all auto-generated courses for dojo.md.
|
|
|
441
441
|
- **Scenarios**: 50 (10 per level × 5 levels)
|
|
442
442
|
- **Type**: output
|
|
443
443
|
- **Sources**: GitHub Issues documentation, GitHub Projects documentation, GitHub Security Advisories (GHSA), GitHub Issue Metrics Action, Kubernetes issue triage guidelines, Probot stale bot, actions/stale, GitHub issue forms YAML syntax, GDPR data privacy regulations, SOC 2 trust service criteria, EU Accessibility Act (2025), DORA (Digital Operational Resilience Act), SEC cybersecurity disclosure rules, behavioral science research (completion bias, familiarity bias, decision fatigue)
|
|
444
|
+
|
|
445
|
+
### Course 45: GitHub PR Review Comments (`github-pr-review`)
|
|
446
|
+
- **Generated**: 2026-02-27
|
|
447
|
+
- **Category**: Development & DevOps
|
|
448
|
+
- **Directory**: `courses/github-pr-review/`
|
|
449
|
+
- **Topics researched**: PR review comment types (line comments, file-level comments, review summaries), review states (approve, request changes, comment), review etiquette and constructive feedback, PR review checklists (correctness, security, performance, style), PR template design (description, testing, checklist), CODEOWNERS configuration and review routing, test coverage review (quality vs quantity, edge cases, meaningful assertions), PR scope and size evaluation (splitting strategies, dependency chains), review summary writing (decision-leading, contextualizing, actionable), security-focused review (OWASP Top 10, SQL injection, XSS, auth bypass), performance review patterns (N+1 queries, memory leaks, render cycles), automated review tooling (ESLint, Prettier, CodeQL, danger.js, CI integration), review metrics analysis (turnaround time, reviewer load, comment categories), stacked PR review (dependent chains, merge order, cross-PR issues), review turnaround SLAs (tiered targets, escalation, fairness), cross-team review (non-expert review, API contracts, organizational patterns), review disagreement resolution (architecture disputes, style wars, testing philosophy), API change review (backward compatibility, versioning, migration), large-scale review operations (100+ engineer processes, knowledge distribution), review culture design (psychological safety, toxic pattern intervention, training), AI-powered code review (tool evaluation, human-AI boundaries, change management), monorepo review process (CODEOWNERS, CI optimization, cross-package), compliance-aware review (SOX, SOC 2, PCI DSS, audit trails, emergency changes), review data pipeline (analytics architecture, privacy, metrics), cross-functional review (design, security, legal, product stakeholders), incident-driven review improvement (post-incident analysis, systemic fixes), review automation platform (GitHub Apps, assignment algorithms, categorization), enterprise review operations (multi-BU standardization, migration), review platform architecture (scalability, reliability, deployment), review economics and ROI (cost modeling, investment analysis, executive presentation), review org design (team structure, career paths, interaction models), review vendor evaluation (TCO analysis, security assessment, pilot programs), review incident postmortem (blameless analysis, multi-level improvements), executive communication (board updates, CEO memos, all-hands), reviewer training programs (curriculum, shadow reviewing, certification), review data architecture (ML feature store, analytics layer, privacy), consulting engagements (16-week transformation, diagnostic, handoff), industry benchmarks (cross-industry analysis, methodology, predictions), board-level strategy (risk governance, AI strategy, M&A due diligence), AI future of review (product vision, ethical framework, go-to-market), M&A review integration (culture harmonization, retention risk), behavioral science (cognitive biases, nudge interventions, A/B testing), DevTools product (SaaS startup, pricing, PLG), comprehensive review systems (5-layer Fortune 500 architecture), regulatory landscape (EU AI Act, SEC, DORA, PIPL, Software Liability Act), master crisis management (SEC investigation, competitive disruption, platform outage, talent exodus, board pressure)
|
|
450
|
+
- **Scenarios**: 50 (10 per level × 5 levels)
|
|
451
|
+
- **Type**: output
|
|
452
|
+
- **Sources**: GitHub Pull Request documentation, CODEOWNERS syntax, GitHub branch protection rules, GitHub rulesets, OWASP Top 10 (2021), CodeQL documentation, ESLint configuration, Prettier configuration, danger.js API, SOC 2 trust service criteria (CC8.1), PCI DSS Requirement 6.5, SOX change management controls, EU AI Act (2024), SEC cybersecurity disclosure rules, DORA (Digital Operational Resilience Act), India DPDP Act, China PIPL, behavioral economics research (authority bias, anchoring effect, social loafing, sunk cost fallacy)
|
|
453
|
+
|
|
454
|
+
### Course 46: GitHub Actions CI/CD Setup (`github-actions-cicd`)
|
|
455
|
+
- **Generated**: 2026-02-27
|
|
456
|
+
- **Category**: Development & DevOps
|
|
457
|
+
- **Directory**: `courses/github-actions-cicd/`
|
|
458
|
+
- **Topics researched**: Basic workflow YAML syntax (name, on, jobs, steps, runs-on), workflow triggers (push, pull_request, schedule, workflow_dispatch, release, path filters), actions and runners (marketplace actions, service containers, GitHub-hosted vs self-hosted, resource limits), environment variables and secrets (repository/environment/organization scopes, masking, fork security), simple CI pipelines (lint/test/build, job dependencies, caching), job dependencies and outputs ($GITHUB_OUTPUT, needs, conditional execution with status functions), workflow debugging (common errors, debug logging, act tool), branch protection with status checks (required reviews, required checks, admin bypass), workflow notifications (status badges, Slack alerts, PR comment updates), matrix builds (include/exclude, fail-fast, continue-on-error, cost optimization), dependency caching (actions/cache, built-in cache, cross-branch sharing, Docker layer caching), conditional execution (if expressions, context variables, error recovery patterns), reusable workflows (workflow_call, composite actions, workflow templates, DRY patterns), deployment workflows (staging/production, GitHub Environments, approval gates, rollback), concurrency control (concurrency groups, cancel-in-progress, merge queues), GitHub Packages publishing (npm, Docker GHCR, multi-arch builds, provenance), workflow cost optimization (billing analysis, path filters, runner economics), custom actions development (JavaScript/Docker/composite actions, testing, publishing), self-hosted runners (ARC, Kubernetes, security hardening, auto-scaling, cost analysis), security hardening (supply chain attacks, SHA pinning, GITHUB_TOKEN permissions, OIDC, script injection, pull_request_target), monorepo CI (change detection, dynamic matrix, Turborepo integration, selective testing), OIDC cloud deployments (AWS/GCP/Azure keyless auth, trust policies, migration), release automation (semantic versioning, changelog generation, semantic-release vs release-please vs changesets, artifact signing), workflow optimization (parallelism, test sharding, runner sizing), GitHub Environments (protection rules, deployment gates, canary deployments, ephemeral environments), Docker action development (multi-stage builds, compliance scanners, SARIF integration), compliance automation (SOC 2/PCI DSS/HIPAA controls, required workflows, evidence collection), enterprise CI/CD governance (policy-as-code, action allowlisting, organization rulesets), CI/CD vendor evaluation (GitHub Actions vs GitLab CI vs CircleCI vs Jenkins, TCO analysis), CI/CD platform architecture (runner fleet, auto-scaling, observability, disaster recovery), CI/CD economics and ROI (hidden costs, DORA metrics, investment analysis), CI/CD incident response (platform outages, credential leaks, deployment corruption), CI/CD org design (platform engineering teams, service catalogs, career paths), executive communication (board presentations, CFO reviews, DORA metrics, all-hands), CI/CD data architecture (analytics pipelines, DORA computation, ML failure prediction), CI/CD training programs (tiered curriculum, sandbox environments, certification), consulting engagements (12-week transformation, HIPAA compliance, handoff packages), industry benchmarks (DORA metrics by size/industry, market share, predictions), board strategy (competitive intelligence, $15M investment case, M&A assessment), AI future of CI/CD (predictive CI, self-healing pipelines, natural language workflows), M&A integration (multi-platform consolidation, compliance harmonization, ML pipeline migration), behavioral science (learned helplessness, present bias, choice overload, nudge design), comprehensive CI/CD systems (5-layer Fortune 500 architecture, 8 BU integration), regulatory landscape (EU CRA, SLSA, SBOM, SEC, NIST SSDF, AI Act), master crisis management (supply chain attack, SEC enforcement, vendor risk, talent exodus, board emergency)
|
|
459
|
+
- **Scenarios**: 50 (10 per level × 5 levels)
|
|
460
|
+
- **Type**: output
|
|
461
|
+
- **Sources**: GitHub Actions documentation, GitHub Actions workflow syntax, GitHub Environments documentation, GitHub OIDC documentation, GitHub Packages documentation, actions-runner-controller (ARC), DORA metrics (Accelerate State of DevOps), SLSA framework, Sigstore/cosign, OpenSSF Scorecard, NIST SSDF, EU Cyber Resilience Act, SOC 2 trust service criteria, PCI DSS requirements, HIPAA Security Rule, SEC cybersecurity disclosure rules, Turborepo documentation, semantic-release, release-please, changesets
|
|
462
|
+
|
|
463
|
+
### Course 47: REST API Error Handling (`rest-api-error-handling`)
|
|
464
|
+
- **Generated**: 2026-02-27
|
|
465
|
+
- **Category**: Development & DevOps
|
|
466
|
+
- **Directory**: `courses/rest-api-error-handling/`
|
|
467
|
+
- **Topics researched**: HTTP status codes (2xx/4xx/5xx families, correct selection per scenario), error response format design (consistent JSON structure, field-level validation errors), request validation errors (collect-all-errors approach, unknown field handling, format validation), authentication errors (401 vs 403, information leakage prevention, security-first error messages), 5xx server error handling (global error handler, stack trace prevention, correlation IDs), rate limiting errors (429 with headers, X-RateLimit-*, Retry-After, burst allowance), not-found error taxonomy (404 vs 410 vs 403, decision trees for missing resources), error logging (structured JSON, PII masking, correlation ID flow), content negotiation errors (415, 406, Content-Type/Accept handling), RFC 7807 Problem Details (type URIs, extensions, migration), retry and idempotency (idempotency keys, retryable status codes, exponential backoff with jitter), circuit breaker pattern (closed/open/half-open states, fallback strategies, criticality-based thresholds), error monitoring and alerting (alert taxonomy, noise reduction, anomaly detection), pagination errors (cursor vs offset, edge cases, consistency), webhook error handling (retry policies, dead letter queues, delivery monitoring), batch request errors (partial success, 207 Multi-Status, transaction vs partial semantics), API versioning errors (deprecation headers, sunset, migration hints), error code taxonomy (hierarchical naming, governance, SDK integration), distributed error propagation (service chain context, translation rules, OpenTelemetry), error budgets and SRE (SLI/SLO/SLA, budget calculation, burn rate alerting), API gateway error handling (gateway vs backend distinction, format normalization, partial failure aggregation), database error handling (PostgreSQL error code mapping, constraint translation, read replica lag), async API errors (sync vs deferred validation, job failure format, callback retry), GraphQL vs REST errors (dual-protocol strategy, error extensions, monitoring when status is always 200), chaos engineering for APIs (fault injection experiments, safety guardrails, progressive rollout), error correlation (root cause identification, alert deduplication, dependency graph analysis), caching error scenarios (stampede protection, stale data, cache poisoning, negative caching), enterprise error governance (standardization at scale, automated enforcement, adoption strategy), error analytics platform (data architecture, anomaly detection, business impact calculation), compliance error handling (PCI DSS + HIPAA + GDPR + SOC 2 unified framework, PII in logs remediation), error SLA design (metrics definition, penalty structure, anti-gaming provisions), error handling architecture (4-layer Fortune 500 design, multi-region, multi-cloud), error cost optimization ($8.5M → $4.25M reduction, ROI-prioritized initiatives), executive communication (board presentations, DORA-to-business translation), error org design (centralized vs embedded vs hybrid SRE models), error training programs (tiered curriculum, sandbox exercises, certification), consulting engagements (12-week transformation, quick wins, sustainable handoff), industry benchmarks (maturity model, cross-industry comparison, predictions), board strategy ($15M investment case, NPV, competitor positioning), AI-powered error handling (prediction, auto-remediation, safety framework, ethics), M&A integration (dual-platform unification, compliance harmonization, change management), behavioral science (anchoring, learned helplessness, A/B testing error messages), error handling product development (SaaS MVP, pricing, go-to-market), comprehensive error systems (5-layer Fortune 500 architecture, multi-protocol), regulatory landscape (GDPR, PCI DSS, HIPAA, DORA, DPDP Act, conflict resolution), master crisis management (zero-day in error middleware, GDPR investigation, customer litigation, talent exodus, board emergency)
|
|
468
|
+
- **Scenarios**: 50 (10 per level × 5 levels)
|
|
469
|
+
- **Type**: output
|
|
470
|
+
- **Sources**: RFC 7807 (Problem Details for HTTP APIs), RFC 9457, RFC 8594 (Sunset header), RFC 5322 (email format), HTTP status code specifications, Google SRE handbook (error budgets, SLOs), OpenTelemetry distributed tracing documentation, GDPR Articles 5/17/30/33/44, PCI DSS v4.0 Requirements 3.4/10.2/10.5/10.6, HIPAA Security Rule, SOC 2 trust service criteria, EU DORA (Digital Operational Resilience Act), India DPDP Act, EU AI Act, SEC cybersecurity disclosure rules, NIST 800-53, Stripe API error handling documentation, Sentry error tracking, Datadog monitoring, PagerDuty incident management, behavioral economics research (anchoring effect, learned helplessness, completion bias, loss aversion, social proof)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: "API Error Handling Mastery"
|
|
2
|
+
id: "api-error-handling"
|
|
3
|
+
description: "Comprehensive training course on REST API error handling from fundamentals to enterprise mastery"
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
difficulty_levels:
|
|
6
|
+
- level-1-beginner
|
|
7
|
+
- level-2-intermediate
|
|
8
|
+
- level-3-advanced
|
|
9
|
+
- level-4-expert
|
|
10
|
+
- level-5-master
|
|
11
|
+
|
|
12
|
+
meta:
|
|
13
|
+
pass_rate_required: 0.70
|
|
14
|
+
model_for_agent: "claude-haiku"
|
|
15
|
+
model_for_evaluator: "claude-haiku"
|
|
16
|
+
model_for_skill_generation: "claude-3-5-sonnet"
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
name: "Error Response Format and Structure"
|
|
2
|
+
level: 1
|
|
3
|
+
difficulty: beginner
|
|
4
|
+
description: "Learn to structure consistent, meaningful error responses with proper JSON format"
|
|
5
|
+
|
|
6
|
+
context: |
|
|
7
|
+
Your API needs to return consistent error responses so clients can parse and handle
|
|
8
|
+
errors programmatically. Design error response objects with status code, error code,
|
|
9
|
+
message, and request ID for tracing.
|
|
10
|
+
|
|
11
|
+
scenario:
|
|
12
|
+
state:
|
|
13
|
+
products:
|
|
14
|
+
"prod_001": { name: "Laptop", price: 999.99 }
|
|
15
|
+
"prod_002": { name: "Mouse", price: 29.99 }
|
|
16
|
+
|
|
17
|
+
endpoint: "POST /api/v1/products/{productId}/order"
|
|
18
|
+
|
|
19
|
+
test_cases:
|
|
20
|
+
- name: "valid_order"
|
|
21
|
+
request:
|
|
22
|
+
path: "/api/v1/products/prod_001/order"
|
|
23
|
+
body: { quantity: 1 }
|
|
24
|
+
expected_response:
|
|
25
|
+
status: 201
|
|
26
|
+
body:
|
|
27
|
+
order_id: "order_123"
|
|
28
|
+
product_id: "prod_001"
|
|
29
|
+
quantity: 1
|
|
30
|
+
|
|
31
|
+
- name: "product_not_found_consistent_format"
|
|
32
|
+
request:
|
|
33
|
+
path: "/api/v1/products/prod_999/order"
|
|
34
|
+
body: { quantity: 1 }
|
|
35
|
+
expected_status: 404
|
|
36
|
+
expected_response:
|
|
37
|
+
status: 404
|
|
38
|
+
error:
|
|
39
|
+
code: "PRODUCT_NOT_FOUND"
|
|
40
|
+
message: "The product you requested does not exist"
|
|
41
|
+
details:
|
|
42
|
+
product_id: "prod_999"
|
|
43
|
+
|
|
44
|
+
- name: "invalid_quantity_format"
|
|
45
|
+
request:
|
|
46
|
+
path: "/api/v1/products/prod_001/order"
|
|
47
|
+
body: { quantity: "not_a_number" }
|
|
48
|
+
expected_status: 400
|
|
49
|
+
expected_response:
|
|
50
|
+
status: 400
|
|
51
|
+
error:
|
|
52
|
+
code: "INVALID_REQUEST_BODY"
|
|
53
|
+
message: "Invalid request format"
|
|
54
|
+
details:
|
|
55
|
+
field: "quantity"
|
|
56
|
+
expected_type: "number"
|
|
57
|
+
received_type: "string"
|
|
58
|
+
|
|
59
|
+
- name: "missing_required_field"
|
|
60
|
+
request:
|
|
61
|
+
path: "/api/v1/products/prod_001/order"
|
|
62
|
+
body: {}
|
|
63
|
+
expected_status: 400
|
|
64
|
+
expected_response:
|
|
65
|
+
status: 400
|
|
66
|
+
error:
|
|
67
|
+
code: "MISSING_REQUIRED_FIELD"
|
|
68
|
+
message: "Required field missing"
|
|
69
|
+
details:
|
|
70
|
+
field: "quantity"
|
|
71
|
+
|
|
72
|
+
- name: "negative_quantity"
|
|
73
|
+
request:
|
|
74
|
+
path: "/api/v1/products/prod_001/order"
|
|
75
|
+
body: { quantity: -5 }
|
|
76
|
+
expected_status: 400
|
|
77
|
+
expected_response:
|
|
78
|
+
status: 400
|
|
79
|
+
error:
|
|
80
|
+
code: "VALIDATION_ERROR"
|
|
81
|
+
message: "Quantity must be positive"
|
|
82
|
+
|
|
83
|
+
assertions:
|
|
84
|
+
- type: "api_called"
|
|
85
|
+
description: "Error responses include machine-readable error code"
|
|
86
|
+
test: "error responses always include error.code field"
|
|
87
|
+
|
|
88
|
+
- type: "api_called"
|
|
89
|
+
description: "Error responses include human-readable message"
|
|
90
|
+
test: "error responses always include error.message field"
|
|
91
|
+
|
|
92
|
+
- type: "api_called"
|
|
93
|
+
description: "Error responses are consistent in structure"
|
|
94
|
+
test: "all 4xx errors use same response envelope format"
|
|
95
|
+
|
|
96
|
+
- type: "api_called"
|
|
97
|
+
description: "Additional error details provided where helpful"
|
|
98
|
+
test: "validation errors include field information in details"
|
|
99
|
+
|
|
100
|
+
- type: "outcome"
|
|
101
|
+
description: "Consistent error format improves client error handling"
|
|
102
|
+
test: "clients can parse error responses without special cases for each endpoint"
|
|
103
|
+
|
|
104
|
+
learning_objectives:
|
|
105
|
+
- "Design consistent error response envelope format"
|
|
106
|
+
- "Include error code, message, and optional details in responses"
|
|
107
|
+
- "Provide machine-readable error codes for programmatic handling"
|
|
108
|
+
- "Include request tracing information for debugging"
|
|
109
|
+
- "Document error codes in API specification"
|
|
110
|
+
|
|
111
|
+
key_concepts:
|
|
112
|
+
- "Error Response Envelope: Consistent structure across all error responses"
|
|
113
|
+
- "Error Codes: Machine-readable identifiers (PRODUCT_NOT_FOUND, INVALID_REQUEST_BODY)"
|
|
114
|
+
- "Error Message: Human-readable description of the problem"
|
|
115
|
+
- "Details Field: Additional context like field name for validation errors"
|
|
116
|
+
- "Request ID: Correlation ID for request tracing"
|
|
117
|
+
|
|
118
|
+
example_error_response: |
|
|
119
|
+
{
|
|
120
|
+
"status": 400,
|
|
121
|
+
"error": {
|
|
122
|
+
"code": "INVALID_REQUEST_BODY",
|
|
123
|
+
"message": "Invalid or missing required field",
|
|
124
|
+
"details": {
|
|
125
|
+
"field": "email",
|
|
126
|
+
"expected_type": "string",
|
|
127
|
+
"constraint": "valid email format"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"request_id": "req_abc123def456"
|
|
131
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
name: "HTTP Status Code Fundamentals"
|
|
2
|
+
level: 1
|
|
3
|
+
difficulty: beginner
|
|
4
|
+
description: "Understand 2xx success, 4xx client error, and 5xx server error status codes"
|
|
5
|
+
|
|
6
|
+
context: |
|
|
7
|
+
You're building a user authentication API endpoint. You need to return the correct
|
|
8
|
+
HTTP status codes for different scenarios: successful login, invalid credentials,
|
|
9
|
+
missing required fields, and server outages.
|
|
10
|
+
|
|
11
|
+
scenario:
|
|
12
|
+
state:
|
|
13
|
+
user_database:
|
|
14
|
+
"user123@example.com": { password_hash: "hashed_pwd_123", name: "John Doe" }
|
|
15
|
+
"user456@example.com": { password_hash: "hashed_pwd_456", name: "Jane Smith" }
|
|
16
|
+
service_status: "healthy"
|
|
17
|
+
|
|
18
|
+
endpoint: "POST /api/v1/auth/login"
|
|
19
|
+
|
|
20
|
+
test_cases:
|
|
21
|
+
- name: "successful_login"
|
|
22
|
+
request:
|
|
23
|
+
body: { email: "user123@example.com", password: "correct_password" }
|
|
24
|
+
expected_status: 200
|
|
25
|
+
expected_response:
|
|
26
|
+
token: "jwt_token_here"
|
|
27
|
+
user_id: "user123@example.com"
|
|
28
|
+
|
|
29
|
+
- name: "invalid_credentials"
|
|
30
|
+
request:
|
|
31
|
+
body: { email: "user123@example.com", password: "wrong_password" }
|
|
32
|
+
expected_status: 401
|
|
33
|
+
expected_response_contains: "Unauthorized"
|
|
34
|
+
|
|
35
|
+
- name: "missing_email_field"
|
|
36
|
+
request:
|
|
37
|
+
body: { password: "some_password" }
|
|
38
|
+
expected_status: 400
|
|
39
|
+
expected_response_contains: "email is required"
|
|
40
|
+
|
|
41
|
+
- name: "malformed_email"
|
|
42
|
+
request:
|
|
43
|
+
body: { email: "not-an-email", password: "password123" }
|
|
44
|
+
expected_status: 400
|
|
45
|
+
expected_response_contains: "invalid email format"
|
|
46
|
+
|
|
47
|
+
- name: "user_not_found"
|
|
48
|
+
request:
|
|
49
|
+
body: { email: "nonexistent@example.com", password: "password" }
|
|
50
|
+
expected_status: 401
|
|
51
|
+
|
|
52
|
+
- name: "server_error_scenario"
|
|
53
|
+
request:
|
|
54
|
+
body: { email: "user123@example.com", password: "correct_password" }
|
|
55
|
+
simulate_error: "database_connection_failed"
|
|
56
|
+
expected_status: 500
|
|
57
|
+
expected_response_contains: "Internal Server Error"
|
|
58
|
+
|
|
59
|
+
assertions:
|
|
60
|
+
- type: "http_status"
|
|
61
|
+
description: "2xx codes indicate successful operations"
|
|
62
|
+
test: "successful_login returns 200"
|
|
63
|
+
|
|
64
|
+
- type: "http_status"
|
|
65
|
+
description: "401 Unauthorized for authentication failures"
|
|
66
|
+
test: "invalid_credentials returns 401"
|
|
67
|
+
|
|
68
|
+
- type: "http_status"
|
|
69
|
+
description: "400 Bad Request for malformed requests"
|
|
70
|
+
test: "missing required fields returns 400"
|
|
71
|
+
|
|
72
|
+
- type: "http_status"
|
|
73
|
+
description: "400 for invalid data format"
|
|
74
|
+
test: "malformed_email returns 400"
|
|
75
|
+
|
|
76
|
+
- type: "http_status"
|
|
77
|
+
description: "5xx codes indicate server-side errors"
|
|
78
|
+
test: "database failure returns 500"
|
|
79
|
+
|
|
80
|
+
learning_objectives:
|
|
81
|
+
- "Understand HTTP status code categories (2xx, 3xx, 4xx, 5xx)"
|
|
82
|
+
- "Know when to use 200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 500 Internal Server Error"
|
|
83
|
+
- "Distinguish between client errors (4xx) and server errors (5xx)"
|
|
84
|
+
- "Return appropriate status codes for different error scenarios"
|
|
85
|
+
|
|
86
|
+
key_concepts:
|
|
87
|
+
- "2xx Success Codes: Indicate successful request processing"
|
|
88
|
+
- "4xx Client Error Codes: Client-side issues - malformed requests, auth failures, not found"
|
|
89
|
+
- "5xx Server Error Codes: Server-side issues - database failures, unhandled exceptions"
|
|
90
|
+
- "Status code semantics matter: Never return 200 with an error message"
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
name: "Rate Limiting and 429 Errors"
|
|
2
|
+
level: 1
|
|
3
|
+
difficulty: beginner
|
|
4
|
+
description: "Implement rate limiting to protect APIs and return 429 Too Many Requests errors"
|
|
5
|
+
|
|
6
|
+
context: |
|
|
7
|
+
Build a rate-limited API endpoint that allows 10 requests per minute per user.
|
|
8
|
+
When the limit is exceeded, return 429 status with information about rate limit reset.
|
|
9
|
+
|
|
10
|
+
scenario:
|
|
11
|
+
state:
|
|
12
|
+
rate_limits:
|
|
13
|
+
user_123: { requests_in_window: 0, window_start: "2024-01-01T00:00:00Z", limit: 10, window_seconds: 60 }
|
|
14
|
+
user_456: { requests_in_window: 10, window_start: "2024-01-01T00:00:00Z", limit: 10, window_seconds: 60 }
|
|
15
|
+
user_789: { requests_in_window: 5, window_start: "2024-01-01T00:00:30Z", limit: 10, window_seconds: 60 }
|
|
16
|
+
|
|
17
|
+
endpoint: "GET /api/v1/data/{resource_id}"
|
|
18
|
+
|
|
19
|
+
test_cases:
|
|
20
|
+
- name: "request_within_limit"
|
|
21
|
+
request:
|
|
22
|
+
path: "/api/v1/data/resource_1"
|
|
23
|
+
headers:
|
|
24
|
+
authorization: "Bearer token_user_123"
|
|
25
|
+
current_time: "2024-01-01T00:00:05Z"
|
|
26
|
+
expected_status: 200
|
|
27
|
+
expected_response_headers:
|
|
28
|
+
- "X-RateLimit-Limit: 10"
|
|
29
|
+
- "X-RateLimit-Remaining: 9"
|
|
30
|
+
- "X-RateLimit-Reset: 2024-01-01T00:01:00Z"
|
|
31
|
+
|
|
32
|
+
- name: "request_at_limit"
|
|
33
|
+
request:
|
|
34
|
+
path: "/api/v1/data/resource_1"
|
|
35
|
+
headers:
|
|
36
|
+
authorization: "Bearer token_user_456"
|
|
37
|
+
current_time: "2024-01-01T00:00:30Z"
|
|
38
|
+
expected_status: 429
|
|
39
|
+
expected_response:
|
|
40
|
+
error:
|
|
41
|
+
code: "RATE_LIMIT_EXCEEDED"
|
|
42
|
+
message: "Too many requests. Please retry after some time."
|
|
43
|
+
expected_response_headers:
|
|
44
|
+
- "X-RateLimit-Limit: 10"
|
|
45
|
+
- "X-RateLimit-Remaining: 0"
|
|
46
|
+
- "X-RateLimit-Reset: 2024-01-01T00:01:00Z"
|
|
47
|
+
- "Retry-After: 30"
|
|
48
|
+
|
|
49
|
+
- name: "request_exceeds_limit"
|
|
50
|
+
request:
|
|
51
|
+
path: "/api/v1/data/resource_1"
|
|
52
|
+
headers:
|
|
53
|
+
authorization: "Bearer token_user_456"
|
|
54
|
+
current_time: "2024-01-01T00:00:45Z"
|
|
55
|
+
expected_status: 429
|
|
56
|
+
expected_response:
|
|
57
|
+
error:
|
|
58
|
+
code: "RATE_LIMIT_EXCEEDED"
|
|
59
|
+
expected_response_headers:
|
|
60
|
+
- "Retry-After: 15"
|
|
61
|
+
|
|
62
|
+
- name: "window_reset_allows_new_requests"
|
|
63
|
+
request:
|
|
64
|
+
path: "/api/v1/data/resource_1"
|
|
65
|
+
headers:
|
|
66
|
+
authorization: "Bearer token_user_456"
|
|
67
|
+
current_time: "2024-01-01T00:01:05Z"
|
|
68
|
+
expected_status: 200
|
|
69
|
+
expected_response_headers:
|
|
70
|
+
- "X-RateLimit-Remaining: 9"
|
|
71
|
+
|
|
72
|
+
- name: "anonymous_user_lower_limit"
|
|
73
|
+
request:
|
|
74
|
+
path: "/api/v1/data/resource_1"
|
|
75
|
+
headers: {}
|
|
76
|
+
current_time: "2024-01-01T00:00:10Z"
|
|
77
|
+
expected_status: 200
|
|
78
|
+
expected_response_headers:
|
|
79
|
+
- "X-RateLimit-Limit: 5"
|
|
80
|
+
|
|
81
|
+
assertions:
|
|
82
|
+
- type: "http_status"
|
|
83
|
+
description: "429 returned when rate limit exceeded"
|
|
84
|
+
test: "rate_limit_exceeded returns 429"
|
|
85
|
+
|
|
86
|
+
- type: "api_called"
|
|
87
|
+
description: "Rate limit headers included in all responses"
|
|
88
|
+
test: "X-RateLimit-Limit header present in responses"
|
|
89
|
+
|
|
90
|
+
- type: "api_called"
|
|
91
|
+
description: "Retry-After header provided in 429 response"
|
|
92
|
+
test: "429 response includes Retry-After header"
|
|
93
|
+
|
|
94
|
+
- type: "api_called"
|
|
95
|
+
description: "Rate limit reset time communicated"
|
|
96
|
+
test: "X-RateLimit-Reset header shows window reset time"
|
|
97
|
+
|
|
98
|
+
- type: "api_called"
|
|
99
|
+
description: "Remaining requests tracked"
|
|
100
|
+
test: "X-RateLimit-Remaining decrements with each request"
|
|
101
|
+
|
|
102
|
+
- type: "outcome"
|
|
103
|
+
description: "Rate limits are enforced per user"
|
|
104
|
+
test: "different users have independent rate limit windows"
|
|
105
|
+
|
|
106
|
+
learning_objectives:
|
|
107
|
+
- "Understand rate limiting purpose: protect API from abuse and ensure fair usage"
|
|
108
|
+
- "Implement per-user rate limiting windows"
|
|
109
|
+
- "Return 429 Too Many Requests when limit exceeded"
|
|
110
|
+
- "Include rate limit information in response headers"
|
|
111
|
+
- "Provide Retry-After header for client backoff guidance"
|
|
112
|
+
- "Differentiate rate limits for authenticated vs anonymous users"
|
|
113
|
+
- "Reset rate limit windows at appropriate intervals"
|
|
114
|
+
|
|
115
|
+
standard_headers:
|
|
116
|
+
"X-RateLimit-Limit": "Maximum requests allowed in window"
|
|
117
|
+
"X-RateLimit-Remaining": "Requests remaining in current window"
|
|
118
|
+
"X-RateLimit-Reset": "Unix timestamp or ISO 8601 when window resets"
|
|
119
|
+
"Retry-After": "Seconds to wait before retrying (429 only)"
|
|
120
|
+
|
|
121
|
+
best_practices:
|
|
122
|
+
- "Include rate limit headers in all responses, not just 429"
|
|
123
|
+
- "Use consistent rate limit windows (typically 1-60 seconds)"
|
|
124
|
+
- "Consider different limits for different user tiers"
|
|
125
|
+
- "Log rate limit violations for monitoring"
|
|
126
|
+
- "Include Retry-After guidance for clients"
|
|
127
|
+
- "Reset windows in predictable intervals to avoid thundering herd"
|
|
128
|
+
|
|
129
|
+
common_mistakes:
|
|
130
|
+
- "Returning 500 instead of 429 for rate limit violations"
|
|
131
|
+
- "Not including rate limit headers in responses"
|
|
132
|
+
- "Applying same limits to all user types"
|
|
133
|
+
- "Using unclear Retry-After values"
|
|
134
|
+
- "Not resetting rate limit windows"
|
|
135
|
+
- "Blocking entire IP address instead of per-user limiting"
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
name: "Request Validation Error Handling"
|
|
2
|
+
level: 1
|
|
3
|
+
difficulty: beginner
|
|
4
|
+
description: "Handle common validation errors: missing fields, invalid types, constraint violations"
|
|
5
|
+
|
|
6
|
+
context: |
|
|
7
|
+
Implement comprehensive input validation for a user registration endpoint.
|
|
8
|
+
Handle missing fields, invalid formats, constraint violations, and size limits.
|
|
9
|
+
|
|
10
|
+
scenario:
|
|
11
|
+
state:
|
|
12
|
+
existing_users:
|
|
13
|
+
- email: "john@example.com"
|
|
14
|
+
- email: "jane@example.com"
|
|
15
|
+
validation_rules:
|
|
16
|
+
email: "required, valid email format, unique"
|
|
17
|
+
password: "required, minimum 8 characters"
|
|
18
|
+
name: "required, non-empty string, max 100 characters"
|
|
19
|
+
age: "optional, integer, must be 18+"
|
|
20
|
+
|
|
21
|
+
endpoint: "POST /api/v1/users/register"
|
|
22
|
+
|
|
23
|
+
test_cases:
|
|
24
|
+
- name: "valid_registration"
|
|
25
|
+
request:
|
|
26
|
+
body:
|
|
27
|
+
email: "newuser@example.com"
|
|
28
|
+
password: "SecurePassword123"
|
|
29
|
+
name: "New User"
|
|
30
|
+
age: 25
|
|
31
|
+
expected_status: 201
|
|
32
|
+
expected_response:
|
|
33
|
+
user_id: "user_new_123"
|
|
34
|
+
email: "newuser@example.com"
|
|
35
|
+
|
|
36
|
+
- name: "missing_email"
|
|
37
|
+
request:
|
|
38
|
+
body:
|
|
39
|
+
password: "SecurePassword123"
|
|
40
|
+
name: "New User"
|
|
41
|
+
expected_status: 400
|
|
42
|
+
expected_response:
|
|
43
|
+
error:
|
|
44
|
+
code: "MISSING_REQUIRED_FIELD"
|
|
45
|
+
details:
|
|
46
|
+
field: "email"
|
|
47
|
+
|
|
48
|
+
- name: "missing_password"
|
|
49
|
+
request:
|
|
50
|
+
body:
|
|
51
|
+
email: "newuser@example.com"
|
|
52
|
+
name: "New User"
|
|
53
|
+
expected_status: 400
|
|
54
|
+
expected_response:
|
|
55
|
+
error:
|
|
56
|
+
code: "MISSING_REQUIRED_FIELD"
|
|
57
|
+
details:
|
|
58
|
+
field: "password"
|
|
59
|
+
|
|
60
|
+
- name: "invalid_email_format"
|
|
61
|
+
request:
|
|
62
|
+
body:
|
|
63
|
+
email: "not-an-email"
|
|
64
|
+
password: "SecurePassword123"
|
|
65
|
+
name: "New User"
|
|
66
|
+
expected_status: 400
|
|
67
|
+
expected_response:
|
|
68
|
+
error:
|
|
69
|
+
code: "INVALID_EMAIL_FORMAT"
|
|
70
|
+
message: "Email must be a valid email address"
|
|
71
|
+
|
|
72
|
+
- name: "password_too_short"
|
|
73
|
+
request:
|
|
74
|
+
body:
|
|
75
|
+
email: "newuser@example.com"
|
|
76
|
+
password: "short"
|
|
77
|
+
name: "New User"
|
|
78
|
+
expected_status: 400
|
|
79
|
+
expected_response:
|
|
80
|
+
error:
|
|
81
|
+
code: "VALIDATION_ERROR"
|
|
82
|
+
message: "Password must be at least 8 characters"
|
|
83
|
+
|
|
84
|
+
- name: "name_exceeds_max_length"
|
|
85
|
+
request:
|
|
86
|
+
body:
|
|
87
|
+
email: "newuser@example.com"
|
|
88
|
+
password: "SecurePassword123"
|
|
89
|
+
name: "A" * 101
|
|
90
|
+
expected_status: 400
|
|
91
|
+
expected_response:
|
|
92
|
+
error:
|
|
93
|
+
code: "VALIDATION_ERROR"
|
|
94
|
+
message: "Name must not exceed 100 characters"
|
|
95
|
+
|
|
96
|
+
- name: "empty_name"
|
|
97
|
+
request:
|
|
98
|
+
body:
|
|
99
|
+
email: "newuser@example.com"
|
|
100
|
+
password: "SecurePassword123"
|
|
101
|
+
name: ""
|
|
102
|
+
expected_status: 400
|
|
103
|
+
expected_response:
|
|
104
|
+
error:
|
|
105
|
+
code: "VALIDATION_ERROR"
|
|
106
|
+
message: "Name cannot be empty"
|
|
107
|
+
|
|
108
|
+
- name: "age_below_minimum"
|
|
109
|
+
request:
|
|
110
|
+
body:
|
|
111
|
+
email: "newuser@example.com"
|
|
112
|
+
password: "SecurePassword123"
|
|
113
|
+
name: "Young User"
|
|
114
|
+
age: 17
|
|
115
|
+
expected_status: 400
|
|
116
|
+
expected_response:
|
|
117
|
+
error:
|
|
118
|
+
code: "VALIDATION_ERROR"
|
|
119
|
+
message: "Age must be 18 or older"
|
|
120
|
+
|
|
121
|
+
- name: "age_invalid_type"
|
|
122
|
+
request:
|
|
123
|
+
body:
|
|
124
|
+
email: "newuser@example.com"
|
|
125
|
+
password: "SecurePassword123"
|
|
126
|
+
name: "User"
|
|
127
|
+
age: "twenty-five"
|
|
128
|
+
expected_status: 400
|
|
129
|
+
expected_response:
|
|
130
|
+
error:
|
|
131
|
+
code: "INVALID_FIELD_TYPE"
|
|
132
|
+
details:
|
|
133
|
+
field: "age"
|
|
134
|
+
expected_type: "integer"
|
|
135
|
+
received_type: "string"
|
|
136
|
+
|
|
137
|
+
- name: "duplicate_email"
|
|
138
|
+
request:
|
|
139
|
+
body:
|
|
140
|
+
email: "john@example.com"
|
|
141
|
+
password: "SecurePassword123"
|
|
142
|
+
name: "John Copy"
|
|
143
|
+
expected_status: 409
|
|
144
|
+
expected_response:
|
|
145
|
+
error:
|
|
146
|
+
code: "EMAIL_ALREADY_EXISTS"
|
|
147
|
+
message: "An account with this email already exists"
|
|
148
|
+
|
|
149
|
+
- name: "multiple_validation_errors"
|
|
150
|
+
request:
|
|
151
|
+
body:
|
|
152
|
+
password: "short"
|
|
153
|
+
name: ""
|
|
154
|
+
age: 10
|
|
155
|
+
expected_status: 400
|
|
156
|
+
expected_response:
|
|
157
|
+
error:
|
|
158
|
+
code: "VALIDATION_ERROR"
|
|
159
|
+
message: "Multiple validation errors"
|
|
160
|
+
details:
|
|
161
|
+
errors:
|
|
162
|
+
- field: "email"
|
|
163
|
+
code: "MISSING_REQUIRED_FIELD"
|
|
164
|
+
- field: "password"
|
|
165
|
+
code: "TOO_SHORT"
|
|
166
|
+
- field: "name"
|
|
167
|
+
code: "EMPTY"
|
|
168
|
+
|
|
169
|
+
assertions:
|
|
170
|
+
- type: "http_status"
|
|
171
|
+
description: "400 Bad Request for validation errors"
|
|
172
|
+
test: "all validation errors return 400 status"
|
|
173
|
+
|
|
174
|
+
- type: "api_called"
|
|
175
|
+
description: "Missing required fields identified"
|
|
176
|
+
test: "MISSING_REQUIRED_FIELD error for absent email"
|
|
177
|
+
|
|
178
|
+
- type: "api_called"
|
|
179
|
+
description: "Invalid format errors detected"
|
|
180
|
+
test: "INVALID_EMAIL_FORMAT error for malformed email"
|
|
181
|
+
|
|
182
|
+
- type: "api_called"
|
|
183
|
+
description: "Constraint violations reported"
|
|
184
|
+
test: "Password length constraint violation returns error"
|
|
185
|
+
|
|
186
|
+
- type: "http_status"
|
|
187
|
+
description: "409 Conflict for duplicate unique fields"
|
|
188
|
+
test: "duplicate email returns 409"
|
|
189
|
+
|
|
190
|
+
- type: "api_called"
|
|
191
|
+
description: "Multiple errors reported together"
|
|
192
|
+
test: "multiple validation errors returned as array"
|
|
193
|
+
|
|
194
|
+
learning_objectives:
|
|
195
|
+
- "Validate required vs optional fields"
|
|
196
|
+
- "Check data type correctness before processing"
|
|
197
|
+
- "Validate format constraints (email, URL, phone number)"
|
|
198
|
+
- "Enforce business rule constraints (min/max, uniqueness)"
|
|
199
|
+
- "Report multiple validation errors together"
|
|
200
|
+
- "Use 409 Conflict for duplicate unique constraints"
|
|
201
|
+
|
|
202
|
+
common_mistakes:
|
|
203
|
+
- "Failing to validate email format before storage"
|
|
204
|
+
- "Not checking for duplicate emails/unique constraints"
|
|
205
|
+
- "Accepting invalid data types without type checking"
|
|
206
|
+
- "Returning 200 OK with validation error message"
|
|
207
|
+
- "Only reporting first error instead of all validation issues"
|
|
208
|
+
- "Not providing enough detail about what validation failed"
|