Skip to content

Fix/kpi pins - #4

Merged
aregee merged 6 commits into
mainfrom
fix/kpi-pins
Sep 10, 2026
Merged

aregee merged 6 commits into
mainfrom
fix/kpi-pins

Conversation

@aregee

@aregee aregee commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What this changes

A short description.

Why

The problem or motivation.

Checklist

  • ruff check . is clean
  • pytest -q is green without a model key (credential-free)
  • make demo still runs
  • No secrets, local paths, or run artifacts committed
  • No manufactured wins — any loss or limit is reported honestly
  • New sample cases are true-by-construction (see CONTRIBUTING)

aregee and others added 6 commits September 10, 2026 17:46
…rade time

v0.1.27 refused only a missing key: a KPI pin with an unknown op, a missing or non-numeric
bound, min > max, an empty field, an empty or non-list allowed set, or an unknown mode or
target passed the author gate and was then skipped as malformed at grade time, so the KPI
silently never ran (found by the published-image test). The validation now lives in the
spec (kpi_threshold_expected, field_in_set_allowed), the one rule VerificationSpec, the
author-time validate_contract_params and the grade-time tools all apply.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…other checks

A pin replaced the first contract on its flag, so a KPI pinned on SOURCE_CONTRADICTION
displaced the pack's value_grounding check and a flag could hold one KPI only. The engine
now names the stacking types (kpi_threshold and field_in_set, keyed by field) and the slot
rule: a stacking contract replaces only the same flag, type and field; any other type stays
one per flag and never displaces a stacking one. Identity never includes the version, so a
new version of a check replaces its predecessor and a flag never runs two versions of one
check (pinned in tests/test_kpi_pins.py).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… step at once

In v0.1.27 the contract builder was reachable only by clearing the chat and opening the
example conversation, so pinning a KPI needed the assistant. The palette now offers 'Add a
check or KPI contract', which renders the builder inline. An upload approved through the
attach button now announces the corpus change, so the rail's Load step ticks without a
reload.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ewers missed

The enforced count covers every block a deterministic check enforced, including blocks a
reviewer also raised; the read called them all 'real defects the reviewers missed'. It now
says 'defects a deterministic check proved', and the chip's tooltip says the same.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…e entry

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aregee
aregee merged commit 00936a5 into main Sep 10, 2026
2 checks 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