kunibert
All repositories: gitoria
4.0 KB
# Mission K16: reviews run in parallel across repos (kunibert#16)Task (ticket title): "Reviews run in parallel across repos: one running job per repo, with a global cap."Order (2026-11-04, "now", relayed by Apollo, verbatim): "reviews must run in parallel across repos — one running job per repo instead of one for the whole service (lib/queue.hl has a single 'running' slot). Keep one-at-a-time within a repo (same PR never twice in parallel), add a global cap (e.g. 3) so the machine and the Codex plan aren't flooded, and make sure parallel jobs never share a worktree, session or token file."## Read first- /media/STORAGE/projects/hybriel/docs/HL-PRIMER.md, /media/STORAGE/projects/hybriel/docs/CODE-ORDER.md (copy working shapes; gap → DOCS line, no workaround, no hand-written JavaScript).- lib/queue.hl (whole file: `running` slot, next-job selection ~line 224, finish ~283, start ~330, health ~358, restart recovery ~46), lib/run-job.hl, service/ (how the worker tick calls the queue and runJob), lib/runner.hl lines ~20–35 and ~220–250 (live.tokenFile = data + '/.token-' + now()), lib/gitcache.hl worktreePath (work/<repoKey>/<pr>), reports/K7-wiring.md (queue design), reports/K13-vendored-paths.md.## Build1. Queue: replace the single `running` slot by a set of running job keys. A job may start when (a) no other job of the SAME repo.id is running, (b) the number of running jobs < cap. Pick order stays oldest-startable first, skipping jobs whose repo is busy. Same PR never twice (a PR is in exactly one job key; keep the existing follow-up/merge logic for events arriving while a job of that PR runs).2. Cap = config value `maxParallel` (default 3, minimum 1) read where the other config values are read; document it in the config example/README if one exists.3. Every path that clears `running` (done, failed, timeout kill, closed-while-running drop, restart recovery of jobs left 'running') must remove exactly that key. /health: `running` becomes a list of keys (keep the field name; note the shape change in the report).4. Isolation: the fetch-token file name must be unique per child (e.g. include the pid and the repo key / PR, not only the ms timestamp), created 600, removed after use as now. Confirm in the report (by reading the code) that worktree (work/<repoKey>/<pr>), session state file, git cache dir and notes file are per repo/PR; fix any shared path you find.## Proof (local, loreana, fake gitoria/fake codex only, NO real model run)In /media/STORAGE/claude-scratch/kunibert/K16/ (copy the K7/K13 fake setup; two configured repos, fake codex that sleeps a few seconds and records start/end times): (a) jobs for repo A and repo B overlap in time (both running at once, /health lists 2 keys); (b) two PRs of the SAME repo never overlap; (c) with maxParallel=1 nothing overlaps; with 3 repos and maxParallel=2 at most 2 overlap; (d) an event for a PR whose job is running produces a follow-up, not a second parallel run; (e) restart with jobs left 'running' requeues all of them; (f) the token files of two parallel children have different names and none is left after.All local gates one at a time: `python3 -I /media/STORAGE/claude-scratch/kunibert/{K4/proof.py,K6/scripts/proof.py,K7/scripts/proof.py,K8/scripts/proof.py,K9/scripts/proof.py,K11/scripts/proof.py,K12/proof.py,K13/proof.py,K14/proof.py}` plus the K16 proof → each ALL OK (grep ALL OK). If an older gate asserts `running` as a single string, update only that assertion and say so in the report. Ports 8840–8859: check `ss -ltnp` first, kill only exact PIDs you started, all free after.## LimitsAbout 60 tool calls. Do NOT deploy, push, touch byrodin. Commit locally on main (`-c user.name=Kunibert -c [email protected]`, short message, no self-attribution). No tickets, no messages. Scratch only under /media/STORAGE/claude-scratch/kunibert/K16/.Report: /media/STORAGE/projects/kunibert/reports/K16-parallel-repos.md: diff summary, health shape change, isolation check, exact proof commands and outputs, any changed old assertion, open points. Stop when done or blocked.
Branches
Latest commits
- 2eee9dbbMerge branch 'revendor-day44' into mainKunibert
- e96721cb|||PR Re-vendor plugins from Hybriel day44 (hl:fetch redirect fix)mre
- 0c67ab8cLog: kunibert repo ping provenmre
- b6f3039cLog: kunibert repo connectedmre
- b143c3c7CONDUCTOR: push recipemre
- 7a1279eeRule: conductor merges own utility PRs after green reviewmre
- 4038b3e0Log: kunibert#18 openedmre
- 18543db1Log: day42 fetch fix, re-vendor pendingmre
- 81a12f96Statusmre
- 6ce706abRecords: neutral wording, split cleanupmre
- 81a4d31bDocs: neutral wordingKunibert
- 8205b05eRecords: #17 livemre
- c3391204Answer fresh reviews under open threadsKunibert
- a0f3d147Records: #16 livemre
- 04322148Run reviews in parallel across repositoriesKunibert
- a6577aaeRecords: #14 live, #16 startedmre
- 0382238bStart fresh on Review again and name vendored pathsKunibert
- 5608c6f1Records: kunibert#13 vendored paths livemre
- 8840771dExclude vendored findings from app verdictsKunibert
- 6aa65353Records: jukebox connected, first reviewmre