kunibert
All repositories: gitoria
12.4 KB
# K9: the earlier reviewer's live rules in Kunibert's prompts (kunibert#9)Implemented the K9 mission. Only fake codex and localhost fake gitoria/tickets were used. No sudo, external network, project commits, tickets or messages to others. Reused regression scripts create disposable git fixture history only under `/media/STORAGE/claude-scratch/kunibert/K9/`. All long-lived processes and recorded fake codex processes are stopped; PID check below.## Files and behavior- `lib/review-prompt.hl`: `RULES_VERSION = 1`; shared REACH, CONTRACT, CHECKLIST, SPEC_SOFT, CALIBRATION and `noSuggestions`. Correctness axis followed by the three indented rules, spec axis uses the earlier reviewer's exact line 170 with `.kunibert/spec.md` and SPEC_SOFT, or the exact no-ticket branch. Removed the old duplicate category checklist and spec bullets. Kept `moving work to a separate PR is never a finding` and `"won't fix, by design" is kept per repo`. Kept the existing no-suggestion-block wording. CALIBRATION consists of the earlier reviewer's header and four rule bullets, excluding his suggestion bullet.- `lib/review-wake.hl`: RULES is word for word from the handover, with `.reviewer` changed to `.kunibert`, including `Withdrawn:`. The no-suggestion instruction follows the intact RULES block. If `state.rules == null || state.rules < RULES_VERSION`, CALIBRATION is inserted immediately before RULES.- `lib/review-memory.hl`: a new per-PR state starts with `rules = RULES_VERSION`; existing state is read intact so a missing version can be detected.- `lib/runner.hl`: saves `state.rules = RULES_VERSION` with a successful result. A normal first review uses the fresh PROMPT without appending memory RULES (a fresh review has no withdrawal threads). A missing-session fallback retains RULES alongside its earlier-thread ledger. Failed model/validation runs do not consume calibration; a skipped event produces no wake prompt and leaves migration pending.- `schema.json` and `lib/review-post.hl`: no changes. `replies` entries already have `{thread, body, resolve}`. `postReplies` posts the body to the mapped gitoria thread, then posts `{resolved:true}` when `reply.resolve`; it has no special withdrawal branch. `applyResult` marks such a thread resolved and settled.The only renamed source text is the producer list in REACH and the service list in CONTRACT, plus `.reviewer` → `.kunibert` in paths. All remaining CONTRACT wording, including the examples `DTO, Zod schema, Payload field, ...`, is retained as requested. The repeated `read each other's data` around the new service-list parentheses is intentional: the supplied replacement itself includes those words and the original following words are retained.## Original and replacement lines; exact comparison`K9/scripts/verify-verbatim.py` reads the whole handover, extracts its TypeScript constants (unmasking source backticks), extracts the HL literals (unmasking only their quote delimiter), replaces the two known name substitutions back to the originals, and asserts exact string equality. It also checks emitted prompt text, expanded CALIBRATION without the suggestion bullet, the entire line-170 spec text, the no-ticket branch, and the stricter Kunibert rule. Both fresh and wake prompts keep the no-suggestion instruction. No SUGGEST constant or suggestion-fence instruction is present in the prompt modules.```textPASS REACH : exact match after named replacementsThe earlier reviewer: Before reporting that a value can be missing, null or out of range, check that it is reachable: look up the schema or field config that produces it (e.g. Payload `required`/`maxRows`, Zod schemas, data-hub mappers, DB constraints). Do not report states the producer cannot create.KUNIBERT: Before reporting that a value can be missing, null or out of range, check that it is reachable: look up the schema or field config that produces it (e.g. Hybriel hl:data schemas and field configs, JSON schemas, mapper functions, DB constraints). Do not report states the producer cannot create.PASS CONTRACT : exact match after named replacementsThe earlier reviewer: Cross-repo contracts: the earlier setup's services (service, service-data-hub, service-payload, service-next) read each other's data. When the diff changes a shape another service reads or writes (DTO, Zod schema, Payload field, API response, DB column, migration, env var), check that the old reader still works or that the PR says the deploy order ("deploy after ..."). A breaking change without either is a major finding.KUNIBERT: Cross-repo contracts: the worldapi.org services (e.g. gitoria, tickets, ident, HyperConductor and the repos on gitoria that read each other's data) read each other's data. When the diff changes a shape another service reads or writes (DTO, Zod schema, Payload field, API response, DB column, migration, env var), check that the old reader still works or that the PR says the deploy order ("deploy after ..."). A breaking change without either is a major finding.PASS CHECKLIST : exact match after named replacementsPASS SPEC_SOFT : exact match after named replacementsPASS RULES: exact match after .reviewer -> .kunibert; Withdrawn includedPASS CALIBRATION: exact expansion excluding SUGGEST; once, before RULESPASS spec line 170 and SPEC_SOFT: exact .kunibert substitution; no-ticket branch, stricter rule and no suggestion instructions retained```## Exact proof commandsAll runtime launches inside the proof scripts use `/media/STORAGE/projects/hybriel/native/zig-out/bin/hybriel`, cwd `/media/STORAGE/projects/kunibert`. `PATH` starts with the corresponding K9 fake `bin/`, never real codex. Gitoria uses localhost port 8841, tickets port 8845; K7 additionally uses service port 8842. Proofs run sequentially because they reuse ports.```bashcd /media/STORAGE/projects/kunibertpython3 /media/STORAGE/claude-scratch/kunibert/K9/scripts/setup-proof.py/media/STORAGE/projects/hybriel/native/zig-out/bin/hybriel /media/STORAGE/claude-scratch/kunibert/K9/tools/prompts.hlpython3 -I /media/STORAGE/claude-scratch/kunibert/K9/scripts/proof.py > /media/STORAGE/claude-scratch/kunibert/K9/proof-output.txtpython3 -I /media/STORAGE/claude-scratch/kunibert/K9/scripts/verify-verbatim.py > /media/STORAGE/claude-scratch/kunibert/K9/verbatim-output.txtpython3 -I /media/STORAGE/claude-scratch/kunibert/K9/regression-K7/scripts/proof.py > /media/STORAGE/claude-scratch/kunibert/K9/k7-output.txtpython3 -I /media/STORAGE/claude-scratch/kunibert/K9/regression-K8/scripts/proof.py > /media/STORAGE/claude-scratch/kunibert/K9/k8-output.txtpython3 /media/STORAGE/claude-scratch/kunibert/K9/scripts/write-report.py````setup-proof.py` copies K7/K8 scripts and fake executables under K9, changing only their scratch roots; the original proof files and scratch trees remain intact. `tools/prompts.hl` prints firstReview variants to scratch files; the integration proof then replaces those with the actual full prompts received by fake codex. `verify-verbatim.py` prints all four complete captured prompts in `verbatim-output.txt`.## Prompt proof excerptsFull files: `K9/fresh-with-spec.md`, `K9/fresh-no-spec.md`, `K9/wake-old-state.md`, `K9/wake-after.md` (also printed in full in `K9/verbatim-output.txt`).Fresh with spec (the preceding correctness line has REACH, CONTRACT and CHECKLIST indented immediately after it):```text2. spec: the originating ticket(s) are in .kunibert/spec.md, each with its comments in chronological order. The spec is the description as amended by the comments: a later comment that drops, changes or adds a requirement overrules the description and earlier comments, so judge against the latest decision and never report a requirement a later comment dropped. Where the comments leave it unclear which version holds, report one minor spec finding naming the conflict instead of a gap. Report (a) acceptance criteria / requirements that are missing or only partial, (b) behaviour the diff adds that the spec did not ask for (scope creep), (c) requirements that look implemented but wrongly. Quote the spec line in every spec finding. Before reporting a requirement as missing, read the PR description and any PRs it links or stacks on: work explicitly placed in another PR, or a PR the description scopes to a part of the ticket, is not a gap. Report a change unrelated to the ticket at most as a nit (or only in axes.spec), never as minor or higher. Once the author has cited a ticket exception or a later decision, do not raise that point again.```Fresh without spec:```text2. spec: no ticket or issue is linked, so there are no spec findings; say so in axes.spec.```Old-state wake: after the first fake review, its saved `rules` field was removed; the next forced wake contains exactly one CALIBRATION header and its four bullets immediately before RULES. After the successful wake, stored `rules` is exactly `1`. The following wake has RULES with no CALIBRATION. Relevant lines:```textUpdated review rules (they apply from this run on):- correctness: Before reporting that a value can be missing, null or out of range, check that it is reachable: ...- correctness: Cross-repo contracts: the worldapi.org services ...- correctness: Also check these often-missed categories where the diff touches them: ...- spec: Before reporting a requirement as missing, read the PR description and any PRs it links or stacks on: ...Memory rules:- If the author shows your point was wrong, say so plainly in that thread (start the reply with "Withdrawn:") and resolve it; do not restate it.```The ellipses above abbreviate only these report excerpts; the full prompts and comparison have the complete unchanged text. A separate `rules = 0` run with fake codex failing exited nonzero and kept `rules = 0`; its successful retry got CALIBRATION and saved `rules = 1`. New sessions start at `1` and get no CALIBRATION.## Withdrawal posting proof and regression outputFake result for T1:```json{"thread":"T1","body":"Withdrawn: the producer requires this field, so my finding was wrong.","resolve":true}```Observed fake gitoria writes, in order (from `proof-output.txt` and `live/fake.log`):```textPOST /api/pulls/1/threads/th1/replies{"body":"Withdrawn: the producer requires this field, so my finding was wrong."}POST /api/pulls/1/threads/th1/resolve{"resolved":true}```State: T1 has `resolved = true`, `settled = true`, and `T1` is in the settled list. No schema flag was added. Current unchanged schema SHA-256: `3a75e89c1772185a7f0737c8342070308535c5cb220c8947f7160a9cc519be18`.- `K9/proof-output.txt`: exit 0, 15 PASS, `ALL OK`.- `K9/verbatim-output.txt`: exit 0, 7 PASS, `ALL OK`.- `K9/k7-output.txt`: exit 0, 36 PASS, `ALL OK`.- `K9/k8-output.txt`: exit 0, 25 PASS, `ALL OK`.K7 covers intake, follow-ups, fresh/reset and note prompts, thread replies/resolves, closed-state removal, timeout/retry/error statuses and secret checks. K8 covers ticket order and comments, changed/unchanged spec wakes, 57,924-byte capped spec, no tickets/config, invalid ids and token handling. Both use their original assertions.## DOCS / GAP- DOCS: new multiline rule/calibration literals use literal newlines, as directed by the Hybriel primer and K6 DOCS. Quotes inside double-quoted rule literals mask the delimiter; TypeScript template-literal backtick masks are removed when translating to HL. Emitted strings are compared against the source wording.- DOCS: hybrids are passed by value; wakePrompt reads the per-PR version and the runner writes the version on successful state save. It does not rely on a mutation inside wakePrompt.- DOCS: scratch imports must use a relative path: from `K9/tools/`, `../../../../projects/kunibert/lib/...`. The initial five-parent probe failed and was corrected before proofs; no project code depended on that probe.- GAP: no new framework gap found for K9. The existing K7 signed malformed-JSON behavior remains HTTP 500 in production and its existing regression assertion passes (previously documented as hybriel#280).## Cleanup and open pointsRecorded fake/server/service/codex PIDs checked absent: 3486161, 3486162, 3486803, 3486856, 3486909, 3486965, 3487002, 3487049, 3490318, 3490555, 3491082, 3492366, 3493957, 3494332, 3494734, 3495897, 3498809, 3502808, 3502809, 3503232, 3503362, 3503434, 3503566, 3503791, 3503870, 3503941. Remaining alive: [].No K9 blocker or unfinished implementation. The pre-existing skip policy remains: an unchanged head without thread updates, pending notes or force skips before making a wake prompt; old-session calibration therefore waits for the next actual review run. No real-model review quality was measured; all required proof uses fake codex.
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