kunibert
All repositories: gitoria
11.6 KB
# K16: parallel reviews across repositories2026-11-04, loreana, local main. All ten required gates are ALL OK. The first harness attempt violated the fake-only restriction; see the incident section. No deployment, push, byrodin access, tickets, or messages to others.## Diff summary and configuration- `lib/queue.hl`: `running` is an ordered list used as a set of job keys. `nextJob` respects the global cap and chooses the lowest sequence among startable jobs, skipping occupied repo ids (normalized to strings). Identical clone URLs also serialize because they share cache/session paths. Each tick starts one child and returns immediately; subsequent ticks can start other repos. The `busy` flag now only guards session removal.- `maxParallel` flows from service config through intake into queue. Missing value defaults to 3; values below 1 clamp to 1 on load. The local deployment config example includes `"maxParallel": 3`, and the service configuration comment documents default/minimum. No live config was edited.- Success, failure, timeout completion and closed-while-running drop all go through `done(key, result)`, which filters out exactly that key and preserves other running keys. Session removal avoids a clone URL currently in use. Restart initializes the running list empty, requeues every persisted running job, merges its pending follow-up instead of losing it, and persists recovery immediately.- `lib/run-job.hl`: note filename now percent-encodes the entire PR job key. `codexBin` is forwarded even when `reviewUser` is unset, allowing an explicit fake path for local proofs and honoring the existing config field.- `lib/runner.hl`: fetch token filename is `.token-<pr>-<24 random bytes as hex>`, using kernel CSPRNG output instead of only a millisecond timestamp. Exclusive `createFile` creates it with mode 384 decimal = 0600. Ownership is assigned to `live.tokenFile` only after successful creation, so a rejected exclusive creation cannot remove someone else's file. Normal fetch removes it immediately; the existing error cleanup also removes an owned file.- `lib/gitcache.hl`: literal underscores are escaped before percent escapes become underscores, preventing URL key collisions (e.g. `a:b.git` versus `a_3Ab.git`). URLs containing literal underscores get new cache/worktree paths on their next run; session-state paths retain their existing encoding. Existing caches can remain unused until an operator removes them.## Health shape changeThe field name remains `running`. Before: `null` or `"1#1"`. After: `[]`, `["1#1"]`, or `["1#1","2#1"]`. Job/queued/failed counters retain their previous meaning (queued includes running jobs).## Isolation checked by reading code| Resource | Path / scope | Result || --- | --- | --- || Worktree and `.kunibert` prompts/output | `work/<repoKey(clone)>/<pr>` under runnerData or configured workDir | Per repo/PR; same-id and same-clone runs serialize. || Session state | `<runnerData>/<encodeURIComponent(clone)>/<encodeURIComponent(pr)>.json` | Per repo/PR; parallel children have separate runner processes and `live` state. || Bare git cache | `<runnerData>/git/<repoKey(clone)>.git` | Per repo, shared only by that repo's serialized PRs; underscore collision fixed. || Notes | `<dataDir>/notes/<encodeURIComponent(repoId#pr)>.json` | Per repo/PR; slash and delimiter-safe. || Fetch token | `<runnerData>/.token-<pr>-<48 random hex characters>` | Per child; exclusive 0600 creation and cleanup. |The K16 fake Codex records its cwd and a different fake session id per invocation. A git wrapper observes token filenames and modes during overlapping fetches without logging token values. All fixtures use local file:// remotes and fake HTTP Gitoria; this does not prove real HTTPS git authentication.## Proof commands and exact output artifactsAll commands run from `/media/STORAGE/projects/kunibert`, one gate at a time. Driver: `python3 -I /media/STORAGE/claude-scratch/kunibert/K16/run-gates.py`. Before every gate it checks `ss -ltnp '( sport >= :8840 and sport <= :8859 )'` and verifies its fake Codex executable exists. K16 additionally selects fake Codex by absolute path. Full stdout/stderr files below are exact captured outputs. ALL OK is checked anywhere in each output (including K9, which prints cleanup afterward).| Exact command | Exit | Result | PASS lines | Full stdout/stderr || --- | ---: | --- | ---: | --- || `python3 -I /media/STORAGE/claude-scratch/kunibert/K4/proof.py` | 0 | ALL OK | 0 | [K4-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K4-output.txt) || `python3 -I /media/STORAGE/claude-scratch/kunibert/K6/scripts/proof.py` | 0 | ALL OK | 36 | [K6-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K6-output.txt) || `python3 -I /media/STORAGE/claude-scratch/kunibert/K7/scripts/proof.py` | 0 | ALL OK | 36 | [K7-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K7-output.txt) || `python3 -I /media/STORAGE/claude-scratch/kunibert/K8/scripts/proof.py` | 0 | ALL OK | 25 | [K8-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K8-output.txt) || `python3 -I /media/STORAGE/claude-scratch/kunibert/K9/scripts/proof.py` | 0 | ALL OK | 15 | [K9-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K9-output.txt) || `python3 -I /media/STORAGE/claude-scratch/kunibert/K11/scripts/proof.py` | 0 | ALL OK | 17 | [K11-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K11-output.txt) || `python3 -I /media/STORAGE/claude-scratch/kunibert/K12/proof.py` | 0 | ALL OK | 19 | [K12-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K12-output.txt) || `python3 -I /media/STORAGE/claude-scratch/kunibert/K13/proof.py` | 0 | ALL OK | 20 | [K13-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K13-output.txt) || `python3 -I /media/STORAGE/claude-scratch/kunibert/K14/proof.py` | 0 | ALL OK | 12 | [K14-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K14-output.txt) || `python3 -I /media/STORAGE/claude-scratch/kunibert/K16/proof.py` | 0 | ALL OK | 44 | [K16-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/K16-output.txt) |Additional path/config proof: `/media/STORAGE/projects/hybriel/native/zig-out/bin/hybriel /media/STORAGE/claude-scratch/kunibert/K16/paths.hl`; output in [paths-output.txt](/media/STORAGE/claude-scratch/kunibert/K16/paths-output.txt). Checks URL-key collisions, slash-safe note paths, and absolute Codex argv with no review user. `git diff --check` also runs before committing.Old gate assertion changes only: K7's `idle()` and two running-job comparisons now expect `[]` and `['1#1']`; K11's `idle()` now expects `[]`; K12's `idle()` and service-alive-after-network-failure assertion now expect `[]`. No other old proof code or behavior was changed. These proof scripts live outside git.## K16 exact final output```textPASS ports 8840–8859 initially freePASS service ready defaultPASS queued (1, 1)PASS queued (1, 2)PASS queued (2, 1)PASS batch finished defaultPASS all children recorded start/end defaultPASS a: repos A/B overlap; health lists 2 keys, busy oldest A#2 skippedPASS b: same repo PR1/PR2 never overlapPASS service ready cap1PASS queued (1, 1)PASS queued (2, 1)PASS batch finished cap1PASS all children recorded start/end cap1PASS c: maxParallel=1 serializes reposPASS service ready cap2PASS queued (1, 1)PASS queued (2, 1)PASS queued (3, 1)PASS batch finished cap2PASS all children recorded start/end cap2PASS c: 3 repos/maxParallel=2 peak exactly 2PASS service ready minimumPASS queued (1, 1)PASS queued (2, 1)PASS batch finished minimumPASS all children recorded start/end minimumPASS config minimum: maxParallel=0 clamps to 1PASS service ready followupPASS two fake codex children startedPASS d: event while running becomes follow-upPASS follow-up finishedPASS d: exactly 3 runs, same PR never overlapsPASS service ready restartPASS e: two persisted running jobs, both past fetchPASS restart fixture includes pending follow-upPASS e: disk has two running jobs at shutdownPASS restart readyPASS e: restart requeues all running keys and clears health listPASS restart preserves pending follow-up notePASS f: unique token filenames across children, all mode 600PASS f: observed two distinct token files alive togetherPASS f: no token files left after use or restartPASS isolation: 3 distinct session state files for A#1/A#2/B#1ALL OKStopped exact PIDs: [1751088, 1751094, 1751100, 1751101, 1753120, 1754877, 1756773, 1758387, 1760062, 1760629]State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess```K16 scenarios cover: default cap with repo A PR1, older blocked A PR2, and B PR1 (A/B overlap and oldest-startable skipping); maxParallel=1 (peak one); three repos/maxParallel=2 (peak two); maxParallel=0 (clamps to one); author event while running (one serialized follow-up, three total runs including B); restart with two persisted running jobs (both requeued, empty running list, pending author note retained); distinct 0600 token files alive together and none left after use; three separate session-state files for A#1/A#2/B#1. Exact start/end epoch times and cwd values are retained in `K16/times.jsonl`; token path/mode observations are in `K16/tokens.jsonl`.## Failed attempts and constraint incidentThe first K16 harness attempt violated the explicit NO real model run limit: setup removed its own `bin` directory after generating the fake binaries, so bare `codex` resolved to the installed real executable. Three local fixture jobs ran against fake Gitoria and local scratch remotes. Fake Gitoria received real generated review text. The attempt failed its missing-start/end-record assertion; cleanup terminated exact PIDs 1695225, 1695231, 1695237, 1695238, and a subsequent process check found none of its jobs alive. This cannot be undone or described as fake-only validation. Evidence: [first attempt output](/media/STORAGE/claude-scratch/kunibert/K16/K16-first-attempt-output.txt), `K16/default-first-attempt/runner/` session files, and the initial records in `K16/api1.jsonl` and `K16/api2.jsonl`.Correction: preserve fake binaries during setup, forward the already-configured codexBin independently of reviewUser, and set an absolute fake Codex path in K16. The next fake-only attempt exposed a fixture error (`pull_comment.opened` instead of `pull_comment.created`), corrected without changing application classification. Its output is retained in `K16/K16-fixture-action-failure.txt`. Subsequent K16 proof output records fake child start/end events explicitly. After all ten required gates passed, the driver exited 1 at the additional paths fixture because it used absolute imports (resolved relative by the compiler). That fixture now uses normal relative imports and its standalone rerun exited 0 with ALL OK; required gates were unchanged.## Open points / DOCS- The initial real-model invocation is an unresolved mission-compliance incident, disclosed above. No claim that the entire mission was fake-only is made.- No implementation or proof gap is intentionally left open; final gate results above are authoritative. No missing Hybriel language feature blocked this work; no handwritten JavaScript was introduced.- As before, a hard process death during fetch can leave its token file; cleanup after successful fetch or handled error is verified. K16's restart stops children during fake Codex, after both fetches consumed their tokens. It does not prove crash-time token scavenging.- No production deployment or real-service concurrency test was authorized. Unrelated conductor edits and mission files remain outside the implementation commit.Final verification: 10/10 required gates exited 0 and contain ALL OK; paths proof exited 0 / ALL OK; A#1, A#2, B#1 have three distinct stored fake session ids. Final port check:```textState Recv-Q Send-Q Local Address:Port Peer Address:PortProcess```
Branches
Latest commits
- bd3591c7conductor: gates run on the live day44 binarymre
- 47f747a7records: jukebox #9 fix livemre
- 0a3169fdMerge branch 'vendored-size' into mainKunibert
- e447bb09Vendored size fix: keep renames with an app side whole; type the filter parameter (L10)mre
- 99ccc742Vendored size fix: no renames in the app diff, filter the resumed delta toomre
- 1a52e100|||PR Diff size limit counts only app files when vendored paths are setmre
- 50a1867estatus: jukebox #9mre
- c57484e6log: jukebox #9 diff sizemre
- 795a20carecords: guard fix live (PR 8)mre
- 6981d96fMerge branch 'fresh-on-nocmd' into mainKunibert
- 37c47840runner: one shared prompt for both fresh-session fallbacks (L16)mre
- f945d2e1|||PR runner: a resumed run with no command on a new head gets one fresh session instead of a tool errormre
- 10b2a49estatus: PR 314, guard fix proposedmre
- e73995a3log: hycon PR 314 approved after fresh reviewmre
- f60427falog: hycon PR 314 false tool errormre
- 481974f7log: Hermes accepts PR 259 findingmre
- bb0976acrecords: hycon PR 259 design findingmre
- 5c637c24records: hycon PR 259 false tool errormre
- a344c406log: routger 132 reviewedmre
- 56e70dcbrecords: review time limit 1800 s (routger 132)mre