gitoria

kunibert

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitcd4cb09ccd4cb09cNo review and status error when the model's tools did not run (kunibert#11)Kunibertcd4cb09c/missions/K2-runner.md

3.9 KB

  1. # Mission K2: model runner and schema (kunibert#2)
  2. Task (his words, kunibert#1): "basically we want vinzenz now to build a similar tool with gitoria and hybriel."
  3. This step only: Kunibert runs the review model on a LOCAL git repo and returns a checked review. No gitoria, no network posting, no tickets.
  4. ## Read first
  5. - /media/STORAGE/projects/kunibert/docs/DESIGN.md (sections 1, 3, 4, 7)
  6. - /media/STORAGE/projects/kunibert/docs/konrad-handover/2-prompts-and-memory.md (the prompt and runner, verbatim) and 3-output-schema.md (schema)
  7. - /media/STORAGE/projects/hybriel/docs/HL-PRIMER.md (whole) and /media/STORAGE/projects/hybriel/docs/CODE-ORDER.md
  8. - /media/STORAGE/projects/hybriel/plugins/proc/server.hl (run: cwd, env, stdin, timeout; without stdin the child gets /dev/null), plugins/fs, plugins/time as needed.
  9. Copy working shapes from the docs. Where the docs do not cover something, write a DOCS line in the report. No workaround for a framework gap: write a GAP line with a minimal repro instead.
  10. ## Build (in /media/STORAGE/projects/kunibert, Hybriel .hl only; no JavaScript, no TypeScript)
  11. 1. `schema.json`: Konrad's output schema, plus an optional-free `gates` field (string, "not run" for now). Codex --output-schema needs every property in `required`, so `gates` must be required.
  12. 2. A runner, `runner.hl` (names are your choice, keep it small):
  13. - input: repo dir, base ref, head ref;
  14. - computes merge-base(base, head) and the diff merge-base..head locally with git (hl:proc run);
  15. - writes the diff to `<repo>/.kunibert/pr.diff` and the prompt to `.kunibert/prompt.md` when it is over 16 KB (argv then just says to read it);
  16. - prompt = Konrad's first-review prompt with Konrad → Kunibert and .konrad → .kunibert, plus Vinzenz's checklist and spec-axis rules from DESIGN.md section 7, plus a line that gate output goes into `gates` (none yet). No spec file in this step (hasSpec false);
  17. - runs `codex exec --json -s read-only --skip-git-repo-check -C <repo> --output-schema schema.json <prompt>` with stdin closed (/dev/null) and a timeout of 15 min. Run codex as the current user (the separate unix user is a deploy item, do NOT create users and do NOT use sudo);
  18. - parses stdout JSONL: session id (thread.started), the last agent_message, the last error/turn.failed event (stderr is only progress), and the token `usage` events (sum them);
  19. - validates the result (summary string, findings array, axes, verdict in enum, replies array, unknown axis → correctness);
  20. - prints one JSON line: {session, usage, result}. A codex failure prints {error} and exits non-zero. It never writes anything into a PR.
  21. 3. A tiny test repo for proof in /media/STORAGE/claude-scratch/kunibert/K2/testrepo (git init there; never in a real repo): main with a small file, branch `feature` with one planted real bug (e.g. off-by-one or a missing null check) and one clean change.
  22. ## Limits
  23. - Model: codex gpt-6.1-sol, already logged in for this user (~/.codex). Do not change ~/.codex/config.toml; pass model/effort with `-c` flags only if needed, and say so.
  24. - At most 3 real codex runs in total (each costs Sol quota). Develop the parser against saved output first.
  25. - Scratch only under /media/STORAGE/claude-scratch/kunibert/K2/. No commits, no pushes, no tickets, no chat messages to others.
  26. - About 60 tool calls. Stop when done or blocked.
  27. ## Proof (in the report)
  28. - The exact command and the full JSON line from one real run against the test repo. It must show the planted bug as a finding with the right path and line, a valid verdict, the session id, and the usage sum.
  29. - The exact command and output of one failure case (e.g. a bad head ref, or an invalid codex model via -c) that shows the error path.
  30. - `hybriel` path used (native/zig-out/bin/hybriel, built if missing with native/build.sh; say if you had to build it).
  31. ## Report
  32. /media/STORAGE/projects/kunibert/reports/K2-runner.md: files made, the proof above, DOCS/GAP lines, the codex usage numbers of every run, open points. Then stop.

Branches

Latest commits

  • cd4cb09cNo review and status error when the model's tools did not run (kunibert#11)Kunibert
  • a6b54efaStatus updatemre
  • 5a72268eRecords: #4-#10 done, #11 started, review package on #1mre
  • 194c7da6Records: real proof greenmre
  • cdfa94a9Records: AppArmor profile for the review sandboxmre
  • c1bf02d8Status: sandbox blockermre
  • 88aaacc5Records: real proof part 2 (posting works, sandbox blocked by AppArmor userns)mre
  • 401df4e8Records: review user logged inmre
  • 6ca681b3Records: login command, status cleanupmre
  • 6b8d763cRecords: review user, device login startedKunibert
  • 07025b99Open the job worktree read-only for the review user before each model runKunibert
  • 2a44bd54Runner CLI: --review-user/--codex-bin/--work-dir work in every modeKunibert
  • 2177f66fReview model runs as its own unix user (reviewUser, codexBin, workDir)Kunibert
  • 35df8306Records: live service on byrodin, real proof part 1Kunibert
  • 7480a98dkunibert.service: SIGTERM stop is a clean exitKunibert
  • 3a8d93f9gitoria client: parse only JSON answers, accept a plain-text errorKunibert
  • c9b48bfeVendor Hybriel plugins; deploy ships bin/ from zig-outKunibert
  • a41ba15fKunibert: event intake, git cache, review runner, posting, linked tickets, deploy filesKunibert