Skip to content

poteto-judge + rubric v1; lint-scorecard accepts poteto-shadow rows (draft, shadow build only) - #96

Merged
rymiwe merged 3 commits into
mainfrom
poteto-judge
Nov 24, 2026
Merged

rymiwe merged 3 commits into
mainfrom
poteto-judge

Conversation

@rymiwe

@rymiwe rymiwe commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Draft. Build only: nothing is installed, no flag is on, and no card changes until Paul audits this and Ryan says yes.

Design: Practice Paul's poteto-lean design and audit (fleet handoffs, 2026-11-24), steps 2 and 4. Step 3 (decision-options) lives in fleet tools, which is not a repo, so it is staged on the box next to this PR.

What it adds

  • bin/poteto-judge card <decision_id>: one judge call per card, Gemini gemini-4-neon-low through agy. It sees a blind packet (options, notes, gate_candidate; rows before the card only) and returns {line, text, row, candidate}. Any failure (exit, timeout, bad JSON, unlisted principle or letter) is 🥔 Poteto: unavailable (<reason>), exit 0. No fallback seat, never metered Cursor. 20 s budget, with one retry inside it for transient errors only (5xx, UNAVAILABLE, DEADLINE_EXCEEDED, connection). A quota 429 / RESOURCE_EXHAUSTED, a timeout, bad JSON, auth or an unknown failure makes exactly one call. It never writes the scorecard.
  • docs/rubric-v1.md: Paul's rubric v1, byte-identical to the audited one (sha256 b3b273cf...). Paul owns it; the highest rubric-vN.md is used.
  • Shared with true-check: principle names must map to true-check PRINCIPLE_NAMES; the never-gated check reads true-check NEVER_GATED (keyword backstop kept); poteto-judge request <id> --true-subject S.json builds one request with true-check's own E/P questions plus the poteto question. true-check reads only answers.E/answers.P (tested).
  • lint-scorecard: new POTETO row code for stage: poteto-shadow rows and match_poteto. scorecard-append fills match_poteto on a resolution row from the latest poteto-shadow lean, under the lock.

Tests (fail-first, raw)

  • tests/test_poteto_judge.py: before the tool, Ran 20 tests ... FAILED (failures=6, errors=13); after, Ran 20 tests ... OK. Paul's R1 (no retry on a quota error): with the 429 test added, Ran 21 tests ... FAILED (failures=1) (2 calls, want 1); with the 401 / bad-JSON test added, Ran 22 tests ... FAILED (failures=2); after the fix, Ran 22 tests ... OK. 13 are Paul's prototype tests (the card-rule test now expects the 60-char cut), plus shared-call, principle-map, never-gated-from-true-check, no-Cursor-fallback, retry, default seat and row-fields tests.
  • tests/test_lint_scorecard.py: before, Ran 45 tests ... FAILED (failures=6, errors=1); after, Ran 45 tests ... OK (35 existing + 10 new).
  • tests/test_true_check.py: Ran 113 tests ... OK (unchanged file).
  • Lint on a copy of the live scorecard: 809 findings with main's lint and 809 with this branch.

Not done here

  • Gemini live smoke: agy returned RESOURCE_EXHAUSTED (code 429): Individual quota reached ... Resets in 2h40m49s (first call, about 2:10 PM PT; it resets around 4:50 PM PT). A second call at 2:16 PM PT got the same 429. poteto-judge turned that into unavailable (judge exit 3 RESOURCE_EXHAUSTED), exit 0. A live lean has not been run on this code yet.
  • true-check still makes its own E/P call with its own prompt text; it does not read docs/rubric-v1.md yet.

…true-check's principles and never-gated list

Ports Practice Paul's poteto-lean prototype (rubric v1 verbatim, Paul-owned,
docs/rubric-v1.md) beside true-check, with audit changes 2-5: principle names
map to true-check PRINCIPLE_NAMES, the never-gated check reads true-check's
NEVER_GATED (keyword backstop kept), the card rule text is cut to 60 chars
(full rule in the candidate), and a 20 s budget with one retry inside it.
Gemini gemini-4-neon-low through agy only; no Cursor or other fallback; any
failure is an honest 'unavailable', exit 0. Never writes the scorecard.
…ls match_poteto

POTETO row code: poteto_rubric set; poteto_lean a letter (with principle),
null or unavailable (with reason); auto_state in rule/assist/human/unavailable,
rule needs auto_kind and auto_rule; match_poteto must be a bool. A resolution
row without match_poteto gets it from the latest poteto-shadow lean, under the
append lock. Live log copy: 809 findings before and after (no new code hits).
…aul guild#96 R1)

A quota error (429 / RESOURCE_EXHAUSTED) cannot succeed on retry, so it makes
exactly one agy call. Only 5xx, UNAVAILABLE, DEADLINE_EXCEEDED and connection
errors get the one retry inside the 20 s budget; timeouts, bad JSON, auth and
unknown failures are not retried. Fail-first: 21 tests, failures=1 (429 made
2 calls), then 22 tests, failures=2 (401 and bad JSON retried); now 22 OK.
@rymiwe
rymiwe marked this pull request as ready for review November 24, 2026 23:07
@rymiwe
rymiwe merged commit 6f3169b into main Nov 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant