@keber/qa-framework 1.10.0 → 1.12.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 (113) hide show
  1. package/CHANGELOG.md +63 -18
  2. package/README.md +2 -2
  3. package/docs/architecture.md +30 -26
  4. package/docs/decisions/lane-heartbeat-caller.md +86 -0
  5. package/docs/final-report.md +23 -23
  6. package/docs/folder-structure-guide.md +106 -80
  7. package/docs/installation.md +35 -7
  8. package/docs/skills-architecture.md +23 -23
  9. package/docs/spec-driven-philosophy.md +9 -9
  10. package/docs/usage-with-agent.md +83 -9
  11. package/docs/visuals/diag-01-ejecutivo-1.png +0 -0
  12. package/docs/visuals/diag-02-tactico-1.png +0 -0
  13. package/docs/visuals/diag-03-tecnico-1.png +0 -0
  14. package/docs/visuals/info-01-ejecutivo-1.png +0 -0
  15. package/docs/visuals/info-02-tactico-1.png +0 -0
  16. package/docs/visuals/info-03-tecnico-1.png +0 -0
  17. package/docs/visuals/pres-01-ejecutivo-1.png +0 -0
  18. package/docs/visuals/pres-02-tactico-1.png +0 -0
  19. package/docs/visuals/pres-03-tecnico-1.png +0 -0
  20. package/docs/visuals/qa-01-problema-1.png +0 -0
  21. package/docs/visuals/qa-02-que-es-1.png +0 -0
  22. package/docs/visuals/qa-03-pipeline-1.png +0 -0
  23. package/docs/visuals/qa-04-6-archivos-1.png +0 -0
  24. package/docs/visuals/qa-05-humano-1.png +0 -0
  25. package/docs/visuals/qa-06-agente-1.png +0 -0
  26. package/docs/visuals/qa-07-skills-arch-1.png +0 -0
  27. package/docs/visuals/qa-08-traceability-1.png +0 -0
  28. package/docs/visuals/qa-en-01-problem-1.png +0 -0
  29. package/docs/visuals/qa-en-02-what-is-1.png +0 -0
  30. package/docs/visuals/qa-en-03-pipeline-1.png +0 -0
  31. package/docs/visuals/qa-en-04-6files-1.png +0 -0
  32. package/docs/visuals/qa-en-05-human-1.png +0 -0
  33. package/docs/visuals/qa-en-06-agent-1.png +0 -0
  34. package/docs/visuals/qa-en-07-skills-arch-1.png +0 -0
  35. package/docs/visuals/qa-en-08-traceability-1.png +0 -0
  36. package/examples/module-example/suppliers/00-inventory.md +1 -1
  37. package/examples/module-example/suppliers/suppliers-create.spec.ts +8 -8
  38. package/integrations/ado-powershell/README.md +1 -1
  39. package/integrations/ado-powershell/pipelines/azure-pipeline-qa.yml +92 -25
  40. package/integrations/ado-powershell/scripts/sync-ado-titles.ps1 +2 -2
  41. package/integrations/playwright/README.md +128 -4
  42. package/package.json +9 -6
  43. package/qa-framework.config.json +24 -3
  44. package/scripts/check-forbidden-chars.js +187 -0
  45. package/scripts/check-spanish-accents.js +159 -0
  46. package/scripts/cli.js +1 -1
  47. package/scripts/generate.js +2 -2
  48. package/scripts/init.js +108 -45
  49. package/scripts/lib/claude-agents.js +78 -0
  50. package/scripts/lib/claude-commands.js +56 -0
  51. package/scripts/sync-version.js +36 -0
  52. package/scripts/upgrade.js +461 -30
  53. package/scripts/validate.js +17 -17
  54. package/skills/qa-ado-integration/SKILL.md +19 -19
  55. package/skills/qa-ado-integration/references/scripts-and-config.md +6 -6
  56. package/skills/qa-automation/SKILL.md +49 -27
  57. package/skills/qa-automation/references/config-checklist.md +4 -4
  58. package/skills/qa-automation/references/dom-inspection-template.js +7 -7
  59. package/skills/qa-automation/references/patterns.md +20 -20
  60. package/skills/qa-automation/references/pom-template.md +161 -0
  61. package/skills/qa-maintenance/SKILL.md +11 -11
  62. package/skills/qa-maintenance/references/update-rules.md +8 -8
  63. package/skills/qa-module-analysis/SKILL.md +20 -19
  64. package/skills/qa-module-analysis/references/exploration-checklist.md +4 -4
  65. package/skills/qa-module-analysis/references/output-verification.md +69 -0
  66. package/skills/qa-module-analysis/references/spec-file-formats.md +14 -14
  67. package/skills/qa-spec-generation/SKILL.md +13 -7
  68. package/skills/qa-test-cases/SKILL.md +11 -81
  69. package/skills/qa-test-cases/references/test-case-template.md +5 -5
  70. package/skills/qa-test-plan/SKILL.md +22 -86
  71. package/skills/qa-test-plan/references/plan-de-pruebas-template.md +24 -24
  72. package/skills/qa-test-stabilization/SKILL.md +59 -30
  73. package/skills/qa-test-stabilization/references/classification-protocol.md +35 -35
  74. package/templates/agent-next-steps.md +10 -10
  75. package/templates/agents/qa-analisis.md +142 -0
  76. package/templates/agents/qa-asesoria.md +48 -0
  77. package/templates/agents/qa-informe-resultados.md +234 -0
  78. package/templates/agents/qa-plan.md +131 -0
  79. package/templates/automation-scaffold/.env.example +52 -3
  80. package/templates/automation-scaffold/fixtures/auth.ts +27 -5
  81. package/templates/automation-scaffold/fixtures/base.ts +130 -0
  82. package/templates/automation-scaffold/fixtures/test-helpers.ts +1 -1
  83. package/templates/automation-scaffold/global-setup.ts +196 -37
  84. package/templates/automation-scaffold/playwright.config.ts +74 -10
  85. package/templates/automation-scaffold/scripts/global-setup-guards.js +184 -0
  86. package/templates/automation-scaffold/scripts/lane-config.js +269 -0
  87. package/templates/automation-scaffold/scripts/lane-lock.js +589 -0
  88. package/templates/defect-report.md +18 -4
  89. package/templates/execution-report.md +9 -9
  90. package/templates/integration-scaffold/.env.example +40 -0
  91. package/templates/integration-scaffold/README.md +77 -0
  92. package/templates/integration-scaffold/global-setup.ts +119 -0
  93. package/templates/integration-scaffold/package.json +15 -0
  94. package/templates/integration-scaffold/playwright.config.ts +92 -0
  95. package/templates/integration-scaffold/tests/example.spec.ts +43 -0
  96. package/templates/memory/ci-pipeline-findings.md +36 -0
  97. package/templates/memory/data-volatility-strategies.md +70 -0
  98. package/templates/memory/e2e-stabilization-patterns.md +54 -0
  99. package/templates/qa-framework.instructions.md +16 -7
  100. package/templates/qa-framework.rules.md +53 -0
  101. package/templates/qa-readme.md +26 -5
  102. package/templates/session-summary.md +2 -2
  103. package/templates/specification/00-inventory.md +3 -3
  104. package/templates/specification/01-business-rules.md +6 -6
  105. package/templates/specification/02-workflows.md +1 -1
  106. package/templates/specification/03-roles-permissions.md +1 -1
  107. package/templates/specification/04-test-data.md +8 -8
  108. package/templates/specification/05-test-scenarios.md +5 -5
  109. package/templates/test-case.md +3 -3
  110. package/templates/test-data-guidelines.md +7 -7
  111. package/templates/test-plan-sprint.md +13 -13
  112. package/templates/test-plan.md +3 -3
  113. package/skills/qa-test-plan/references/priority-and-feasibility.md +0 -159
package/CHANGELOG.md CHANGED
@@ -7,29 +7,59 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
- ## [1.0.0] - 2026-03-04
10
+ ## [1.11.0] - 2026-06-24
11
11
 
12
12
  ### Added
13
13
 
14
- - **Framework scaffold** — initial `qa/` directory tree with 9 numbered folders (00–08)
15
- - **6-file submodule template set** — `00-inventory` through `05-test-scenarios`
16
- - **Agent instructions** — 7 purpose-specific Markdown instruction files for IDE agents
17
- - **Standards** — naming conventions, bug report template, test case template, test data guidelines
18
- - **Automation scaffold** — generalized Playwright `playwright.config.ts`, `global-setup.ts`, `.env.example`, `fixtures/auth.ts`
19
- - **Optional integrations** — stubs and READMEs for Playwright, `playwright-azure-reporter`, and ADO PowerShell
20
- - **CLI entry point** — `qa-framework init`, `generate`, `validate` commands
21
- - **Documentation** — architecture, comparison matrix, generalization decisions, installation guide, usage-with-agent guide, spec-driven philosophy, folder structure guide
22
- - **Migration notes** — `MIGRATION-NOTES.md` for projects moving from embedded to package-based framework
23
-
24
- ### Source repositories
14
+ - **`templates/automation-scaffold/fixtures/base.ts`** — new fixture with TTL-aware session
15
+ refresh. Replaces the plain `@playwright/test` import in long-running suites where the
16
+ server-side session may expire before the suite finishes.
17
+ - **`templates/automation-scaffold/global-setup.ts`** — hardened login flow:
18
+ - `resolveVar()` with source logging (`param` / `env:KEY` / `default`)
19
+ - Login retry loop (up to 3 attempts) with crash-page detection and recovery
20
+ - `resolveAuthUsers()` — derives which users to authenticate from `QA_AUTH_USER` env var
21
+ or from configured `storageState` paths in `playwright.config.ts`
22
+ - `dismissOnboardingFlow()` — configurable via `QA_DISMISS_ONBOARDING_LABELS`
23
+ (comma-separated button labels); no-op by default
24
+ - Support for a second test user (`.auth/user-2.json`) via `QA_USER2_EMAIL` /
25
+ `QA_USER2_PASSWORD`
26
+ - **`templates/automation-scaffold/playwright.config.ts`** — exports `SESSION_TTL_MS`
27
+ (default 2 h, overridable via `QA_SESSION_TTL_MS`); commented-out parallel 2-user variant
28
+ (`chromium-user1` / `chromium-user2`).
29
+ - **`templates/automation-scaffold/.env.example`** — new variables: `QA_SESSION_TTL_MS`,
30
+ `QA_AUTH_USER`, `QA_USER2_EMAIL`, `QA_USER2_PASSWORD`, `QA_DISMISS_ONBOARDING_LABELS`,
31
+ `PLAYWRIGHT_SERVICE_URL`.
32
+ - **`templates/integration-scaffold/`** — new scaffold for API testing with Playwright
33
+ `APIRequestContext`. Includes `package.json`, `playwright.config.ts`, `global-setup.ts`
34
+ (token-based or browser-login auth), `tests/example.spec.ts`, `README.md`, `.env.example`.
35
+ Deployed to `qa/07-automation/integration/` on `init` and `upgrade`.
36
+ - **`templates/memory/`** — three semi-guided operational memory templates:
37
+ `ci-pipeline-findings.md`, `e2e-stabilization-patterns.md`, `data-volatility-strategies.md`.
38
+ Seeded into `qa/memory/` on `init` and `upgrade`.
39
+ - **`qa/06-defects/disputed/`** — third defect state for cases where QA has evidence but the
40
+ business or dev team disputes the expected behavior. Created on `init` and `upgrade`.
41
+ - **`integrations/ado-powershell/pipelines/azure-pipeline-qa.yml`** — operational hardening:
42
+ - `suiteFilter` pipeline parameter (default `all`); auto-overridden to `all` on scheduled runs
43
+ - Bash array (`GREP_ARGS`) for safe grep pattern expansion with bracket characters
44
+ - `PublishTestResults@2` scoped to exact XML path instead of `**/*.xml`
45
+ - `publishRunAttachments: false` on both E2E and API stages
46
+ - Artifact names suffixed with `$(System.JobAttempt)` to prevent collision on retries
47
+ - `QA_AUTH_USER` documented as commented example for the 2-job parallel model
48
+ - **`integrations/playwright/README.md`** — new section: Visual AI helper optional pattern.
49
+ - **`templates/qa-readme.md`** — new fields: `ADO Project`, `Last Run` summary table,
50
+ `Flaky Tests` inline annotation convention.
25
51
 
26
- This version was bootstrapped from analysis of two existing embedded QA implementations:
27
-
28
- - `redacted-repo` (Repo A) — ASP.NET MVC 5 + jQuery + toastr + Sprint-based E2E
29
- - `redacted-repo` (Repo B) — Blazor WebAssembly + Radzen + full ADO pipeline integration
52
+ ### Changed
30
53
 
31
- All project-specific content (URLs, ADO IDs, user credentials, module names, form selectors)
32
- has been removed or parameterized. See `docs/comparison-matrix.md` and `docs/generalization-decisions.md`.
54
+ - **`scripts/init.js`** — `fixtures/base.ts` added to e2e scaffold copy list; integration
55
+ scaffold replaces the `integration/README.md` placeholder; memory template files seeded
56
+ from `templates/memory/` via `fs.readFileSync`.
57
+ - **`scripts/upgrade.js`** — integration scaffold, `disputed/` defect folder, and memory
58
+ templates are all seeded idempotently on upgrade for existing projects.
59
+ - **`docs/folder-structure-guide.md`** — `06-defects/` updated to document `disputed/`.
60
+ - **`templates/defect-report.md`** — `Status` field extended with `Disputed` value.
61
+ - **`qa/memory/INDEX.md`** template updated to pre-populate rows for the three new memory
62
+ template files.
33
63
 
34
64
  ---
35
65
 
@@ -300,3 +330,18 @@ See `MIGRATION-NOTES.md` — section "Upgrading from a version that used `.githu
300
330
 
301
331
  ---
302
332
 
333
+ ## [1.0.0] - 2026-03-04
334
+
335
+ ### Added
336
+
337
+ - **Framework scaffold** — initial `qa/` directory tree with 9 numbered folders (00–08)
338
+ - **6-file submodule template set** — `00-inventory` through `05-test-scenarios`
339
+ - **Agent instructions** — 7 purpose-specific Markdown instruction files for IDE agents
340
+ - **Standards** — naming conventions, bug report template, test case template, test data guidelines
341
+ - **Automation scaffold** — generalized Playwright `playwright.config.ts`, `global-setup.ts`, `.env.example`, `fixtures/auth.ts`
342
+ - **Optional integrations** — stubs and READMEs for Playwright, `playwright-azure-reporter`, and ADO PowerShell
343
+ - **CLI entry point** — `qa-framework init`, `generate`, `validate` commands
344
+ - **Documentation** — architecture, comparison matrix, generalization decisions, installation guide, usage-with-agent guide, spec-driven philosophy, folder structure guide
345
+ - **Migration notes** — `MIGRATION-NOTES.md` for projects moving from embedded to package-based framework
346
+
347
+ ---
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # qa-framework
2
2
 
3
3
  > Reusable, installable, agent-oriented QA framework for spec-driven automated testing.
4
- > Current version: **v1.9.1**
4
+ > Current version: **v1.12.0**
5
5
 
6
6
  ---
7
7
 
@@ -176,7 +176,7 @@ qa/
176
176
  ├── {module}/{submodule}/ <- 6-file spec sets created per module/submodule in config
177
177
  ├── 02-test-plans/ <- Test plans (automated + manual)
178
178
  ├── 03-test-cases/ <- TC-*.md step-by-step docs (manual track; optional if fully automated)
179
- ├── 04-test-data/ <- Shared test data factories/seeders (optional — per-module data lives in 01-specs)
179
+ ├── 04-test-data/ <- Shared test data factories/seeders (optional - per-module data lives in 01-specs)
180
180
  ├── 05-test-execution/ <- Execution reports and results
181
181
  ├── 06-defects/open|resolved/ <- Defect tracking
182
182
  ├── 07-automation/ <- Playwright automation code and config
@@ -2,18 +2,18 @@
2
2
 
3
3
  ## Framework Architecture
4
4
 
5
- **Version**: 1.6.0
6
- **Date**: 2026-04-29
5
+ **Version**: 1.11.4
6
+ **Date**: 2026-07-08
7
7
 
8
8
  ---
9
9
 
10
10
  ## Design Goals
11
11
 
12
- 1. **Decoupled core** — the framework works without Playwright, without Azure DevOps, without any specific CI/CD system
13
- 2. **Layered optionality** — features are added as explicit opt-in integrations, not baked into the core
14
- 3. **Agent-first design** — every convention exists so that an IDE agent can navigate and produce artifacts predictably
15
- 4. **Spec-before-automation** — the specification layer is always the source of truth; automation references specs, never the reverse
16
- 5. **Parameterization over hardcoding** — project-specific values live in `qa-framework.config.json`, not in framework files
12
+ 1. **Decoupled core** - the framework works without Playwright, without Azure DevOps, without any specific CI/CD system
13
+ 2. **Layered optionality** - features are added as explicit opt-in integrations, not baked into the core
14
+ 3. **Agent-first design** - every convention exists so that an IDE agent can navigate and produce artifacts predictably
15
+ 4. **Spec-before-automation** - the specification layer is always the source of truth; automation references specs, never the reverse
16
+ 5. **Parameterization over hardcoding** - project-specific values live in `qa-framework.config.json`, not in framework files
17
17
 
18
18
  ---
19
19
 
@@ -84,8 +84,10 @@
84
84
  │ ├── 08-azure-integration/ <- optional ADO integration │
85
85
  │ └── memory/ <- agent learnings (project-maintained) │
86
86
  │ │
87
- │ .github/copilot-instructions.md <- generated (framework-owned) │
87
+ │ .github/instructions/qa-framework.instructions.md <- generated (framework) │
88
88
  │ .github/skills/ <- copied from package (framework-owned) │
89
+ │ .claude/rules/qa-framework.md <- generated (framework, Claude Code) │
90
+ │ .claude/commands/qa-*.md <- generated (framework, Claude Code) │
89
91
  └─────────────────────────────────────────────────────────────────────────────┘
90
92
  ```
91
93
 
@@ -98,12 +100,12 @@ Module analysis (agent)
98
100
  │
99
101
  ▼
100
102
  01-specifications/module-X/submodule-Y/
101
- ├── 00-inventory.md ← what exists in the UI
102
- ├── 01-business-rules.md ← RN-* identifiers
103
- ├── 02-workflows.md ← FL-* flowcharts
103
+ ├── 00-inventory.md <- what exists in the UI
104
+ ├── 01-business-rules.md <- RN-* identifiers
105
+ ├── 02-workflows.md <- FL-* flowcharts
104
106
  ├── 03-roles-permissions.md
105
107
  ├── 04-test-data.md
106
- └── 05-test-scenarios.md ← TC-* identifiers ──────────────────────┐
108
+ └── 05-test-scenarios.md <- TC-* identifiers ──────────────────────┐
107
109
  │
108
110
  │ │
109
111
  ▼ ▼
@@ -120,8 +122,8 @@ Module analysis (agent)
120
122
  │
121
123
  ▼
122
124
  [ADO enabled?]
123
- YES → playwright-azure-reporter syncs results to ADO Test Plan
124
- NO → 05-test-execution/automated/{date}.md (local report)
125
+ YES -> playwright-azure-reporter syncs results to ADO Test Plan
126
+ NO -> 05-test-execution/automated/{date}.md (local report)
125
127
  │
126
128
  ▼
127
129
  06-defects/ (if test.skip for known bug)
@@ -132,18 +134,20 @@ Module analysis (agent)
132
134
 
133
135
  ## Layer Definitions
134
136
 
135
- ### Layer 1 — Framework Core (mandatory)
137
+ ### Layer 1 - Framework Core (mandatory)
136
138
 
137
139
  Installed always. Contains:
138
140
 
139
141
  - `qa/` directory skeleton (10 folders)
140
- - `.github/skills/` — 8 agent skill sets (3-layer model: SKILL.md + references/)
141
- - `00-standards/` — naming conventions, templates
142
+ - `.github/skills/` - 8 agent skill sets (3-layer model: SKILL.md + references/)
143
+ - `00-standards/` - naming conventions, templates
142
144
  - `QA-STRUCTURE-GUIDE.md`
143
- - `.github/copilot-instructions.md` — generated pipeline sequencer
145
+ - `.github/instructions/qa-framework.instructions.md` - generated pipeline sequencer (Copilot)
146
+ - `.claude/rules/qa-framework.md` - generated pipeline sequencer (Claude Code, unconditional load)
147
+ - `.claude/commands/qa-*.md` - generated thin wrappers, one per skill (Claude Code)
144
148
  - `qa-framework.config.json` schema
145
149
 
146
- ### Layer 2 — Playwright Integration (opt-in)
150
+ ### Layer 2 - Playwright Integration (opt-in)
147
151
 
148
152
  Installed always (scaffold is always created by `init`):
149
153
 
@@ -156,7 +160,7 @@ Installed always (scaffold is always created by `init`):
156
160
  - `qa/07-automation/integration/README.md` (placeholder)
157
161
  - `qa/07-automation/load/README.md` (placeholder)
158
162
 
159
- ### Layer 3 — Azure DevOps Integration (opt-in)
163
+ ### Layer 3 - Azure DevOps Integration (opt-in)
160
164
 
161
165
  Installed when `integrations.azureDevOps.enabled = true`:
162
166
 
@@ -173,11 +177,11 @@ Installed when `integrations.azureDevOps.enabled = true`:
173
177
  ```
174
178
  qa-framework.config.json (project-level, committed to repo)
175
179
  │
176
- ├── project.* → Display values, URLs (non-secret)
177
- ├── modules[] → Module codes, paths, ADO IDs
178
- ├── conventions.* → Naming patterns, TC ID format
179
- ├── testUsers[] → Role→envVar mapping (NOT credentials)
180
- └── integrations.* → Feature flags + integration config
180
+ ├── project.* -> Display values, URLs (non-secret)
181
+ ├── modules[] -> Module codes, paths, ADO IDs
182
+ ├── conventions.* -> Naming patterns, TC ID format
183
+ ├── testUsers[] -> Role->envVar mapping (NOT credentials)
184
+ └── integrations.* -> Feature flags + integration config
181
185
  │
182
186
  └── credentials come from:
183
187
  .env (local, gitignored)
@@ -227,6 +231,6 @@ Full rules: [docs/folder-structure-guide.md](folder-structure-guide.md)
227
231
 
228
232
  1. The primary test runner is Playwright. Other runners (Jest, Cypress) are not excluded but are not provided adapters in v1.0.
229
233
  2. The target application runs in a browser. Back-end API-only testing is not the primary use case of this framework (though API testing can be added to `07-automation/` as needed).
230
- 3. The IDE agent is GitHub Copilot or equivalent. The instructions are written in Markdown and are IDE-agnostic.
234
+ 3. The IDE agent is GitHub Copilot, Claude Code, or equivalent. The instructions are written in Markdown and are IDE-agnostic; `init`/`upgrade` generate native artifacts for both Copilot (`.github/instructions/`) and Claude Code (`.claude/rules/`, `.claude/commands/`) in parallel, without detecting which agent the consumer uses.
231
235
  4. The project uses Git. The `qa/` directory lives inside the same repository as the application code (monorepo-friendly).
232
236
  5. Credentials are always managed via environment variables. There is no fallback to hardcoded credentials in any framework file.
@@ -0,0 +1,86 @@
1
+ # Decision: the dispatcher calls the lane heartbeat, not the executor
2
+
3
+ **Status**: accepted, not implemented
4
+ **Date**: 2026-09-08
5
+ **Scope**: the N-lane work still pending upstream (FRAMEWORK-FIXES v3 items 1-4, v5 items 1, 2, 4)
6
+
7
+ ---
8
+
9
+ ## Context
10
+
11
+ Parallel QA lanes exist to work around a constraint of the applications under test:
12
+ one account cannot hold two sessions at once, so a second login silently invalidates
13
+ the first. A lane lock assigns each concurrent worker its own account.
14
+
15
+ A lock is only useful if a held lane stays held. The reference implementation
16
+ (`lane-lock.js` in the Sispro Exportadora project) frees a lane when it looks stale,
17
+ using a composite predicate: the acquisition is older than 20 minutes AND either no
18
+ heartbeat was ever sent OR the last heartbeat is itself older than 20 minutes. A
19
+ recent heartbeat proves the holder is alive, so the lane is never swept.
20
+
21
+ That predicate is only as good as whoever calls `heartbeat`.
22
+
23
+ ## The incident that forced the decision
24
+
25
+ On 2026-08-22 a delegated sub-agent spent over 20 minutes on a legitimate live
26
+ investigation - genuine environment congestion, 80 to 90 concurrent browser and node
27
+ processes - and never called `heartbeat`. The sweep did exactly what it was written
28
+ to do and freed the lane while the sub-agent was still driving that account: the
29
+ precise scenario the heartbeat exists to prevent.
30
+
31
+ No cross-session collision followed, but only because a person noticed the lane was
32
+ free with no matching completion report, paused the sub-agent, confirmed by explicit
33
+ reply that nothing had run against the browser after the sweep, and re-reserved the
34
+ lane. The protection failed by design and was caught by attentiveness.
35
+
36
+ ## Decision
37
+
38
+ **The dispatcher calls `heartbeat` from its own wait loop.** The executor is not
39
+ required to call it and must not be relied upon to.
40
+
41
+ ## Why
42
+
43
+ The executor option fails for a structural reason, not a discipline one. A delegated
44
+ agent has no reason to discover `heartbeat` unless the dispatching prompt tells it,
45
+ every single time. That is the same failure this project has now recorded four times
46
+ over: a known-issues record that existed and was not consulted, an orthography rule
47
+ that was asserted rather than measured, and this heartbeat. A mechanism whose
48
+ protection depends on correctly instructing an uninstructed party is not a control.
49
+
50
+ The dispatcher, by contrast, already knows whether the task is still running - it can
51
+ query task state directly. The executor cannot see how long it has been between its
52
+ own tool calls. Putting the call where the knowledge already is removes the
53
+ instruction step entirely, which is where option 1 actually broke.
54
+
55
+ The cost is real and accepted: the dispatcher's wait loop becomes more complex, and
56
+ the concrete implementation is agent-specific rather than framework-generic.
57
+
58
+ ## Layering
59
+
60
+ This follows the split established in FRAMEWORK-FIXES v3 section 5.
61
+
62
+ The agent-agnostic framework states the requirement: a lane must be acquired through
63
+ the lock before any worker is dispatched against it, released when the work ends, and
64
+ kept alive by the dispatcher while the work is in flight. Each agent's adaptation
65
+ prescribes the mechanism. For Claude Code that means a `/loop` wrapper with a
66
+ `ScheduleWakeup` fallback and a non-blocking task-state check - primitives that have
67
+ no equivalent in other agents, and so must not be written into
68
+ `templates/qa-framework.instructions.md`.
69
+
70
+ ## Consequences
71
+
72
+ - The N-lane scaffold ships `heartbeat` together with the rule naming its caller.
73
+ Shipping the sweep without that answer reproduces the 2026-08-22 incident in every
74
+ project that adopts it.
75
+ - A lane held far longer than the application's session TTL is a signal to verify,
76
+ not a defect to ignore. Each project's agent-specific instructions must define how
77
+ it verifies a lock is still legitimately held and how it clears a stale one.
78
+ - Neither option was implemented in the originating project, so there is no verified
79
+ reference implementation of the dispatcher-side loop to lift. It has to be written.
80
+
81
+ ## Sources
82
+
83
+ - `temp/FRAMEWORK-FIXES-qa-framework-v5.md` item 5, which framed the fork and
84
+ recommended this side.
85
+ - `temp/FRAMEWORK-FIXES-qa-framework-v3.md` section 5, for the agent-agnostic versus
86
+ agent-specific split.
@@ -1,4 +1,4 @@
1
- # Phase 6 — Final Report: keber/qa-framework
1
+ # Phase 6 - Final Report: keber/qa-framework
2
2
 
3
3
  **Date**: 2025-01-15
4
4
  **Version analyzed**: 1.0.0
@@ -26,29 +26,29 @@ procedures documented in `MIGRATION-NOTES.md`.
26
26
 
27
27
  ## 2. Source Repository Findings
28
28
 
29
- ### Repo A — redacted-repo-web
29
+ ### Repo A - redacted-repo-web
30
30
 
31
31
  | Category | Finding |
32
32
  |----------|---------|
33
33
  | Stack | ASP.NET MVC 5 + Web API 2 + SQL Server |
34
34
  | Frontend | jQuery + Select2 + toastr + SweetAlert2 + Metronic |
35
35
  | Auth | RUT-based login (`#m_login_signin_submit`) |
36
- | QA maturity | Medium — spec files present, standards missing |
36
+ | QA maturity | Medium - spec files present, standards missing |
37
37
  | Automation | Sprint 40: 26 P0 tests (24 pass, 2 skip via DEF-001/DEF-002) |
38
38
  | ADO | Referenced (Plan 21992/Suite 21993) but not reporter-integrated |
39
39
  | Modules | 7 submodules documented (~160 TCs across 82 QA files) |
40
40
  | Strengths | EXEC_IDX pattern, POM structure, multi-role auth, skip+DEF |
41
41
  | Gaps | No `00-standards/`, no `08-azure-integration/`, no session summaries |
42
42
 
43
- ### Repo B — redacted-repo
43
+ ### Repo B - redacted-repo
44
44
 
45
45
  | Category | Finding |
46
46
  |----------|---------|
47
47
  | Stack | Blazor WebAssembly + .NET + Radzen components |
48
48
  | Auth | Email-based (`#email-input` / `#password-input`) |
49
- | QA maturity | High — complete standards folder, ADO fully integrated |
49
+ | QA maturity | High - complete standards folder, ADO fully integrated |
50
50
  | Automation | 67 automated TCs (53 pass / 2 fail / 12 skip) |
51
- | ADO | Full: Plans 22304/22794/22875, WI IDs 22957–23034, bi-directional sync |
51
+ | ADO | Full: Plans 22304/22794/22875, WI IDs 22957-23034, bi-directional sync |
52
52
  | Modules | 4 modules × 17+ submodules (~894 TCs) |
53
53
  | Strengths | `00-standards/`, `08-azure-integration/`, module-registry, ado reporter |
54
54
  | Gaps | No EXEC_IDX pattern, no POM convention, no session summaries |
@@ -61,9 +61,9 @@ procedures documented in `MIGRATION-NOTES.md`.
61
61
  |---------|--------|----------|
62
62
  | 6-file submodule spec pattern | Both | Core framework pattern |
63
63
  | Playwright `@playwright/test` | Both | Standard automation library |
64
- | Priority levels P0–P3 | Both | Universal tagging via `@PX` |
64
+ | Priority levels P0-P3 | Both | Universal tagging via `@PX` |
65
65
  | `test.skip()` + DEF reference | Repo A | Adopted as standard skip convention |
66
- | `06-defects/` folder | Repo A | Optional — recommended without ADO |
66
+ | `06-defects/` folder | Repo A | Optional - recommended without ADO |
67
67
  | `00-standards/` folder | Repo B | Adopted; templates included |
68
68
  | `08-azure-integration/` folder | Repo B | Optional; fully documented |
69
69
  | `module-registry.json` | Repo B | Included in ADO integration |
@@ -85,7 +85,7 @@ procedures documented in `MIGRATION-NOTES.md`.
85
85
  | RUT-based username field | Repo A | Parameterized via `QA_LOGIN_EMAIL_SELECTOR` |
86
86
  | `#email-input` / `#password-input` | Repo B | Parameterized via env vars |
87
87
  | ADO Plan IDs (21992, 22304, etc.) | Both | Parameterized via `QA_ADO_PLAN_ID` |
88
- | ADO WI IDs (22957–23034) | Repo B | Injected per-project via inject-ado-ids.ps1 |
88
+ | ADO WI IDs (22957-23034) | Repo B | Injected per-project via inject-ado-ids.ps1 |
89
89
  | Specific module names/selectors | Both | Remain in project-specific spec files |
90
90
  | Sprint numbers | Both | Remain in project-specific test plans |
91
91
  | Metronic theme selectors | Repo A | Project-specific; documented in Repo A specs |
@@ -110,7 +110,7 @@ Fifteen formal decisions were made and documented in `docs/generalization-decisi
110
110
  | §8 | POM pattern | Recommended (Repo A); inline acceptable |
111
111
  | §9 | Standards folder | Adopted from Repo B (more complete) |
112
112
  | §10 | Session summaries | New addition to both repos' patterns |
113
- | §11 | Priority levels | P0–P3 universal; `@P0` grep-tag convention |
113
+ | §11 | Priority levels | P0-P3 universal; `@P0` grep-tag convention |
114
114
  | §12 | `08-azure-integration/` | Optional; fully documented scripts |
115
115
  | §13 | CI pipeline | Parameterized `azure-pipeline-qa.yml` |
116
116
  | §14 | Framework distribution | npm package (`keber/qa-framework`) |
@@ -122,23 +122,23 @@ Fifteen formal decisions were made and documented in `docs/generalization-decisi
122
122
 
123
123
  ```
124
124
  qa-framework/
125
- ├── package.json ← npm package, CLI entry
126
- ├── qa-framework.config.json ← example project config
125
+ ├── package.json <- npm package, CLI entry
126
+ ├── qa-framework.config.json <- example project config
127
127
  ├── README.md
128
128
  ├── CHANGELOG.md
129
129
  ├── MIGRATION-NOTES.md
130
130
  │
131
131
  ├── docs/
132
- │ ├── architecture.md ← 4-layer component map
133
- │ ├── comparison-matrix.md ← Phase 1 artifact
134
- │ ├── generalization-decisions.md ← Phase 2 artifact (15 decisions)
135
- │ ├── installation.md ← 3 install options
136
- │ ├── spec-driven-philosophy.md ← Core methodology
137
- │ ├── folder-structure-guide.md ← Full folder reference
138
- │ ├── usage-with-agent.md ← Agent prompt patterns
139
- │ └── final-report.md ← This file
132
+ │ ├── architecture.md <- 4-layer component map
133
+ │ ├── comparison-matrix.md <- Phase 1 artifact
134
+ │ ├── generalization-decisions.md <- Phase 2 artifact (15 decisions)
135
+ │ ├── installation.md <- 3 install options
136
+ │ ├── spec-driven-philosophy.md <- Core methodology
137
+ │ ├── folder-structure-guide.md <- Full folder reference
138
+ │ ├── usage-with-agent.md <- Agent prompt patterns
139
+ │ └── final-report.md <- This file
140
140
  │
141
- ├── agent-instructions/ ← Consumed by Copilot agent
141
+ ├── agent-instructions/ <- Consumed by Copilot agent
142
142
  │ ├── 00-module-analysis.md
143
143
  │ ├── 01-spec-generation.md
144
144
  │ ├── 02-test-plan-generation.md
@@ -148,7 +148,7 @@ qa-framework/
148
148
  │ └── 06-maintenance.md
149
149
  │
150
150
  ├── templates/
151
- │ ├── specification/ ← 6-file submodule template set
151
+ │ ├── specification/ <- 6-file submodule template set
152
152
  │ │ ├── 00-inventory.md
153
153
  │ │ ├── 01-business-rules.md
154
154
  │ │ ├── 02-workflows.md
@@ -188,7 +188,7 @@ qa-framework/
188
188
  │ ├── 00-inventory.md
189
189
  │ └── suppliers-create.spec.ts
190
190
  │
191
- └── scripts/ ← CLI implementation
191
+ └── scripts/ <- CLI implementation
192
192
  ├── cli.js
193
193
  ├── init.js
194
194
  ├── generate.js