Repository navigation
feat(eval): schema-first record emission + org pr-validator grading - #78
Conversation
Two changes to the eval-pr-plan lane: 1. Grade the PR by the ORG pr-validator criteria with the lane running the R10. The entry omarchy-eval skill carries the APPLICABILITY MAP that scopes the org pr-validator spec (pr-validator-agent, layer-charly-internals-extra) to an upstream omacom/omarchy PR, and a new `validate` agent stage grades every item from the LANE's ledger (the gate facts) — never from the author's pasted evidence (the pr-validator's usual assumption). The record carries validate.verdict + the T1-T4 security screen + the per-item checklist. 2. charly WRITES the record — never a hand-written or string-templated YAML. The record/not-testable stages are now `kind: emit` with schema: candy/eval-pr/record.cue (#EvalRecord / #NotTestableRecord): the structured value is validated against CUE with Concreteness required BEFORE the write, then marshalled by the CUE YAML encoder. A colon in an unquoted scalar can no longer produce an unreadable record (RCA 2026.259), and the oracle's render-once cache re-reads it correctly. Docs (README/AGENTS/CONTRIBUTING/VISION) updated; the charly-writes-YAML rule added to AGENTS.md and the entry skill. Depends on opencharly/plugin-pipeline PR #25 (the emit stage + schema-first ledger dump).
Review — BLOCKHead SHA: Change class: config ( Comment thread: empty — no comments to disposition. Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: config ( Comment thread: empty — no comments to disposition. Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
opencharly/plugin-pipeline#25 merged + tagged v2026.259.0809: the schema-first emit stage, the schema-validated ledger dump, and the single schema-first writer. The eval-pr-plan record/not-testable stages depend on it.
Review — BLOCKHead SHA: Change class: config ( Comment thread. Two
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: config ( Comment thread. Two
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
…path claim pr-validator BLOCK fixes: - #EvalRecord/#NotTestableRecord now close() EVERY nested struct (oracle/ control/eval/gates/validate/media/cold_read), so an unknown field at ANY depth is a stage failure. Proven: a record with gates.media_ok renamed to media_ok_typo now fails (field not allowed); the real record still validates. - The header comment claimed schema: eval/pr-<N>/record.cue (no such file); the real contract is candy/eval-pr/record.cue (bare path -> first #Def) for the record stage and candy/eval-pr/record.cue#NotTestableRecord for the not-testable stage. Both now documented.
Review — BLOCKHead SHA: Change class: pipeline config ( Comment disposition (4 prior bot comments = 2 distinct BLOCKs, each posted twice):
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: pipeline config ( Comment disposition (4 prior bot comments = 2 distinct BLOCKs, each posted twice):
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
pr-validator BLOCK fix: the 8-field oracle block was copy-pasted verbatim into #EvalRecord and #NotTestableRecord. Now one #EvalOracle def referenced by both (the file already shared #EvalCheck/#EvalStep), so a field added to one record's oracle cannot drift from the other.
Review — BLOCKHead SHA: Change class: pipeline config ( Comment disposition (6 prior bot comments = 3 distinct BLOCKs, each posted twice):
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: pipeline config ( Comment disposition (6 prior bot comments = 3 distinct BLOCKs, each posted twice):
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
…t (R3) pr-validator BLOCK fixes: - the record stage now selects candy/eval-pr/record.cue#EvalRecord explicitly (matching the not-testable stage's file#Def form), so the shipped selection is unambiguous; a negative case is pasted proving an unknown field at the top or nested level hard-errors THROUGH the emit stage. - the validate stage prompt no longer restates the T1-T4 screen/R1/R3/R4/R5 checks: it points at the applicability map already loaded (the entry omarchy-eval skill) and carries only the lane's substitution + output format. - the entry skill no longer claims it 'does not restate' the spec; it states the map is a deliberately SCOPED restatement (the distros corpus cannot load the internals agent spec), with the org spec authoritative.
Both record stages now name their def explicitly (#EvalRecord / #NotTestableRecord); the header no longer describes the record stage as using the bare path.
Review — BLOCKHead SHA: Change class: pipeline config ( Comment disposition (8 prior
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: pipeline config ( Comment disposition (8 prior
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
The entry skill still showed schema: candy/eval-pr/record.cue (bare path); both shipped stages now use file#Def. Comment/prose-only sweep.
…ived from the org spec Sweep the last single-source contradiction: the entry skill called the org spec 'the single source' while the map is the authority the validate stage grades against. Now: org spec = ORIGIN/authoritative criteria; the map = the lane's SCOPED authority for WHAT to grade, derived from the spec (stated why: the distros corpus cannot load the internals agent spec). The cold-reader no longer says it 'does not restate' — it points at the map.
Review — BLOCKHead SHA: Change class: pipeline config ( Comment disposition (10 prior
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: pipeline config ( Comment disposition (10 prior
Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
…ields)
pr-validator BLOCK: the schema's 'EVERY level is close()d' claim was false for
#EvalCheck and #EvalStep, so an unknown field inside a checks[]/steps[] element
was silently accepted. Both are now close({...}). Proven: the real #EvalRecord
and #NotTestableRecord still validate, and a record with
oracle.checks[0].bogus_elem fails (field not allowed).
Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no guardrail weakening, no supply-chain change beyond the justified in-tree pin bump; the
Verdict: PASS opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no guardrail weakening, no supply-chain change beyond the justified in-tree pin bump; the
Verdict: PASS opencode/deepseek-v4.1-flash — action-review. |
…tros skills (#302) opencharly/eval-omarchy#78 merged + tagged v2026.259.1014: the lane's record is emitted schema-first (emit stage) and graded by the org pr-validator criteria. Bump the eval-omarchy ref pin and regenerate the distros corpus. Regeneration changes exactly: the 3 rewritten omarchy-eval* skills (entry, oracle, cold-reader) and deletes the 7 orphaned v1 siblings (omarchy-eval-full-loop/golden/media/sequencing/tests/tiers/work-lane) whose skill: entities no longer exist in the merged eval-omarchy (R5 sweep). Co-authored-by: agent <[email protected]>
…ledger dump (#79) Advances the eval-pr lane to the merged plugin-pipeline tag `v2026.259.1825` (opencharly/plugin-pipeline#26), which replaces the hand-written OpenAI client with the official `openai/openai-go/v3` SDK and makes the whole request surface authorable through the plugin's CUE schema. Consumer consequences carried in the same change: - candy/eval-pr/charly.yml: the pipeline pin v2026.259.0809 -> v2026.259.1825. - .gitignore: the engine now writes the per-run ledger dump ONE FILE PER LANE (`stage-findings-pr-<pr>.yml`) so concurrent batch lanes cannot overwrite each other's forensics; the previous exact-name pattern (`stage-findings.yml`) no longer matched, so the new dumps showed up as untracked run artifacts. Widened to `stage-findings*.yml`, which covers both the per-lane and the no-PR form. - docs/evidence-and-media.md: the artifact table names the per-lane file and notes that each row records the stage's status and duration. The bump is the same shape as #78 (pin advance, no candy `version:` change). Verification (local): $ EVAL_UMBRELLA=<umbrella> charly box validate Downloading github.com/opencharly/plugin-pipeline:v2026.259.1825... plugin plugin-pipeline: served from .../[email protected]/... charly box validate: OK — checked 200 candies, 21 boxes, 33 deploys, 7 distros, 7 builders; 0 warnings, 0 errors $ charly pipeline run eval-pr-plan --pr 12055 --lanes 1 10.7s [stage oracle] ok 10.7s [stage render] skipped — skipped: @oracle.class == skip 10.7s [stage control] skipped — skipped: @oracle.class == skip 10.7s [stage eval] skipped — skipped: @oracle.class == skip 10.7s [stage media] skipped — skipped: @oracle.class == skip 10.7s [stage gate] skipped — skipped: @oracle.class == skip 10.7s [stage validate] skipped — skipped: @eval.verdict != PASS && @eval.verdict != FAIL 10.7s [stage report] skipped — skipped: @eval.verdict != PASS && @eval.verdict != FAIL 10.7s [stage cold-read] skipped — skipped: @eval.verdict != PASS && @eval.verdict != FAIL 10.7s [stage record] skipped — skipped: @oracle.class == skip 10.8s [stage not-testable] ok 10.8s [stage publish] skipped — skipped: $env.EVAL_PUBLISH != approve || @cold-read.verdict == NO_VALIDATION 10.8s lane 12055: done 10.8s pipeline eval-pr-plan: OK (lanes=1, pool=1) $ ls stage-findings*.yml stage-findings-pr-12055.yml # the merged plugin's per-lane dump $ git status --short (the dumps are ignored — the .gitignore fix works) Rulebook compliance: R1 (every anomaly RCA'd before remediation); R3 (the consumer follows the engine's single naming rule); R5 (the stale ignore pattern + doc row are removed, not left alongside); R10 (live lane run pasted above). Change classification: contract/pin + consumer config + docs. Verification gate: charly box validate + a live eval-pr-plan lane. Attribution: fully tested and validated for the pin/lane path; the doc row is a projection of the verified runtime behavior. *Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)* Co-authored-by: atrawog <[email protected]>
Summary
Reworks the omarchy PR-eval lane on two axes.
1. Grade the PR by the ORG pr-validator criteria, with the lane running the R10. The lane evaluates an
omacom/omarchyPR on a disposable golden-VM clone. A newvalidateagent stage grades it against the org-widepr-validatorspec, scoped to an upstream PR by an applicability map in the entryomarchy-evalskill. The one substitution: the pr-validator normally ASSUMES the author ran R10 and pasted the evidence; this lane RUNS the R10 itself (oracle-planned, control-proven, live VM) and the grader consumes THAT ledger — the PR body is a claim under test, never evidence.2. charly WRITES the record — no hand-written or string-templated YAML. The
record/not-testablestages are nowkind: emitwithschema: candy/eval-pr/record.cue#EvalRecord/...#NotTestableRecord. The structured value is validated against the CUE schema with Concreteness required BEFORE any bytes are written, then marshalled by the CUE YAML encoder. A colon in an unquoted scalar can no longer produce an unreadable record (RCA 2026.259 — the old free-formgeneratetemplate emittedwhat: Docs-only change: …, so the oracle's render-once cache crashed on the NEXT run). Every level of the schema isclose(...)d — the two record defs, every nested struct, AND the#EvalCheck/#EvalSteplist ELEMENT defs. Adding a record field means editingrecord.cuefirst.The
charly-writes-the-YAMLrule is stated inAGENTS.mdand the entry skill.Docs updated:
README.md,AGENTS.md,CONTRIBUTING.md,VISION.md.Dependency resolved. The
kind: emitstage ships in opencharly/plugin-pipeline#25 — merged and taggedv2026.259.0809. This PR bumps the pin and runs on it.How tested
Every command below was run on the FINAL tree (head
38e4084), with the pinned plugin-pipelinev2026.259.0809(noCHARLY_REPO_OVERRIDE). Raw outputs are pasted verbatim.1. Gate:
2. Full lane on a
disposable: truetarget (check-omarchy-eval-base-inst:golden), PR 11803:All 12 declared stages are accounted for (
pipeline validateabove agrees).3. The emitted record — valid YAML, verdicts graded from the ledger:
The R10 checklist line and the T1–T4 security screen, verbatim from the record:
4. The schema-first guard rejects a bad value — at the RECORD level and at the ELEMENT level. A scratch pipeline using a nested closed list, fed an unknown field inside a list element:
The shipped schema itself rejects an unknown field inside a
checks[]element while accepting the real record:5. The converted
not-testable(kind: emit,schema: #NotTestableRecord) ran LIVE on a class-skipdraft PR:Head diff (computed on
38e4084):Rulebook compliance
check+vm+strict-policyloaded.generatetemplate → the oracle's cache re-read crashed); fixed by schema-first emission.candy/eval-pr/record.cue(#EvalOracle/#EvalCheck/#EvalStepshared by both record defs). The org pr-validator spec is the ORIGIN of the criteria; the lane's applicability map is a scoped derivation of it (the lane'sdistroscorpus cannot load theinternalsagent spec).generatetemplates are deleted in place; no dual path.disposable: truegolden-VM clone on the final tree; both changedemitpaths (record,not-testable) and the newvalidatestage executed.Change classification
cueschema proofs, all on the final tree with the pinned engine.emitpaths and the newvalidatestage executed live on the disposable bed on the pinned engine.Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)