gitoria

kunibert

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainbd3591c7conductor: gates run on the live day44 binarymremain/missions/K10-review-user.md

5.4 KB

  1. # Mission K10: the review model runs as its own user (kunibert#10)
  2. Task (his words, kunibert#1): "basically we want [the consultant] now to build a similar tool with gitoria and hybriel."
  3. Decision (Apollo 2026-11-02, the design consultant's design): the review model (codex) runs as its own unix user that cannot read /root/.config/kunibert or Kunibert's app data. It gets its OWN codex login later (device code, approved by the owner). This mission builds the user, the permissions and the runner change, and proves the separation. It does NOT log in.
  4. ## Where
  5. - Live service on byrodin: ssh with `/media/STORAGE/projects/WorldAPI/worldapi-conductor/byrodin-ssh.sh [email protected] '<cmd>'` (one shared connection; never run parallel ssh). Read the "Live service" section of /media/STORAGE/projects/kunibert/CONDUCTOR.md first: paths, unit, deploy.
  6. - Code: /media/STORAGE/projects/kunibert on loreana (lib/runner.hl `codexTurn`/argv at ~line 40, lib/run-job.hl, service/project.hl, deploy/). Deploy only with `deploy/deploy.sh` after commit + push (CONDUCTOR.md "Deploy" says how to push; the token goes through GIT_CONFIG_* env, never argv). Commit messages short, no self-attribution, author `-c user.name=Kunibert -c [email protected]`.
  7. - Hybriel: docs/HL-PRIMER.md, docs/CODE-ORDER.md, plugins/proc/server.hl (spawn/run options). .hl only.
  8. ## Build
  9. 1. **User**: system user `kunibert-review` with its own home (e.g. /home/kunibert-review, 700), no login shell needed beyond what codex needs, no sudo rights, not in any group that can read root's or Kunibert's files.
  10. 2. **codex for that user**: root's codex is a symlink into /root (unreadable for others). Install the SAME version (0.166.0, standalone musl binary from /root/.codex/packages/standalone/releases/0.166.0-x86_64-unknown-linux-musl/bin/codex) as a copy at /usr/local/bin/codex-review (root-owned, 755). Do NOT touch /root/.codex, root's PATH, or root's codex, and never read or copy /root/.codex/auth.json. The review user's ~/.codex must be its own and writable by it (token refresh).
  11. 3. **Permissions**: /root/.config/kunibert stays 700/600 root. Kunibert's data (/CONTAINERS/projects/kunibert-data: state, sessions, token temp files, git cache) stays unreadable to kunibert-review. The model only needs to READ the job worktree (the checkout + .kunibert/pr.diff, delta.diff, spec.md, prompt files) and the schema file: put worktrees where kunibert-review can read but not write (e.g. a separate dir /CONTAINERS/projects/kunibert-work, root-owned, worktrees readable by a dedicated group or world-readable inside a 711 parent; your choice, explain it). The git cache and token temp files must NOT be reachable from there.
  12. 4. **Runner**: a config value `reviewUser` (service config.json → passed through run-job to the runner CLI). When set, every codex call (first and resume) runs as that user with its own HOME, e.g. `runuser -u kunibert-review -- env HOME=/home/kunibert-review /usr/local/bin/codex-review exec …` (the codex binary path is also config, `codexBin`). Keep all offline flags, stdin /dev/null, read-only sandbox, -C <worktree>. Unset (local proofs) → today's behaviour, so the K4/K6/K7/K8/K9 proofs on loreana still pass (run them: commands in CONDUCTOR.md "Local gates").
  13. 5. Update deploy/config.byrodin.json (reviewUser, codexBin, work dir) and the live /root/.config/kunibert/config.json accordingly; deploy; /health OK.
  14. ## Proof (on byrodin, no real model run: codex-review is NOT logged in yet, that is expected)
  15. - `runuser -u kunibert-review -- cat /root/.config/kunibert/gitoria-proof-key` and `…-secret`, `ls /root/.config/kunibert`, reading a state file and the git cache under /CONTAINERS/projects/kunibert-data, and `cat /root/.codex/auth.json` → all Permission denied. Show the outputs (never print a secret: if a read SUCCEEDS, stop and report without showing content).
  16. - As kunibert-review: reading a job worktree file and the schema works; writing into the worktree fails.
  17. - The runner, run on byrodin through the real CLI path (e.g. `bin/hybriel tools/runner.hl review …` on a tiny local fixture repo in a scratch dir on byrodin, or a probe codex) shows that codex is started as kunibert-review: e.g. point `codexBin` for that one run at a probe script that prints `id`, HOME, and tries to read the key file, then exits 1. Show its output. Remove the probe and the fixture afterwards.
  18. - `runuser -u kunibert-review -- /usr/local/bin/codex-review login status` → "Not logged in" (or the equivalent); root's `codex login status` is unchanged (logged in) before and after.
  19. - Loreana: the five local proofs still ALL OK.
  20. - List (do not change) any OTHER world-readable secret files you happen to notice under /CONTAINERS/projects that kunibert-review could read (e.g. .env files): just report paths, for Apollo.
  21. ## Limits
  22. About 60 tool calls. Touch only: the new user and its home, /usr/local/bin/codex-review, Kunibert's dirs, /root/.config/kunibert/config.json, kunibert.service (restart via deploy only). Do not restart or change any other service, do not touch docker, other apps, /root/.codex, sshd or sudoers. No codex login, no real model run, no tickets, no messages to others. Scratch on loreana only under /media/STORAGE/claude-scratch/kunibert/K10/; on byrodin under /tmp/kunibert-k10 (removed at the end).
  23. Report: /media/STORAGE/projects/kunibert/reports/K10-review-user.md (what was created with modes/owners, exact commands, proof outputs, other readable secrets list, the exact command for the later device-code login as kunibert-review). 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