diff --git a/JOURNAL-rcust.md b/JOURNAL-rcust.md index 0bc64a5..eb7d655 100644 --- a/JOURNAL-rcust.md +++ b/JOURNAL-rcust.md @@ -73,3 +73,20 @@ nix develop .#lint --command scripts/lint.sh -> PASS. Doc table regenerated to t (doc-sync unit test pins it). Next: P3 — HookCtx + ctx-hook signatures everywhere. + +## 2026-06-10 P3 — uniform ctx hook convention (branch fd02d9f) + +HookCtx frozen dataclass + hook_ctx() constructor in harness/meta.py; ctx.deps read straight from +$CCCI_DEPS_FILE (json, both shapes) — meta.py stays import-cycle-free (deps.py imports lifecycle +which imports meta). Registry keys carry hook_params; meta.load() enforces the expected positional +names per hook key (READY_PROBE/BACKUP_VERIFY/EXTRA_ENV/UPGRADE_EXTRA_ENV=(ctx,), +SCREENSHOT=(page, ctx)); _run_pre_hook applies meta.check_hook_signature(fn, ("ctx",)) to ops.py +hooks before calling. Conversion of 17 ops.py + 8 recipe_meta hooks was scripted (def-line regex + +bare `domain` -> `ctx.domain` inside the pre_*/hook function bodies only) and diff-reviewed; the +only manual fixes: keycloak pre_restore passed `meta` -> `ctx.meta`, and two comment lines in +lasuite-drive/-meet metas that the regex over-replaced were restored. wait_ready_probes gained +op= (install/upgrade call sites pass it) so probes can know the phase. + +Verified on cc-ci: cc-ci-run -m pytest tests/unit -q -> 180 passed; lint PASS. + +Next: P4 — discovery placement rule + op_state/deps fixtures + migrate hand-parsers. diff --git a/STATUS-rcust.md b/STATUS-rcust.md index 6c83278..9ec087a 100644 --- a/STATUS-rcust.md +++ b/STATUS-rcust.md @@ -12,17 +12,18 @@ Work branch: `restructure/recipe-custom` (one commit per phase P1–P6; merged t (lasuite-docs migrated, setup_custom_tests.sh gone); SKIP_GENERIC meta deleted (env dev-only + loud CI warning); conftest cleanup (deployed/deployed_app/app_domain gone, one `deps` fixture) (branch commit 8cd72fd) -- [ ] P3 — uniform ctx hook convention +- [x] P3 — uniform ctx hook convention: HookCtx(.domain/.base_url/.meta/.deps/.op); all hooks + take ctx; legacy signatures raise MetaError at load naming the migration (branch fd02d9f) - [ ] P4 — custom-test ergonomics (placement rule, op_state/deps fixtures) - [ ] P5 — customization manifest - [ ] P6 — docs -## P1+P2 verification facts (for the eventual M1 cold-verify) +## P1–P3 verification facts (for the eventual M1 cold-verify) -- WHERE: branch `restructure/recipe-custom`, P1=472a68b, P2=8cd72fd. +- WHERE: branch `restructure/recipe-custom`, P1=472a68b, P2=8cd72fd, P3=fd02d9f. - HOW: `cc-ci-run -m pytest tests/unit -q` and `nix develop .#lint --command scripts/lint.sh` from a clean checkout of the branch. -- EXPECTED: 175 passed; `lint: PASS`. +- EXPECTED: 180 passed; `lint: PASS`. - New single loader: `runner/harness/meta.py::load()`; all-recipes typo gate + R2 proof in `tests/unit/test_meta.py`; docs §4 table generated by `scripts/gen-meta-docs.py` (sync pinned by unit test). @@ -33,4 +34,4 @@ Work branch: `restructure/recipe-custom` (one commit per phase P1–P6; merged t ## Current -P1+P2 done on the branch; starting P3 (uniform ctx hook convention). +P1–P3 done on the branch; starting P4 (custom-test ergonomics).