Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:37:27 +08:00
commit 37774aa937
131 changed files with 31137 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
---
name: ln-334-test-executor
description: Executes Story Finalizer test tasks (label "tests") from Todo -> To Review. Enforces risk-based limits and priority.
---
# Test Task Executor
Runs a single Story final test task (from ln-350-story-test-planner) through implementation/execution to To Review.
## Purpose & Scope
- Handle only tasks labeled "tests"; other tasks go to ln-331.
- Follow the 11-section test task plan (E2E/Integration/Unit, infra/docs/cleanup).
- Enforce risk-based constraints: Priority ≤15; E2E 2-5, Integration 0-8, Unit 0-15, total 10-28; no framework/DB/library tests.
- Update Linear/kanban for this task only: Todo -> In Progress -> To Review.
## Workflow (concise)
1) **Load context:** Fetch full test task description; read linked guides/manuals/ADRs; review parent Story and manual test results if provided.
2) **Validate plan:** Check Priority ≤15 and test count limits; ensure focus on business flows (no infra-only tests).
3) **Start work:** Set task In Progress in Linear; move in kanban.
4) **Implement & run:** Author/update tests per plan; reuse existing fixtures/helpers; run tests; fix failing existing tests; update infra/doc sections as required.
5) **Complete:** Ensure counts/priority still within limits; set task To Review; move in kanban; add comment summarizing coverage, commands run, and any deviations.
## Critical Rules
- Single-task only; no bulk updates.
- Do not mark Done; ln-332 approves. Task must end in To Review.
- Keep language (EN/RU) consistent with task.
- No framework/library/DB tests; focus on business behavior.
- Respect limits and priority; if violated, stop and return with findings.
## Definition of Done
- Task identified as test task and set to In Progress; kanban updated.
- Plan validated (priority/limits) and guides read.
- Tests implemented/updated and executed; existing failures fixed.
- Docs/infra updates applied per task plan.
- Task set to To Review; kanban moved; summary comment added with commands and coverage.
## Reference Files
- Test template: `../ln-350-story-test-planner/references/test_task_template.md`
- Risk-based testing: `../ln-350-story-test-planner/references/risk_based_testing_guide.md`
- Kanban format: `docs/tasks/kanban_board.md`
---
Version: 4.0.0 (Condensed test executor with limits enforcement)
Last Updated: 2025-11-26

View File

@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ln-334-test-executor - State Diagram</title>
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
<link rel="stylesheet" href="../shared/css/diagram.css">
</head>
<body>
<div class="container">
<header>
<h1>⚙️ ln-334-test-executor</h1>
<p class="subtitle">Story Finalizer Test Task Executor - State Diagram</p>
</header>
<div class="info-box">
<h3>📋 Overview</h3>
<ul>
<li><strong>Purpose:</strong> Execute Story Finalizer test tasks from ln-350-story-test-planner (11 sections)</li>
<li><strong>6 Steps:</strong> Fix existing tests → New tests → Infrastructure → Docs → Cleanup → Verify</li>
<li><strong>Testing:</strong> E2E-first Risk-Based (2-5 E2E, 3-8 Integration, 5-15 Unit, Priority ≥15)</li>
</ul>
</div>
<div class="diagram-container">
<div class="mermaid">
graph TD
Start([Start: Execute Story Finalizer Test Task]) --> Phase1[Phase 1: Discovery<br/>Team ID auto-discovery]
Phase1 --> Phase2[Phase 2: Preparation<br/>Load task Todo<br/>Update status: Todo → In Progress]
Phase2 --> Phase3[Phase 3: Implementation 6 steps]
subgraph Steps [6 Steps - Sequential]
Step1[Step 1: Fix Existing Tests<br/>Section 8]
Step1 --> Step2[Step 2: Implement New Tests<br/>E2E→Integration→Unit Priority ≥15<br/>NO performance/load tests<br/>Sections 3-5]
Step2 --> Step3[Step 3: Update Infrastructure<br/>Section 9: package.json Docker]
Step3 --> Step4[Step 4: Update Documentation<br/>Section 10: README CHANGELOG]
Step4 --> Step5[Step 5: Cleanup Legacy Code<br/>Section 11]
Step5 --> Step6[Step 6: Final Verification<br/>Delete scripts/tmp_[story_id].sh]
end
Phase3 --> Step1
Step6 --> Phase4
Phase4[Phase 4: Quality Gates<br/>All tests pass 10-28 total<br/>Priority ≥15 tested]
Phase4 --> QualityPass{Quality gates<br/>pass?}
QualityPass -->|No| Phase3
QualityPass -->|Yes| Phase5
Phase5[Phase 4: Handoff<br/>Update: In Progress → To Review]
Phase5 --> End([End])
classDef discovery fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
classDef processing fill:#FFF9C4,stroke:#F57C00,stroke-width:2px
classDef decision fill:#FFE0B2,stroke:#E64A19,stroke-width:2px
classDef action fill:#C8E6C9,stroke:#388E3C,stroke-width:2px
class Phase1,Phase2 discovery
class Phase3,Step1,Step2,Step3,Step4,Step5,Step6,Phase4 processing
class QualityPass decision
class Phase5 action
</div>
</div>
<footer>
<p>ln-334-test-executor | Chat prefix: ⚙️ [EXECUTOR]</p>
</footer>
</div>
<script>
mermaid.initialize({ startOnLoad: true, theme: 'default', flowchart: { useMaxWidth: true, htmlLabels: true, curve: 'basis' } });
</script>
</body>
</html>