kunibert
All repositories: gitoria
4.7 KB
# Mission K8: read linked tickets as the spec source (kunibert#8)Task (his words, kunibert#1): "basically we want vinzenz now to build a similar tool with gitoria and hybriel."This step only: Kunibert reads the tickets a PR links to, with its own read token, and the model reviews the PR's spec axis against them. Decided (Apollo, Vinzenz): gitoria only lists the ids in `pull.tickets` (`project#n`); Kunibert fetches the content from tickets.worldapi.org itself.## Read first- docs/konrad-handover/4-apps-api-review.md points 17, 18, 20; docs/konrad-handover/2-prompts-and-memory.md (Konrad's spec handling); 1-design-and-lessons.md (spec axis lessons).- Contract v1.2 §4 `pull.tickets`: /media/STORAGE/projects/WorldAPI/gitoria.worldapi.org/docs/apps-api.md.- Tickets API: /media/STORAGE/projects/antcolony-docs/docs/tickets-for-sessions.md. `GET https://tickets.worldapi.org/api/projects/<project>/tickets/<n>` with `Accept: text/markdown`, a `User-Agent` and `Authorization: Bearer <token>` returns title, description and the history with comments, oldest first.- Existing code: lib/review-prompt.hl, lib/review-wake.hl, lib/runner.hl, lib/run-job.hl, lib/gitoria-api.hl, reports/K7-wiring.md.- Hybriel: docs/HL-PRIMER.md, docs/CODE-ORDER.md; hl:fetch (plugins/fetch and its page under /media/STORAGE/projects/hybriel/projects/homepage/generated/pages/).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/tests in scratch).## Build1. **lib/tickets.hl**: fetch each `project#n` (validate the form strictly; at most 10 tickets per PR; one timeout; a 404/403 becomes "not readable" in the spec file, never a crash). Tickets base URL and token file path come from the service config (token file mode 600, never logged). A run with no token configured or no tickets → today's "no ticket linked" prompt line.2. **Spec file**: write `.kunibert/spec.md` into the job's worktree: per ticket its id, link, title, description and comments oldest first, with a header line telling the model that a later comment overrules the description and earlier comments. Cap the total size (e.g. 60 KB; cut the oldest comment bodies first, keep the description and the newest comments; say what was cut).3. **Prompt**: when spec.md exists, the spec axis line in lib/review-prompt.hl points to it (keep Kunibert's existing spec-axis rules; don't add new rules here, another ticket does that). Also the PR title and body go into the prompt as context (they are part of the spec reading, Vinzenz point 18 "read the PR description before calling a requirement missing").4. **Wake-up**: tickets are fetched again on every run. When spec.md differs from the last run's (store a hash in the PR state), the wake prompt says "the linked tickets changed since your last review" and shows that the file is there; unchanged → no mention.5. **Sources of ids**: `pull.tickets` from gitoria (passed through the job/runner: the runner already does GET pulls/N in gitoria mode, use that). In the local `review` mode a `--tickets project#n,...` option.## Proof (fake codex only; no real codex)- A fake tickets server in scratch (port 8840–8859, check `ss -ltn`) serving two tickets in markdown, one with a comment that overrules its description; one id that answers 404.- Run review-pr against K7's fake gitoria (copy it to K8 scratch; give PR 1 `tickets: ["demo#1","demo#2","demo#9"]`): spec.md has both tickets in order, the overrule header, "demo#9 not readable"; the prompt the fake codex got points to spec.md and has PR title/body.- Change a comment on demo#1, re-run on a new head → wake prompt says the tickets changed; re-run again unchanged → no mention.- Size cap: a huge ticket → spec.md under the cap, newest comments kept, cut noted.- Token: the token value appears in no file, log or argv (grep).- One REAL read-only fetch, to check the format: `GET https://tickets.worldapi.org/api/projects/kunibert/tickets/1` with the token file ~/.config/kunibert/tickets-token through lib/tickets.hl (GET only, nothing written; do not print the token). Show the resulting spec.md section.- K7 scripts/proof.py still passes.Stop every process you started by its PID.## LimitsAbout 60 tool calls. No real codex, no sudo, no writes to tickets (GET only, the one real fetch above), no network beyond localhost and that one GET, no commits, no messages to others. Scratch only under /media/STORAGE/claude-scratch/kunibert/K8/.Runtime: /media/STORAGE/projects/hybriel/native/zig-out/bin/hybriel, launched from /media/STORAGE/projects/kunibert.Report: /media/STORAGE/projects/kunibert/reports/K8-tickets.md (files, exact commands, proof output, DOCS/GAP lines, open points). Stop when done or blocked.
Branches
Latest commits
- 070e01a4Records: parkmre
- bf8af0dcRecords: v1.4 checkedmre
- 44af321bRecords: contract v1.4mre
- 310f3fd0Records: outdated semanticsmre
- 268ebfe6Records: #11 proven live and closedmre
- 88e8aad3Records: K11 verified and deployedmre
- 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