gitoria

kunibert

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit7a1279ee7a1279eeRule: conductor merges own utility PRs after green reviewmre7a1279ee/missions/K16-parallel-repos.md

4.0 KB

  1. # Mission K16: reviews run in parallel across repos (kunibert#16)
  2. Task (ticket title): "Reviews run in parallel across repos: one running job per repo, with a global cap."
  3. 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."
  4. ## Read first
  5. - /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).
  6. - 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.
  7. ## Build
  8. 1. 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).
  9. 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.
  10. 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).
  11. 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.
  12. ## Proof (local, loreana, fake gitoria/fake codex only, NO real model run)
  13. 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.
  14. 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.
  15. ## Limits
  16. About 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/.
  17. 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

  • 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
  • ad8011cfRecords: neutral ticket rule, jukeboxmre
  • ca5f31dfPrompt: neutral reviewer identitymre
  • b241d9c8Records: Anton tryParse noteKunibert
  • 42cc1bc0Records: K12 doneKunibert
  • 9e6039eeRecords: gates K11, K12Kunibert