52 lines
2.9 KiB
Markdown
52 lines
2.9 KiB
Markdown
# STATUS — sub-phase conc (concurrency restructure)
|
||
|
||
Plan: /srv/cc-ci/cc-ci-plan/concurrency-restructure-full-plan.md (SSOT for this phase)
|
||
|
||
## Phase state
|
||
|
||
- Phase: conc — concurrency restructure (P1–P5 + tests/concurrency)
|
||
- Builder branch: `restructure/concurrency` — COMPLETE (P1–P5 + tests), tip `d3fe9e2`
|
||
- Gate: **M1 — CLAIMED, awaiting Adversary**
|
||
- M2 blocked on M1 PASS (no main merge yet; main untouched by this phase except state files)
|
||
|
||
## Gate claim: M1 — implementation verified
|
||
|
||
**WHAT**: Branch `restructure/concurrency` implements the full phase plan: P1 lock-lifetime
|
||
hardening, P2 flock-probe janitor (registry deleted), P3 per-run ABRA_DIR (recipe flock
|
||
deleted), P4 single concurrency knob, P5 spec rewrite, + `tests/concurrency` (20 tests covering
|
||
the 19 plan cases). One commit per phase.
|
||
|
||
**WHERE**: origin/restructure/concurrency, commits (in order):
|
||
- P1 `b492f99` — harness/lifetime.py guards + .drone.yml setsid/trap wrap
|
||
- P2 `b302f3a` — acquire_app_lock + _probe_and_reap + janitor rewrite; registry symbols deleted
|
||
- P3 `17ebdf3` — setup_run_abra_dir + per-run fetch_recipe + abra.abra_dir()/recipe_dir()
|
||
routing; acquire_recipe_lock/RECIPE_LOCK_DIR deleted; tests/{ghost,discourse}/install_steps.sh
|
||
one-line RECIPE_DIR resolution fix (justification: machine-docs/DECISIONS.md "conc P3" entry)
|
||
- P4 `91d3cc7` — concurrency.limit removed from .drone.yml; maxTests comment updated
|
||
- tests `84d90fb` — tests/concurrency/ (real-kernel; NOT in the default unit gate)
|
||
- P5 `d3fe9e2` — docs/concurrency.md rewritten to the new model
|
||
|
||
**HOW to verify (cold, from your clone)**:
|
||
1. `git fetch && git checkout restructure/concurrency` (tip must be `d3fe9e2`)
|
||
2. `cc-ci-run -m pytest tests/unit -q`
|
||
3. `cc-ci-run -m pytest tests/concurrency -q` (real flocks; uses tmp dirs, reaps its helpers)
|
||
4. `nix develop .#lint --command bash scripts/lint.sh`
|
||
5. dangling-reference grep (expect ZERO hits in code):
|
||
`grep -rn "register_run_app\|unregister_run_app\|_run_owner_state\|ACTIVE_RUN_DIR\|CCCI_JANITOR_MAX_AGE\|acquire_recipe_lock\|RECIPE_LOCK_DIR\|_stack_age_seconds" --include="*.py" --include="*.nix" --include="*.yml" --include="*.sh" .`
|
||
6. adversarial diff review per phase plan (races, deleted-code fallout, gate integrity vs
|
||
RUN_APP_RE/warm apps/services_converged, test-suite blind spots vs the 19 cases)
|
||
|
||
**EXPECTED**:
|
||
- tests/unit: `138 passed`
|
||
- tests/concurrency: `20 passed` (runtime ~10 s; spawns helper subprocesses, cleans them up)
|
||
- lint: `lint: PASS`
|
||
- grep: no hits outside docs/git-history references (docs/concurrency.md lists them as deleted)
|
||
- `pytest tests/unit` does NOT collect tests/concurrency (separate dir, explicit invocation only)
|
||
- gate-integrity notes: RUN_APP_RE, services_converged()/paused-is-settled, teardown_app order,
|
||
warm/canonical flows untouched; only non-assertion change under tests/<recipe>/ is the
|
||
RECIPE_DIR line in ghost+discourse install_steps.sh (DECISIONS.md "conc P3")
|
||
|
||
## Blockers
|
||
|
||
(none)
|