gitoria

kunibert

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainbd3591c7conductor: gates run on the live day44 binarymremain/reports/K16-parallel-repos.md

11.6 KB

  1. # K16: parallel reviews across repositories
  2. 2026-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.
  3. ## Diff summary and configuration
  4. - `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.
  5. - `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.
  6. - 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.
  7. - `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.
  8. - `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.
  9. - `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.
  10. ## Health shape change
  11. The 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).
  12. ## Isolation checked by reading code
  13. | Resource | Path / scope | Result |
  14. | --- | --- | --- |
  15. | Worktree and `.kunibert` prompts/output | `work/<repoKey(clone)>/<pr>` under runnerData or configured workDir | Per repo/PR; same-id and same-clone runs serialize. |
  16. | Session state | `<runnerData>/<encodeURIComponent(clone)>/<encodeURIComponent(pr)>.json` | Per repo/PR; parallel children have separate runner processes and `live` state. |
  17. | Bare git cache | `<runnerData>/git/<repoKey(clone)>.git` | Per repo, shared only by that repo's serialized PRs; underscore collision fixed. |
  18. | Notes | `<dataDir>/notes/<encodeURIComponent(repoId#pr)>.json` | Per repo/PR; slash and delimiter-safe. |
  19. | Fetch token | `<runnerData>/.token-<pr>-<48 random hex characters>` | Per child; exclusive 0600 creation and cleanup. |
  20. 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.
  21. ## Proof commands and exact output artifacts
  22. All 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).
  23. | Exact command | Exit | Result | PASS lines | Full stdout/stderr |
  24. | --- | ---: | --- | ---: | --- |
  25. | `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) |
  26. | `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) |
  27. | `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) |
  28. | `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) |
  29. | `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) |
  30. | `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) |
  31. | `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) |
  32. | `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) |
  33. | `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) |
  34. | `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) |
  35. 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.
  36. 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.
  37. ## K16 exact final output
  38. ```text
  39. PASS ports 8840–8859 initially free
  40. PASS service ready default
  41. PASS queued (1, 1)
  42. PASS queued (1, 2)
  43. PASS queued (2, 1)
  44. PASS batch finished default
  45. PASS all children recorded start/end default
  46. PASS a: repos A/B overlap; health lists 2 keys, busy oldest A#2 skipped
  47. PASS b: same repo PR1/PR2 never overlap
  48. PASS service ready cap1
  49. PASS queued (1, 1)
  50. PASS queued (2, 1)
  51. PASS batch finished cap1
  52. PASS all children recorded start/end cap1
  53. PASS c: maxParallel=1 serializes repos
  54. PASS service ready cap2
  55. PASS queued (1, 1)
  56. PASS queued (2, 1)
  57. PASS queued (3, 1)
  58. PASS batch finished cap2
  59. PASS all children recorded start/end cap2
  60. PASS c: 3 repos/maxParallel=2 peak exactly 2
  61. PASS service ready minimum
  62. PASS queued (1, 1)
  63. PASS queued (2, 1)
  64. PASS batch finished minimum
  65. PASS all children recorded start/end minimum
  66. PASS config minimum: maxParallel=0 clamps to 1
  67. PASS service ready followup
  68. PASS two fake codex children started
  69. PASS d: event while running becomes follow-up
  70. PASS follow-up finished
  71. PASS d: exactly 3 runs, same PR never overlaps
  72. PASS service ready restart
  73. PASS e: two persisted running jobs, both past fetch
  74. PASS restart fixture includes pending follow-up
  75. PASS e: disk has two running jobs at shutdown
  76. PASS restart ready
  77. PASS e: restart requeues all running keys and clears health list
  78. PASS restart preserves pending follow-up note
  79. PASS f: unique token filenames across children, all mode 600
  80. PASS f: observed two distinct token files alive together
  81. PASS f: no token files left after use or restart
  82. PASS isolation: 3 distinct session state files for A#1/A#2/B#1
  83. ALL OK
  84. Stopped exact PIDs: [1751088, 1751094, 1751100, 1751101, 1753120, 1754877, 1756773, 1758387, 1760062, 1760629]
  85. State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
  86. ```
  87. 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`.
  88. ## Failed attempts and constraint incident
  89. The 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`.
  90. 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.
  91. ## Open points / DOCS
  92. - The initial real-model invocation is an unresolved mission-compliance incident, disclosed above. No claim that the entire mission was fake-only is made.
  93. - 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.
  94. - 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.
  95. - No production deployment or real-service concurrency test was authorized. Unrelated conductor edits and mission files remain outside the implementation commit.
  96. 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:
  97. ```text
  98. State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
  99. ```

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