status(2): Q0 CLAIMED — harness additions + custom-html parity reference proven

Q0.1 harness.http canonical Phase-2 recipe-test HTTP API.
Q0.2 discovery recurses into functional/+playwright/ subdirs.
Q0.3 custom-html PARITY.md + parity-port functional/health_check.
Q1.1 +2 recipe-specific functional + playwright smoke.

Acceptance cold-verifiable on cc-ci:
  cc-ci-run -m pytest tests/unit -v          # 21 PASS
  RECIPE=custom-html cc-ci-run runner/run_recipe_ci.py  # all 5 stages PASS, deploy-count=1
  head_ref=8a026066 == chaos-version=8a026066 (HC1 non-vacuous)

Q0.4 (dep resolver) deferred to Q2 (no Q1 recipe needs deps).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-28 04:43:02 +01:00
parent bec92659b1
commit 125a4ef8b2
3 changed files with 119 additions and 17 deletions

View File

@ -49,11 +49,51 @@ tree must carry:
- **Q5** — Completeness + docs; flip `## DONE`.
## In flight
**Q0Harness additions.** Bootstrap Phase 2 loop state + begin porting recipe-maintainer helpers
into `runner/harness/` (HTTP convergence, OIDC flow, dep resolver, backup-data-integrity, TTY abra).
**Q1Pattern proof.** custom-html overlay + parity + ≥2 specific tests proven green end-to-end
on cc-ci (see Q0 evidence). Next: n8n (Q1.2) — port `recipe-info/n8n/tests/health_check.py` + add
≥2 specific (workflow create/execute + survives upgrade) + real backup data-integrity (Q1.3).
## Gate
(none yet — Q0 has not been claimed)
**Gate: Q0 — CLAIMED, awaiting Adversary @2026-05-28** (commits `0d0fc6c` Q0.1/Q0.2 + Q0.3/Q1.1 in
HEAD). Acceptance evidence (per plan §6 Q0): a reference recipe (custom-html) uses the new harness
additions for a full parity + specific suite, green via the existing run path.
**Objective evidence pointers (Q0):**
- **Harness additions landed**
- `runner/harness/http.py` — canonical Phase-2 recipe-test HTTP API (vendored from
`references/recipe-maintainer/utils/tests/helpers.py`): `http_get`, `http_post`, `http_request`,
`retry_http_get`, `retry_http_post`, `wait_for_http`, `assert_converges`. JSON + form bodies,
transport-failure → status=0.
- `runner/harness/discovery.custom_tests` recurses into `tests/<recipe>/functional/` and
`tests/<recipe>/playwright/` (Phase 2 §4.1 layout) while excluding lifecycle `test_<op>.py`
names; HC2 repo-local gate continues to apply.
- TTY abra wrapper already present in `runner/harness/abra.py::_run_pty` (Phase 1d) — reused.
- **Unit-test proof (deterministic, cc-ci)**
- `cc-ci-run -m pytest tests/unit -v`**21 passed in 4.93s**:
- 8× pre-existing `tests/unit/test_discovery.py` (overlay + HC2 gate, regressed).
- 2× new `tests/unit/test_discovery_phase2.py` (functional/+playwright/ recursion + HC2
gate still applies to subdirs).
- 11× new `tests/unit/test_http.py` (in-process http.server fixture — JSON parsing,
4xx-with-body, non-JSON body, transport-failure=0, headers, JSON+form POST, retry
convergence, retry timeout, wait_for_http, assert_converges return value).
- **End-to-end proof (custom-html on cc-ci, the reference recipe)**
- `RECIPE=custom-html cc-ci-run runner/run_recipe_ci.py` (log `/root/ccci-q0-customhtml-full.log`):
- install/upgrade/backup/restore/custom **all PASS**, deploy-count=1.
- HC1 PR-head proof: `head_ref=8a026066 == chaos-version=8a026066`, version `1.10.0→1.11.0`.
- 5 lifecycle assertions (generic + cc-ci overlay across 4 ops) + 4 custom-stage assertions
(3 functional + 1 playwright). Reference command for Adversary cold re-run:
`RECIPE=custom-html cc-ci-run runner/run_recipe_ci.py`.
- **Per-recipe contract artifact landed**
- `tests/custom-html/PARITY.md` — parity row for `health_check.py`, rationale for the 2
recipe-specific tests + the data-integrity + playwright sections.
- `tests/custom-html/functional/{test_health_check.py,test_content_roundtrip.py,test_content_type_header.py}` — parity port + 2 NEW recipe-specific tests; each parity file carries the
`SOURCE: recipe-info/custom-html/tests/<file>` comment for audit.
- `tests/custom-html/playwright/test_browser_smoke.py` — Phase-2 P6 home.
**Reference command for Adversary (cold, on cc-ci):**
```
ssh cc-ci 'cd /root/cc-ci && cc-ci-run -m pytest tests/unit -v && RECIPE=custom-html cc-ci-run runner/run_recipe_ci.py'
```
## Blocked
(none) — bootstrap access re-verified @2026-05-28: `ssh cc-ci` ok (root, NixOS 24.11), Gitea API