Skip to content

Explain validator rejections in plain English (EXP-01, EXP-02) - #7

Merged
OnePieceMonkey merged 5 commits into
mainfrom
exp-explanations
Oct 5, 2026
Merged

OnePieceMonkey merged 5 commits into
mainfrom
exp-explanations

Conversation

@OnePieceMonkey

Copy link
Copy Markdown
Owner

Merge #6 first. This branch is based on it, so the diff shrinks once #6 is in.

  • packages/core/src/explain/rule-explanations.ts: 29 rules (EN/DE), written from the XRechnung 3.0.2 rule texts. Browser-safe, exported as @verdict/core/rule-explanations.
  • packages/core/src/explain/explain-rule.ts: createExplainer for rules outside the table. Nemotron Super with optional Tavily sources, cached per rule ID, at most three calls per run. Any failure leaves the rule unexplained; the run never fails because of it. Nano was tested first and confused the payee with the buyer.
  • RuleViolations in the web app: plain-English explanation and fix per rejection, model and source links for generated ones, the validator's own wording kept underneath.
  • deploy/cloud-run.sh --secret also stores an optional TAVILY_API_KEY; the deploy mounts it when present.

Checked: typecheck and tests green (5 new tests). Live call against Token Factory explained BR-17 correctly with Super (0.012 ct). UI checked on the recorded "bank details missing" run.

🤖 Generated with Claude Code

OnePieceMonkey and others added 5 commits October 4, 2026 19:08
Hugging Face now requires PRO for Docker Spaces, so the free option is gone.
The container is host-neutral (deploy/Dockerfile, deploy/start.sh) and
deploy/cloud-run.sh builds HEAD for linux/amd64, stores the Nebius key from
.env in Secret Manager without printing it, and deploys one scale-to-zero
service capped at one instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Artifact Registry keeps only the two newest images, so storage stays in
the free tier. OPS-05 now targets Cloud Run; account setup is pending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… EXP-02)

A local table covers 29 rules (EN/DE, written from the XRechnung 3.0.2 rule
texts). Rules outside it are explained at run time by Nemotron Super with
optional Tavily sources, cached per rule ID and capped at three calls per
run; any failure leaves the rule unexplained instead of failing the run.
Nano was tried first and confused the payee with the buyer.

The UI keeps the validator's own wording under every explanation. The
deploy script also stores and mounts an optional Tavily key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OnePieceMonkey
OnePieceMonkey merged commit f46e95b into main Oct 5, 2026
3 checks passed
@OnePieceMonkey
OnePieceMonkey deleted the exp-explanations branch October 7, 2026 20:14
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