pumuki 6.3.13 → 6.3.15

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 (66) hide show
  1. package/README.md +95 -7
  2. package/VERSION +1 -1
  3. package/bin/pumuki-mcp-enterprise.js +5 -0
  4. package/bin/pumuki-pre-write.js +11 -0
  5. package/docs/API_REFERENCE.md +2 -1
  6. package/docs/CORE_INTEGRATIONS_UNTESTED_INVENTORY.md +57 -0
  7. package/docs/INSTALLATION.md +101 -54
  8. package/docs/MCP_SERVERS.md +167 -74
  9. package/docs/PUMUKI_FULL_VALIDATION_CHECKLIST.md +46 -45
  10. package/docs/PUMUKI_OPENSPEC_SDD_ROADMAP.md +55 -0
  11. package/docs/README.md +9 -0
  12. package/docs/REFRACTOR_PROGRESS.md +288 -6
  13. package/docs/USAGE.md +115 -8
  14. package/docs/validation/README.md +5 -0
  15. package/docs/validation/mock-consumer-next-cycle-enterprise-checklist.md +68 -0
  16. package/docs/validation/mock-consumer-next-round-scope.md +222 -0
  17. package/docs/validation/mock-consumer-post-release-handoff-pack.md +486 -0
  18. package/docs/validation/phase12-go-no-go-report.md +73 -0
  19. package/docs/validation/post-phase12-next-lot-decision.md +75 -0
  20. package/integrations/config/skillsRuleSet.ts +53 -6
  21. package/integrations/evidence/buildEvidence.ts +42 -3
  22. package/integrations/evidence/generateEvidence.test.ts +59 -0
  23. package/integrations/evidence/readEvidence.test.ts +61 -0
  24. package/integrations/evidence/schema.test.ts +81 -0
  25. package/integrations/evidence/schema.ts +11 -0
  26. package/integrations/evidence/writeEvidence.test.ts +18 -0
  27. package/integrations/evidence/writeEvidence.ts +11 -0
  28. package/integrations/git/resolveGitRefs.ts +2 -2
  29. package/integrations/git/runPlatformGate.ts +64 -0
  30. package/integrations/git/runPlatformGateEvidence.ts +13 -0
  31. package/integrations/git/stageRunners.ts +10 -1
  32. package/integrations/lifecycle/artifacts.ts +57 -4
  33. package/integrations/lifecycle/cli.ts +248 -12
  34. package/integrations/lifecycle/constants.ts +1 -0
  35. package/integrations/lifecycle/gitService.ts +1 -0
  36. package/integrations/lifecycle/install.ts +24 -1
  37. package/integrations/lifecycle/openSpecBootstrap.ts +190 -0
  38. package/integrations/lifecycle/state.ts +57 -0
  39. package/integrations/lifecycle/uninstall.ts +3 -1
  40. package/integrations/lifecycle/update.ts +11 -0
  41. package/integrations/mcp/enterpriseServer.cli.ts +12 -0
  42. package/integrations/mcp/enterpriseServer.ts +762 -0
  43. package/integrations/mcp/evidenceFacets.ts +5 -2
  44. package/integrations/mcp/evidenceFacetsBase.ts +3 -94
  45. package/integrations/mcp/evidenceFacetsFindings.ts +39 -0
  46. package/integrations/mcp/evidenceFacetsLedger.ts +27 -0
  47. package/integrations/mcp/evidenceFacetsPlatforms.ts +21 -0
  48. package/integrations/mcp/evidenceFacetsRulesets.ts +53 -0
  49. package/integrations/mcp/evidenceFacetsSeverity.ts +62 -0
  50. package/integrations/mcp/evidenceFacetsSnapshot.ts +4 -104
  51. package/integrations/mcp/evidencePayloadBuilders.ts +2 -0
  52. package/integrations/mcp/evidencePayloadContext.ts +5 -0
  53. package/integrations/mcp/evidencePayloadStatus.ts +100 -0
  54. package/integrations/mcp/evidencePayloadSummary.ts +0 -81
  55. package/integrations/mcp/evidencePayloads.ts +2 -8
  56. package/integrations/mcp/index.ts +1 -0
  57. package/integrations/sdd/index.ts +11 -0
  58. package/integrations/sdd/openSpecCli.ts +180 -0
  59. package/integrations/sdd/policy.ts +190 -0
  60. package/integrations/sdd/sessionStore.ts +152 -0
  61. package/integrations/sdd/types.ts +69 -0
  62. package/package.json +10 -5
  63. package/scripts/framework-menu-runner-path-lib.ts +10 -3
  64. package/scripts/framework-menu.ts +86 -5
  65. package/scripts/package-install-smoke-gate-lib.ts +6 -1
  66. package/scripts/package-install-smoke-lifecycle-lib.ts +3 -0
@@ -0,0 +1,486 @@
1
+ # Mock Consumer Post-Release Handoff Pack
2
+
3
+ This runbook captures the operational hand-off package for the normalized mock baseline used after the `pumuki@6.3.14` release hardening cycle.
4
+
5
+ ## Scope
6
+
7
+ - Target repository: `pumuki-mock-consumer`
8
+ - Goal: run deterministic validation rounds without baseline drift.
9
+ - Outcome contract:
10
+ - matrix checks deterministic (`clean=0/0/0`, `violations=1/1/1`, `mixed=1/1/1`)
11
+ - stage evidence contract stable (`PRE_COMMIT`, `PRE_PUSH`, `CI`)
12
+
13
+ ## Baseline References
14
+
15
+ Mock branch `feat/pumuki-validation` includes the key hardening commits:
16
+
17
+ - `0521546`: matrix opens/closes SDD session per scenario
18
+ - `b82b4cb`: normalized baseline (apps + rules + package files)
19
+ - `33c6614`: clean scenario includes backend domain test artifact
20
+ - `4cdb11e`: clean scenario includes backend spec artifact (`.ts`) for BDD coupling
21
+ - `2023e34`: matrix runner seeds clean baseline before each scenario
22
+
23
+ ## Reproducible Commands
24
+
25
+ ### 1) Deterministic Matrix Validation
26
+
27
+ ```bash
28
+ cd /Users/juancarlosmerlosalbarracin/Developer/Projects/pumuki-mock-consumer
29
+ npm install --save-exact pumuki@6.3.14
30
+ npm run pumuki:matrix
31
+ ```
32
+
33
+ Expected result:
34
+
35
+ - `scenario:clean` => `pre-commit=0 pre-push=0 ci=0`
36
+ - `scenario:violations` => `pre-commit=1 pre-push=1 ci=1`
37
+ - `scenario:mixed` => `pre-commit=1 pre-push=1 ci=1`
38
+ - final line: `All scenario matrix checks passed for package: pumuki@latest`
39
+
40
+ ### 2) Stage/Evidence Contract Validation (Violations Path)
41
+
42
+ Use a temp clone to avoid mutating the working baseline:
43
+
44
+ ```bash
45
+ TMP_DIR="$(mktemp -d /tmp/pumuki-stage-evidence-XXXXXX)"
46
+ git clone /Users/juancarlosmerlosalbarracin/Developer/Projects/pumuki-mock-consumer "$TMP_DIR/repo"
47
+ cd "$TMP_DIR/repo"
48
+
49
+ npm run pumuki:matrix
50
+ npm install --save-exact pumuki@6.3.14
51
+ npx pumuki install
52
+ npx openspec new change stage-evidence --description "stage evidence validation"
53
+ npx pumuki sdd session --open --change=stage-evidence
54
+
55
+ # deterministic seed
56
+ npm run scenario:clean
57
+ git add apps
58
+ git commit --no-verify -m "tmp: stage evidence clean seed" || true
59
+ git branch -f upstream-stage-evidence HEAD
60
+ git branch --set-upstream-to=upstream-stage-evidence
61
+
62
+ # violations path
63
+ npm run scenario:violations
64
+ git add apps
65
+ npx pumuki-pre-commit; echo "pre_commit_exit=$?"
66
+ jq -c '{stage:.snapshot.stage,outcome:.snapshot.outcome,total_findings:(.snapshot.findings|length),rulesets:((.rulesets//[])|map(.bundle)|sort)}' .ai_evidence.json
67
+
68
+ git commit --no-verify -m "tmp: stage evidence violations" || true
69
+ git branch -f upstream-stage-evidence HEAD~1
70
+ git branch --set-upstream-to=upstream-stage-evidence
71
+
72
+ npx pumuki-pre-push; echo "pre_push_exit=$?"
73
+ jq -c '{stage:.snapshot.stage,outcome:.snapshot.outcome,total_findings:(.snapshot.findings|length),rulesets:((.rulesets//[])|map(.bundle)|sort)}' .ai_evidence.json
74
+
75
+ GITHUB_BASE_REF=upstream-stage-evidence npx pumuki-ci; echo "ci_exit=$?"
76
+ jq -c '{stage:.snapshot.stage,outcome:.snapshot.outcome,total_findings:(.snapshot.findings|length),rulesets:((.rulesets//[])|map(.bundle)|sort)}' .ai_evidence.json
77
+ ```
78
+
79
+ Expected stage contract:
80
+
81
+ - `pre_commit_exit=1`, `snapshot.stage=PRE_COMMIT`, `snapshot.outcome=BLOCK`
82
+ - `pre_push_exit=1`, `snapshot.stage=PRE_PUSH`, `snapshot.outcome=BLOCK`
83
+ - `ci_exit=1`, `snapshot.stage=CI`, `snapshot.outcome=BLOCK`
84
+
85
+ Expected bundles present in summaries:
86
+
87
+ - `androidRuleSet@1.0.0`
88
+ - `backendRuleSet@1.0.0`
89
+ - `frontendRuleSet@1.0.0`
90
+ - `iosEnterpriseRuleSet@1.0.0`
91
+ - `project-rules`
92
+ - `gate-policy.default.<stage>`
93
+
94
+ ## Latest Operational Output (real user environment)
95
+
96
+ Execution date: `2026-02-18`
97
+ Source environment:
98
+ - real repo: `/Users/juancarlosmerlosalbarracin/Developer/Projects/pumuki-mock-consumer`
99
+ - stage/evidence temp clone root: `/tmp/pumuki-stage-evidence-25sqIb`
100
+
101
+ Observed results:
102
+ - matrix:
103
+ - `clean`: `pre-commit=0 pre-push=0 ci=0`
104
+ - `violations`: `pre-commit=1 pre-push=1 ci=1`
105
+ - `mixed`: `pre-commit=1 pre-push=1 ci=1`
106
+ - final line: `All scenario matrix checks passed for package: pumuki@latest`
107
+ - stage/evidence violations path:
108
+ - `pre_commit_exit=1` with `{"stage":"PRE_COMMIT","outcome":"BLOCK","total_findings":22,...}`
109
+ - `pre_push_exit=1` with `{"stage":"PRE_PUSH","outcome":"BLOCK","total_findings":39,...}`
110
+ - `ci_exit=1` with `{"stage":"CI","outcome":"BLOCK","total_findings":39,...}`
111
+ - bundles confirmed in summaries:
112
+ - `androidRuleSet@1.0.0`
113
+ - `backendRuleSet@1.0.0`
114
+ - `frontendRuleSet@1.0.0`
115
+ - `iosEnterpriseRuleSet@1.0.0`
116
+ - `project-rules`
117
+ - `gate-policy.default.PRE_COMMIT|PRE_PUSH|CI`
118
+
119
+ ## Next-Cycle Execution Output (real user environment)
120
+
121
+ Execution date: `2026-02-18`
122
+ Source environment:
123
+ - real repo: `/Users/juancarlosmerlosalbarracin/Developer/Projects/pumuki-mock-consumer`
124
+
125
+ Observed matrix result:
126
+ - `npm run pumuki:matrix` failed in `scenario:clean` before gates:
127
+ - `ERROR: failed to create OpenSpec change for scenario 'clean'.`
128
+ - `npm error could not determine executable to run`
129
+ - root cause (reproduced):
130
+ - matrix internal clone installs only `pumuki` (`npm install --save-exact pumuki@...`)
131
+ - `@fission-ai/openspec` is not installed in that clone
132
+ - `npx openspec` cannot resolve local bin and falls back to package `openspec` (no executable contract for this flow)
133
+
134
+ Stage/evidence fallback validation (manual temp clone with explicit OpenSpec preinstall):
135
+ - temp repo: `/tmp/pumuki-stage-evidence-next-manual-umLTI6/repo`
136
+ - preinstall:
137
+ - `npm install --save-dev --save-exact @fission-ai/openspec@latest`
138
+ - `npm install --save-exact pumuki@6.3.14`
139
+ - results:
140
+ - `pre_commit_exit=1` with `PRE_COMMIT/BLOCK/22`
141
+ - `pre_push_exit=1` with `PRE_PUSH/BLOCK/39`
142
+ - `ci_exit=1` with `CI/BLOCK/39`
143
+ - bundle contract check: `{"android":true,"backend":true,"frontend":true,"ios":true,"project_rules":true,"gate_policy":true}`
144
+
145
+ Operational conclusion:
146
+ - Stage/evidence contract remains stable.
147
+ - Deterministic matrix is currently blocked by OpenSpec dependency resolution in matrix clone bootstrap.
148
+
149
+ ### Remediation Applied (same cycle)
150
+
151
+ Fix applied in mock repository:
152
+ - repo: `/Users/juancarlosmerlosalbarracin/Developer/Projects/pumuki-mock-consumer`
153
+ - commit: `8f57767`
154
+ - change: `scripts/run-pumuki-matrix.sh` now performs explicit OpenSpec bootstrap in each internal clone stage before opening SDD session.
155
+
156
+ Post-fix verification:
157
+ - command: `npm run pumuki:matrix`
158
+ - result:
159
+ - `clean`: `pre-commit=0 pre-push=0 ci=0`
160
+ - `violations`: `pre-commit=1 pre-push=1 ci=1`
161
+ - `mixed`: `pre-commit=1 pre-push=1 ci=1`
162
+ - final line: `All scenario matrix checks passed for package: pumuki@latest`
163
+
164
+ Updated operational conclusion:
165
+ - Stage/evidence contract stable.
166
+ - Deterministic matrix recovered without manual OpenSpec workaround.
167
+
168
+ ## Next-Cycle Final Output (baseline normalized)
169
+
170
+ Execution date: `2026-02-18`
171
+ Source environment:
172
+ - real repo: `/Users/juancarlosmerlosalbarracin/Developer/Projects/pumuki-mock-consumer`
173
+ - temp repo (stage/evidence): `/tmp/pumuki-stage-evidence-next-final-9e7qEM/repo`
174
+
175
+ Observed matrix result (real repo):
176
+ - `clean`: `pre-commit=0 pre-push=0 ci=0`
177
+ - `violations`: `pre-commit=1 pre-push=1 ci=1`
178
+ - `mixed`: `pre-commit=1 pre-push=1 ci=1`
179
+ - final line: `All scenario matrix checks passed for package: pumuki@latest`
180
+
181
+ Observed stage/evidence contract result (temp repo):
182
+ - `pre_commit_exit=1` with `PRE_COMMIT/BLOCK/22`
183
+ - `pre_push_exit=1` with `PRE_PUSH/BLOCK/39`
184
+ - `ci_exit=1` with `CI/BLOCK/39`
185
+ - bundle contract check:
186
+ - `android=true`
187
+ - `backend=true`
188
+ - `frontend=true`
189
+ - `ios=true`
190
+ - `project_rules=true`
191
+ - `gate_policy=true`
192
+
193
+ Final conclusion for this round:
194
+ - Matrix deterministic contract: `PASS`
195
+ - Stage/evidence contract: `PASS`
196
+ - Baseline drift in real mock repo: `NONE` (`git status` clean)
197
+
198
+ ## Next-Round Task 1 Output (dirty baseline guardrail)
199
+
200
+ Execution date: `2026-02-18`
201
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
202
+
203
+ Implementation:
204
+ - commit: `5f8c06b`
205
+ - change: preflight guard added to matrix runner to fail-fast when source repo baseline is dirty (before clone/scenario execution).
206
+
207
+ Validation evidence:
208
+ - dirty baseline run:
209
+ - command: `npm run pumuki:matrix`
210
+ - exit: `17`
211
+ - message:
212
+ - `ERROR: source repository baseline is dirty; matrix runner requires a clean baseline.`
213
+ - actionable guidance includes `git -C "<repo>" status --short --branch` and cleanup instruction.
214
+ - clean baseline run (after commit):
215
+ - command: `npm run pumuki:matrix`
216
+ - result:
217
+ - `clean`: `0/0/0`
218
+ - `violations`: `1/1/1`
219
+ - `mixed`: `1/1/1`
220
+ - final line: `All scenario matrix checks passed for package: pumuki@latest`
221
+
222
+ Conclusion:
223
+ - fail-fast operator safety guard is active and deterministic.
224
+ - clean-baseline deterministic contract is preserved.
225
+
226
+ ## Next-Round Task 2 Output (deterministic matrix summary artifact)
227
+
228
+ Execution date: `2026-02-18`
229
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
230
+
231
+ Implementation:
232
+ - commit: `24dd39a`
233
+ - change: matrix runner now writes `artifacts/pumuki-matrix-summary.json` after successful runs.
234
+
235
+ Validation evidence:
236
+ - command: `npm run pumuki:matrix`
237
+ - console contract preserved:
238
+ - `clean`: `pre-commit=0 pre-push=0 ci=0`
239
+ - `violations`: `pre-commit=1 pre-push=1 ci=1`
240
+ - `mixed`: `pre-commit=1 pre-push=1 ci=1`
241
+ - final line unchanged: `All scenario matrix checks passed for package: pumuki@latest`
242
+ - artifact output:
243
+ - path: `artifacts/pumuki-matrix-summary.json`
244
+ - sample contract (`jq`):
245
+ - `package_spec="pumuki@latest"`
246
+ - `final_verdict="PASS"`
247
+ - `generated_at_utc` present
248
+ - `scenarios.clean|violations|mixed` include `pre_commit_exit`, `pre_push_exit`, `ci_exit`
249
+ - assertion check: `summary_contract=PASS`
250
+
251
+ Conclusion:
252
+ - deterministic summary artifact is produced and parseable.
253
+ - existing matrix stage-exit behavior and console output contract remain stable.
254
+
255
+ ## Next-Round Task 3 Output (no stale summary on failed runs)
256
+
257
+ Execution date: `2026-02-18`
258
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
259
+
260
+ Implementation:
261
+ - commit: `9b49a6e`
262
+ - change: runner now deletes `artifacts/pumuki-matrix-summary.json` at run start and on non-zero exit, preventing stale `PASS` artifacts after failures.
263
+
264
+ Validation evidence (`fail -> pass -> fail`):
265
+ - `A_exit=17 A_summary_exists=0`
266
+ - `B_summary_exists=1 B_verdict=PASS`
267
+ - `C_exit=17 C_summary_exists=0`
268
+
269
+ Conclusion:
270
+ - failed runs no longer leave stale-success summary artifacts.
271
+ - successful runs keep generating a valid parseable `PASS` summary with unchanged console contract.
272
+
273
+ ## Next-Round Task 4 Output (deterministic last-failure artifact)
274
+
275
+ Execution date: `2026-02-18`
276
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
277
+
278
+ Implementation:
279
+ - commit: `d3427c7`
280
+ - change: runner now writes `artifacts/pumuki-matrix-last-failure.json` on non-zero exit (`final_verdict=FAIL`, `exit_code`, `failure_phase`) and removes stale failure artifact on successful runs.
281
+
282
+ Validation evidence (`fail -> pass -> fail`):
283
+ - `A_exit=17 A_summary_exists=0 A_failure_exists=1 A_failure={"final_verdict":"FAIL","exit_code":17,"failure_phase":"preflight","package_spec":"pumuki@latest"}`
284
+ - `B_summary_exists=1 B_failure_exists=0 B_summary={"final_verdict":"PASS","package_spec":"pumuki@latest"}`
285
+ - `C_exit=17 C_summary_exists=0 C_failure_exists=1 C_failure={"final_verdict":"FAIL","exit_code":17,"failure_phase":"preflight","package_spec":"pumuki@latest"}`
286
+
287
+ Conclusion:
288
+ - failed runs now leave deterministic machine-readable failure state.
289
+ - successful runs clear stale failure state while preserving current PASS summary behavior and console contract.
290
+
291
+ ## Next-Round Task 5 Output (failure context metadata)
292
+
293
+ Execution date: `2026-02-18`
294
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
295
+
296
+ Implementation:
297
+ - commit: `5af7ded`
298
+ - change: `pumuki-matrix-last-failure.json` now includes deterministic `failure_step` and `failure_log_path`, with scenario-aware failure context after preflight.
299
+
300
+ Validation evidence:
301
+ - dirty preflight failure:
302
+ - `dirty_exit=17`
303
+ - `dirty_failure={"final_verdict":"FAIL","exit_code":17,"failure_phase":"preflight","failure_step":"source_repo_cleanliness","failure_log_path":null,"package_spec":"pumuki@latest"}`
304
+ - successful matrix run:
305
+ - `pass_summary_exists=1`
306
+ - `pass_failure_exists=0`
307
+ - `pass_summary={"final_verdict":"PASS","package_spec":"pumuki@latest"}`
308
+ - forced scenario failure after preflight (invalid package):
309
+ - `scenario_exit=1`
310
+ - `scenario_failure={"final_verdict":"FAIL","exit_code":1,"failure_phase":"clean","failure_step":"npm_install_package","failure_log_path":"/tmp/pumuki-clean-npm-install.log","package_spec":"pumuki@0.0.0-not-a-real-version"}`
311
+ - `scenario_log_exists=1`
312
+ - `summary_exists_after_scenario_fail=0`
313
+
314
+ Conclusion:
315
+ - failure metadata now supports deterministic step-level and scenario-aware triage context.
316
+ - backward-compatible fields remain intact while console/summary contracts stay stable.
317
+
318
+ ## Next-Round Task 6 Output (run-id correlation across artifacts)
319
+
320
+ Execution date: `2026-02-18`
321
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
322
+
323
+ Implementation:
324
+ - commit: `a9d9b29`
325
+ - change: artifacts now include shared per-execution `run_id`:
326
+ - `pumuki-matrix-summary.json.run_id`
327
+ - `pumuki-matrix-last-failure.json.run_id`
328
+
329
+ Validation evidence:
330
+ - dirty preflight failure:
331
+ - `preflight_exit=17`
332
+ - `preflight={"final_verdict":"FAIL","exit_code":17,"failure_phase":"preflight","run_id":"pumuki-matrix-20260218T193834Z-45255"}`
333
+ - successful matrix run:
334
+ - `pass_summary={"final_verdict":"PASS","package_spec":"pumuki@latest","run_id":"pumuki-matrix-20260218T193834Z-45291"}`
335
+ - `pass_failure_exists=0`
336
+ - `pass_last_line=All scenario matrix checks passed for package: pumuki@latest`
337
+ - forced scenario failure after preflight (invalid package):
338
+ - `scenario_exit=1`
339
+ - `scenario={"final_verdict":"FAIL","exit_code":1,"failure_phase":"clean","failure_step":"npm_install_package","run_id":"pumuki-matrix-20260218T193910Z-51028"}`
340
+ - `summary_exists_after_scenario_fail=0`
341
+ - run-id checks:
342
+ - `preflight_non_empty=yes`
343
+ - `summary_non_empty=yes`
344
+ - `scenario_non_empty=yes`
345
+ - `scenario_stable=yes`
346
+
347
+ Conclusion:
348
+ - both success and failure artifacts now carry deterministic non-empty `run_id`.
349
+ - compatibility and console contract remain unchanged.
350
+
351
+ ## Next-Round Task 7 Output (portable failure log artifact)
352
+
353
+ Execution date: `2026-02-18`
354
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
355
+
356
+ Implementation:
357
+ - commit: `a4fb8e8`
358
+ - change: when a failure has an internal log, runner now copies it into `artifacts/pumuki-matrix-last-failure.log` and exposes path via `failure_log_artifact` in `pumuki-matrix-last-failure.json`.
359
+
360
+ Validation evidence:
361
+ - preflight dirty failure:
362
+ - `preflight_exit=17`
363
+ - `preflight={"final_verdict":"FAIL","exit_code":17,"failure_phase":"preflight","failure_step":"source_repo_cleanliness","failure_log_artifact":null,"run_id":"pumuki-matrix-..."}`
364
+ - scenario failure after preflight (invalid package):
365
+ - `scenario_exit=1`
366
+ - `scenario={"final_verdict":"FAIL","exit_code":1,"failure_phase":"clean","failure_step":"npm_install_package","failure_log_artifact":"/Users/juancarlosmerlosalbarracin/Developer/Projects/pumuki-mock-consumer/artifacts/pumuki-matrix-last-failure.log","run_id":"pumuki-matrix-..."}`
367
+ - `scenario_log_artifact_exists=1`
368
+ - successful run after failure:
369
+ - `pass_summary_exists=1`
370
+ - `pass_failure_json_exists=0`
371
+ - `pass_failure_log_artifact_exists=0`
372
+ - `pass_last_line=All scenario matrix checks passed for package: pumuki@latest`
373
+
374
+ Conclusion:
375
+ - failure triage now includes a portable artifact-local log reference.
376
+ - successful runs continue to clean stale failure state and preserve console contract.
377
+
378
+ ## Next-Round Task 8 Output (failure log integrity metadata)
379
+
380
+ Execution date: `2026-02-18`
381
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
382
+
383
+ Implementation:
384
+ - commit: `ecf4e9c`
385
+ - change: `pumuki-matrix-last-failure.json` now includes:
386
+ - `failure_log_artifact_sha256`
387
+ - `failure_log_artifact_bytes`
388
+ when a copied failure log artifact exists.
389
+
390
+ Validation evidence:
391
+ - preflight dirty failure:
392
+ - `preflight_exit=17`
393
+ - `preflight={"exit_code":17,"failure_phase":"preflight","failure_step":"source_repo_cleanliness","failure_log_artifact":null,"failure_log_artifact_sha256":null,"failure_log_artifact_bytes":null}`
394
+ - scenario failure after preflight (invalid package):
395
+ - `scenario_exit=1`
396
+ - `scenario={"exit_code":1,"failure_phase":"clean","failure_step":"npm_install_package","failure_log_artifact":"/.../artifacts/pumuki-matrix-last-failure.log","failure_log_artifact_sha256":"6104e2d84cf61e7deb6522aa6ea6bef2eb90d6352eed8b35feda185fa745d896","failure_log_artifact_bytes":378}`
397
+ - `scenario_checks={"artifact_exists":true,"sha256_non_empty":true,"bytes_positive":true}`
398
+ - successful run after failure:
399
+ - `success_last_line=All scenario matrix checks passed for package: pumuki@latest`
400
+ - `summary_check={"final_verdict":"PASS","run_id":"pumuki-matrix-..."}`
401
+ - `failure_json_exists_after_success=0`
402
+ - `failure_log_exists_after_success=0`
403
+
404
+ Conclusion:
405
+ - failure-log artifacts now carry deterministic integrity metadata (hash + size) for portable triage verification.
406
+ - compatibility and console contract remain unchanged.
407
+
408
+ ## Next-Round Task 9 Output (failure command metadata)
409
+
410
+ Execution date: `2026-02-18`
411
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
412
+
413
+ Implementation:
414
+ - commit: `eec64fd`
415
+ - change: `pumuki-matrix-last-failure.json` now includes `failure_command`, resolved deterministically from `failure_step`.
416
+
417
+ Validation evidence:
418
+ - preflight dirty failure:
419
+ - `preflight_exit=17`
420
+ - `preflight={"exit_code":17,"failure_phase":"preflight","failure_step":"source_repo_cleanliness","failure_command":"git -C \".../pumuki-mock-consumer\" status --porcelain --untracked-files=normal"}`
421
+ - `preflight_cmd_non_empty=yes`
422
+ - scenario failure after preflight (invalid package):
423
+ - `scenario_exit=1`
424
+ - `scenario={"exit_code":1,"failure_phase":"clean","failure_step":"npm_install_package","failure_command":"npm install --save-exact \"pumuki@0.0.0-not-a-real-version\""}`
425
+ - `scenario_cmd_check=yes`
426
+ - successful run after failure:
427
+ - `success_last_line=All scenario matrix checks passed for package: pumuki@latest`
428
+ - `summary_json={"final_verdict":"PASS","run_id":"pumuki-matrix-..."}`
429
+ - `failure_json_exists_after_success=0`
430
+ - `failure_log_exists_after_success=0`
431
+
432
+ Conclusion:
433
+ - each failure report now carries the exact canonical command behind the failing step, improving deterministic triage.
434
+ - compatibility and console contract remain unchanged.
435
+
436
+ ## Next-Round Task 10 Output (portable command template metadata)
437
+
438
+ Execution date: `2026-02-18`
439
+ Target: `pumuki-mock-consumer/scripts/run-pumuki-matrix.sh`
440
+
441
+ Implementation:
442
+ - commit: `ab9f616`
443
+ - change: `pumuki-matrix-last-failure.json` now includes:
444
+ - `failure_command_template` (portable template with placeholders),
445
+ - `failure_command_variables` (resolved values for template placeholders),
446
+ while preserving existing `failure_command`.
447
+
448
+ Validation evidence:
449
+ - preflight dirty failure:
450
+ - `preflight_exit=17`
451
+ - `preflight_json={"exit_code":17,"failure_phase":"preflight","failure_step":"source_repo_cleanliness","failure_command_template":"git -C \"{repo_root}\" status --porcelain --untracked-files=normal","failure_command_variables":{"repo_root":"...","clone_dir":"...","scenario":null,"package_spec":"pumuki@latest","base_ref":null}}`
452
+ - `preflight_template_non_empty=true`
453
+ - `preflight_template_has_placeholder=true`
454
+ - `preflight_template_has_users=false`
455
+ - scenario failure after preflight (invalid package):
456
+ - `scenario_exit=1`
457
+ - `scenario_json={"exit_code":1,"failure_phase":"clean","failure_step":"npm_install_package","failure_command":"npm install --save-exact \"pumuki@0.0.0-not-a-real-version\"","failure_command_template":"npm install --save-exact \"{package_spec}\"","failure_command_variables":{"repo_root":"...","clone_dir":"...","scenario":"clean","package_spec":"pumuki@0.0.0-not-a-real-version","base_ref":"upstream-clean"}}`
458
+ - `scenario_template=npm install --save-exact "{package_spec}"`
459
+ - `scenario_var_package=pumuki@0.0.0-not-a-real-version`
460
+ - `scenario_command_present=true`
461
+ - successful run after failure:
462
+ - `success_last_line=All scenario matrix checks passed for package: pumuki@latest`
463
+ - `summary_json={"final_verdict":"PASS","run_id":"pumuki-matrix-..."}`
464
+ - `failure_json_exists_after_success=0`
465
+ - `failure_log_exists_after_success=0`
466
+
467
+ Conclusion:
468
+ - failure reports now include machine-portable command templates plus resolved variables, without breaking existing command metadata or console contract.
469
+
470
+ ## Exit Criteria
471
+
472
+ Validation round is considered closed only when all checks pass:
473
+
474
+ 1. Matrix deterministic output exactly matches expected exits.
475
+ 2. Stage/evidence summaries expose valid `snapshot.stage` + `snapshot.outcome`.
476
+ 3. Ruleset bundle list includes platform packs and stage gate policy bundle.
477
+ 4. No ad-hoc bypass is required for normal matrix execution.
478
+
479
+ ## Known Failure Signatures
480
+
481
+ - `SDD_SESSION_MISSING` in `clean`:
482
+ - session lifecycle not initialized in runner.
483
+ - `methodology.tdd.backend-domain-change-requires-tests` in `clean`:
484
+ - clean scenario missing backend domain test artifact.
485
+ - `methodology.bdd.backend-application-change-requires-spec` in `clean`:
486
+ - clean scenario missing backend app spec artifact recognized by diff extensions.
@@ -0,0 +1,73 @@
1
+ # Phase 12 Go/No-Go Report
2
+
3
+ Date: 2026-02-18
4
+ Scope: checklist section `12.x` (failure recovery and release closure)
5
+ Package baseline: `pumuki@6.3.13`
6
+ Validation mode: mock-only runtime validation for consumer behavior
7
+
8
+ ## Verdict
9
+
10
+ `GO`
11
+
12
+ Release closure checks for section `12.x` are complete and consistent with current runtime behavior.
13
+
14
+ ## Decision Summary
15
+
16
+ - `12.1` PRE_PUSH without upstream now fails safe with explicit guidance.
17
+ - `12.2` CI fallback without `GITHUB_BASE_REF` is deterministic (`origin/main -> main -> HEAD`).
18
+ - `12.3` Hook drift is detected by `doctor` and restored by `install/update`.
19
+ - `12.4` Partial lifecycle mismatch is detected (`status/doctor`) and recoverable deterministically.
20
+ - `12.5` Runtime docs alignment completed (`README`, `docs/USAGE.md`, `docs/INSTALLATION.md`).
21
+ - `12.6` `CHANGELOG.md` includes user-visible runtime changes.
22
+ - `12.7` Release path validated from npm package in consumer context.
23
+ - `12.8` This final report consolidates evidence and closure status.
24
+
25
+ ## Evidence Anchors
26
+
27
+ - Master checklist state: `docs/PUMUKI_FULL_VALIDATION_CHECKLIST.md`
28
+ - Execution tracker (task-by-task command outcomes): `docs/REFRACTOR_PROGRESS.md`
29
+ - Runtime change log: `CHANGELOG.md`
30
+ - Active release narrative: `docs/RELEASE_NOTES.md`
31
+
32
+ ## Runtime Evidence (12.x)
33
+
34
+ - PRE_PUSH no upstream fail-safe fix:
35
+ - contract change: `integrations/git/resolveGitRefs.ts`
36
+ - fail-safe behavior: `integrations/git/stageRunners.ts`
37
+ - tests: `integrations/git/__tests__/resolveGitRefs.test.ts`, `integrations/git/__tests__/stageRunners.test.ts`
38
+ - commit: `99e1db8`
39
+ - CI fallback validation in mock-only:
40
+ - `origin/main + main`: `exit=1`, `stage=CI`, `outcome=BLOCK`, `findings=41`
41
+ - `main only`: `exit=1`, `stage=CI`, `outcome=BLOCK`, `findings=41`
42
+ - no `origin/main` and no `main`: `exit=0`, `stage=CI`, `outcome=PASS`, `findings=0`
43
+ - tracker commit: `2c7f42c`
44
+ - Hook drift recovery validation in mock-only:
45
+ - drift => `doctor verdict: WARN`
46
+ - restore (`install`/`update`) => `doctor verdict: PASS`
47
+ - tracker commit: `42cfa8f`
48
+ - Lifecycle mismatch recovery validation in mock-only:
49
+ - forced mismatch (`pumuki.installed` unset) detected by `status/doctor`
50
+ - recovery via `pumuki install` returns to `PASS`
51
+ - tracker commit: `f0d2c56`
52
+ - Runtime docs alignment closure:
53
+ - `README.md`, `docs/USAGE.md`, `docs/INSTALLATION.md`
54
+ - tracker/update commit: `18d08ae`
55
+
56
+ ## Artifact and Log Links
57
+
58
+ - Validation checklist: `docs/PUMUKI_FULL_VALIDATION_CHECKLIST.md`
59
+ - Consolidated progress log: `docs/REFRACTOR_PROGRESS.md`
60
+ - Local mock-only log directories used during section `12.x`:
61
+ - `/tmp/pumuki-ci-fallback-controlled-dgnpYN`
62
+ - `/tmp/pumuki-hook-drift-GxTzlZ`
63
+ - `/tmp/pumuki-lifecycle-mismatch-KdK47N`
64
+
65
+ ## Residual Risk Notes
66
+
67
+ - Consumer mock baseline can contain tracked `node_modules` entries depending on branch state.
68
+ Validation was executed in temporary clones with deterministic baseline sanitization when needed.
69
+ - SDD bypass (`PUMUKI_SDD_BYPASS=1`) was used only in controlled validation contexts where the task required isolating non-SDD behavior.
70
+
71
+ ## Closure Statement
72
+
73
+ Section `12.x` is closed with a `GO` verdict for release continuation under the current runtime contract.
@@ -0,0 +1,75 @@
1
+ # Post-Phase12 Next-Lot Decision Pack
2
+
3
+ Date: 2026-02-18
4
+ Context: section `12.x` is closed with `GO` in `docs/validation/phase12-go-no-go-report.md`.
5
+
6
+ ## Decision Required
7
+
8
+ Select exactly one path for the next lot:
9
+
10
+ 1. **Release path** (publish next npm version now).
11
+ 2. **Hardening path** (execute an additional stabilization cycle before publishing).
12
+
13
+ This document is an implementation-oriented decision packet. It does not prescribe product strategy.
14
+
15
+ ## Current Baseline (Objective)
16
+
17
+ - `12.x` closure is complete (`GO`).
18
+ - Runtime docs were aligned with current behavior (`README`, `docs/USAGE.md`, `docs/INSTALLATION.md`).
19
+ - Mock-only validations for `PRE_PUSH` upstream fail-safe, CI fallback order, hook drift recovery, and lifecycle mismatch recovery are documented in `docs/REFRACTOR_PROGRESS.md`.
20
+ - Checklist closure is recorded in `docs/PUMUKI_FULL_VALIDATION_CHECKLIST.md`.
21
+
22
+ ## Option A — Release Path (Publish Now)
23
+
24
+ ### Entry criteria (already satisfied)
25
+
26
+ - Phase 12 closure complete.
27
+ - Go/no-go report exists and is traceable.
28
+ - Runtime docs and changelog aligned.
29
+
30
+ ### Atomic implementation tasks
31
+
32
+ 1. Bump version (`package.json`, `VERSION`, changelog header/release notes alignment).
33
+ 2. Publish to npm (`latest` and policy-compliant tag handling).
34
+ 3. Post-publish verification in mock consumer from npm.
35
+ 4. Update tracker with published version and verification evidence.
36
+
37
+ ### Main benefit
38
+
39
+ - Fast delivery of the currently validated runtime contract.
40
+
41
+ ### Main risk
42
+
43
+ - Any non-critical hardening opportunities move to post-release backlog.
44
+
45
+ ## Option B — Hardening Path (One More Stabilization Round)
46
+
47
+ ### Candidate hardening scope
48
+
49
+ 1. Additional mock-only regression matrix around SDD bypass boundaries (without changing policy contract).
50
+ 2. Additional docs consistency pass for consumer/operator runbooks under `docs/validation/*`.
51
+ 3. Optional extra test consolidation to reduce future maintenance noise (without changing runtime semantics).
52
+
53
+ ### Atomic implementation tasks
54
+
55
+ 1. Define hardening acceptance criteria.
56
+ 2. Implement hardening deltas in small atomic commits.
57
+ 3. Re-run deterministic and mock-only validations required by criteria.
58
+ 4. Re-issue go/no-go note after hardening.
59
+
60
+ ### Main benefit
61
+
62
+ - Lower post-release correction probability.
63
+
64
+ ### Main risk
65
+
66
+ - Delays package publication despite current `GO`.
67
+
68
+ ## Recommended Operator Input
69
+
70
+ To proceed without ambiguity, provide one explicit instruction:
71
+
72
+ - `Proceed with release path`
73
+ - `Proceed with hardening path`
74
+
75
+ Once selected, execution will continue in atomic tasks with tracker updates after each task.