gitoria

kunibert

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainbd3591c7conductor: gates run on the live day44 binarymremain/missions/K7-wiring.md

4.7 KB

  1. # Mission K7: one service, event → posted review (kunibert#7)
  2. Task (his words, kunibert#1): "basically we want [the consultant] now to build a similar tool with gitoria and hybriel."
  3. This step only: connect what exists into one running service. A signed gitoria event comes in, a job is queued, the job runs the review against the PR, and the result is posted back. Gitoria is not live; prove it end to end against FAKES (K6's fake gitoria, a fake codex). No real gitoria, no real codex, no tickets.
  4. ## Read first
  5. - reports/K4-gitcache.md, reports/K5-intake.md (esp. "GAP lines" 3 and "Open points"), reports/K6-posting.md (esp. open points), and the code they describe: service/project.hl, lib/{intake,gitoria-events,queue,run-job,runner,gitcache,gitoria-api,review-post,review-memory}.hl, tools/runner.hl.
  6. - Contract v1.2: /media/STORAGE/projects/WorldAPI/gitoria.worldapi.org/docs/apps-api.md. The design consultant's rules: docs/reviewer-design/4-apps-api-review.md section C and E (points 9–24).
  7. - Hybriel: docs/HL-PRIMER.md, docs/CODE-ORDER.md, /media/STORAGE/projects/hybriel/plugins/proc/server.hl (spawn, spawnArgs, its events, kill/timeout), plugins/time.
  8. Copy working shapes from the docs. Not covered → DOCS line; framework gap → GAP line with a minimal repro, no workaround. Hybriel .hl only in lib/, tools/, service/ (Python only for fakes and test scripts in scratch).
  9. ## Build
  10. 1. **runJob without blocking** (K5 GAP 3): the job runs the existing CLI as a child with `spawnArgs` (hybriel tools/runner.hl review-pr … with --api, --key-file, --clone from the per-repo config/event, `--force` for review_requested and @kunibert notes, the PR number). The queue gets a completion call (`done(key, result)`): success removes the job or promotes its follow-up (`next`), failure → retry/backoff as now. Hard timeout 15 min: kill the child (by its handle/PID), job counts as failed. The web route must stay answerable while a job runs: prove it.
  11. 2. **Per-repo config**: a config file (path argument) mapping repo.id → { api, clone, keyFile, secretFile }; the event's repo.api/repo.clone are used when they match the config, a mismatch is refused and logged. Secrets/keys stay in files (mode 600), never in logs.
  12. 3. **Flags reach the runner**: reset → the runner's reset for that PR, then the review; notes (`@kunibert <text>`) → into the next prompt (add a `--note-file` or similar to review-pr; K3 state already has pending notes); thread flips (review_thread) → already read from gitoria's threads at run time, so the queue only needs to trigger nothing extra: confirm. threadReplyOnly → the runner's existing "unchanged head → thread replies only" path: confirm it is taken.
  13. 4. **removeSession**: a closed/merged PR's session is removed (runner reset/drop state for that PR) by the worker tick, and the mark is cleared.
  14. 5. **Prompt**: add one line to the review prompt files: no `suggestion` blocks, write a fix as a normal code block (the design consultant point 24).
  15. 6. Draft and skipped runs post nothing (already); keep it that way.
  16. ## Proof (end to end, all local; ports from 8840–8859, check `ss -ltn`)
  17. Run the service, K6's fake gitoria (copy it into K7 scratch and extend as needed: it serves the API and the git refs, file:// fetch is fine, say so) and a fake codex on PATH. A test script signs events with the repo's secret and POSTs them to the service. Show, from the fake gitoria's request log:
  18. - opened PR 1 → status pending → review with inline comment → status failure; state stored.
  19. - During that run, /health answers fast (show the time) and a synchronize for PR 1 is queued as follow-up and runs after (K5 phase 4 path, now live).
  20. - review_comment from a user (seq above watermark) on the same head → only a thread reply (+ resolve), no review, no status.
  21. - `@kunibert reset` → fresh session, review posted. `@kunibert check the db code` → note visible in the prompt the fake codex received.
  22. - closed → no run; session removed; mark cleared.
  23. - fake codex hangs → killed at the timeout (use a short test timeout from config), status `error`, retries as configured.
  24. - Signature from another repo's secret → 401.
  25. - K4 proof.py, K6 scripts/proof.py and K5 tests phases 1–3 still pass (run them).
  26. Stop every process you started by its PID at the end.
  27. ## Limits
  28. About 70 tool calls. No real codex, no sudo, no network outside localhost, no commits, no tickets, no messages to others. Scratch only under /media/STORAGE/claude-scratch/kunibert/K7/.
  29. Runtime: /media/STORAGE/projects/hybriel/native/zig-out/bin/hybriel, launched from /media/STORAGE/projects/kunibert.
  30. Report: /media/STORAGE/projects/kunibert/reports/K7-wiring.md (files, exact commands, proof output, DOCS/GAP lines, open points, and the exact steps to run the real proof on kunibert-test once gitoria is live). Stop when done or blocked.

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