core/scripts
Shay 5f6e9f5e08
feat(derivation): Workstream A inc 2 — frontier report + rate_with_currency apply_rate injection (#797)
* feat(derivation): Workstream A inc 2 — frontier report + rate_with_currency apply_rate injection

- scripts/gsm8k_frontier_report.py + test (stable buckets; rate_with_currency surfaced)
- docs/recognizer-registry.md + math_candidate_graph.py comments repaired (current refusal doctrine; old skip-only marked historical)
- generate/math_roundtrip.py: add 'a','an' to RATE_ANCHORS (with doc update)
- generate/recognizer_anchor_inject.py: inject_rate_with_currency (narrow ProperName actor, Rate/apply_rate CandidateOperation, rejects unsafe); registered in _INJECTORS; module docs updated
- tests/test_*_rate_injection*.py + frontier test (8+ unit cases, confusers, synthetic wiring, real-report frontier pin)
- ratification doc (pre-code)
- lookback (post-impl, truthful)

All required local commands exercised (pytest green for new + prior extract/invariants; frontier script shows rate bucket; runner per brief; shas captured).

wrong=0 held. No sealed movement. Proxy still expected !passed (correct_min=10).

See ratification and lookback for scope, hazards, exact outputs.

* fix(derivation): dollar grounding, roundtrip proofs, stale comment, lookback commit, a/an containment, duplicate import

- math_roundtrip: add explicit 'dollar'/'dollars' + '$' branch in _unit_grounds (symmetric to cent) + doc alignment.
- tests: assert roundtrip_admissible True for the emitted rate cands; add a/an containment/confuser test (dollar unit only grounds with $ present); add lower-level _apply_rate solver reach test; remove conditional happy-paths that tolerated refusal; clean duplicate __future__.
- math_candidate_graph: update active stale comment (injector-empty now leads to explicit refusal, not drop/preserve-zero).
- Commit the Inc2 lookback (was local-only).

All per lead block list. New head will be pushed.

* fix(derivation): address remaining Inc2 blockers (locate_rate_verb via matcher token, dispatch test, lookback accuracy, narrow symbols, tests)

- recognizer_match: updated _CURRENCY_AMOUNT_RE + parsing to populate 'rate_anchor_token' localized to the rate span (prevents whole-sentence 'a' hazard from 'a lemonade stand').
- recognizer_anchor_inject: use 'rate_anchor_token' from anchor (with allowed-set check); fallback only if absent. Added Alexa-style confuser coverage.
- injector: narrowed _CURRENCY_SYMBOL_TO_UNIT to $ only for Inc2.
- tests: strengthened dispatch to require live-registry non-empty + roundtrip_admissible; added rate_anchor_token confuser test proving 'per' (not earlier 'a') is used; roundtrip asserts already present.
- lookback: updated to 10 files, 10+6 test counts, current head reality, shas/runner status exact, no rebaseline.
- math_candidate_graph comment already corrected in prior.

All Semantic Rigor / wrong=0 invariants preserved. New tip after push.

* fix(inc2): remove rate fallback to _locate_rate_verb; mandatory rate_anchor_token; hard 'for one cup' confuser; strengthen per-span test; update lookback

- injector: for currency_per_unit_rate, rate_anchor_token is now mandatory. Absent or invalid → immediate return ().
  No call to _locate_rate_verb for these anchors.
- tests: _rate_anchor helper now passes rate_anchor_token.
- Added hard confuser test for 'Alexa ...  for one cup.' — live registry + inject_from_match must emit ().
- Strengthened distracting-a ' per' test to unconditional: m not None, RATE_WITH_CURRENCY, len==1, matched_verb=='per', roundtrip_admissible True.
- lookback updated for 11 files, include matcher.py, rate_anchor_token centrality, exact counts after this.

* docs: pin exact final SHA in Inc2 lookback

* test(inc2): strengthen for_one_cup confuser to unconditional asserts on m and category

* docs(inc2): update lookback with exact test counts 18/6, 11 files, remove 9 files line, note final SHA after push

* docs(inc2): pin exact final SHA c4e83399... in lookback

* docs(inc2): pin exact final SHA 1129c502e6e8... in lookback

* docs(inc2): note no PR/CI yet in lookback

* docs(inc2): pin ultimate final SHA 7df0cac4... in lookback

* docs(inc2): final pin of SHA f0766b3b65... in lookback

* docs(inc2): ultimate pin of head deaa1a1e3fe0...

* docs(inc2): final pin of head ec1b5f32...

* docs(inc2): pin head 011e1e17... (the fixes tip)
2026-06-17 06:38:45 -07:00
..
__init__.py
build_refusal_taxonomy_cases.py fix(refusal-taxonomy): parse new refusal-reason format; reconcile to reader gains 2026-06-03 01:49:41 -07:00
calibrate_ratification_threshold.py chore(ratifier): calibrate default ratification threshold 0.0 → 0.5 (#86) 2026-05-20 19:59:25 -07:00
dump-api-schemas.py feat(W-028): chat surface + trace drawer (#303) 2026-05-26 13:22:11 -07:00
dump-enums.py feat(workbench): CORE-Logos Studio LG-2 — /logos route shell + Overview/Identity/Safety 2026-06-14 12:12:47 -07:00
dump-schemas.py feat(workbench): design mastery pass — chain rail, typography, doctrine-as-tests (Wave R R1) 2026-06-12 13:18:44 -07:00
generate_claims.py feat: ratify independent-gold invariant (INV-25) + SHA-pin deductive lane 2026-06-04 15:56:28 -07:00
generate_discourse_paragraph.py feat(benchmarks): discourse_paragraph lane + pipeline profiler + word-selection tracer 2026-05-16 21:53:46 -07:00
generate_en_numerics_v1.py feat(packs): ADR-0128.1+0128.2 — en_numerics_v1 + loader 2026-05-23 07:02:09 -07:00
generate_english_fluency_ood.py fix(gaps): close G1+G2+G3 + identity vocab + pipeline safety-stub honour 2026-05-16 21:21:06 -07:00
generate_grammatical_v2.py
generate_identity_curriculum.py feat(evals): identity-divergence lane v1 - 93 curriculum events, two axis profiles (Precision/Generosity), divergence/coherence/causal metrics (all pass) 2026-05-16 06:48:13 -07:00
generate_identity_test_cases.py feat(evals): identity-divergence lane v1 - 93 curriculum events, two axis profiles (Precision/Generosity), divergence/coherence/causal metrics (all pass) 2026-05-16 06:48:13 -07:00
generate_monotonic_cases.py feat(evals): v3 lanes — monotonic-learning passes, adversarial-identity reveals gap 2026-05-16 13:42:47 -07:00
generate_phase5_domain_lanes.py feat(phase5): land 5.2–5.7 — six new fluency lanes, parallel sweep 2026-05-16 20:59:31 -07:00
generate_phase5_language_lanes.py feat(phase5): land 5.2–5.7 — six new fluency lanes, parallel sweep 2026-05-16 20:59:31 -07:00
gsm8k_frontier_report.py feat(derivation): Workstream A inc 2 — frontier report + rate_with_currency apply_rate injection (#797) 2026-06-17 06:38:45 -07:00
gsm8k_microscope.py fix(adr-0191): candidate-graph completeness guard — real-corpus wrong 5→0 (#496) 2026-05-30 15:45:07 -07:00
publish_pack_measurements.py chore(evals): contracts + bench json + Lane B viewer + chart + audit + demo schema (#62) 2026-05-20 13:53:13 -07:00
ratify_anchor_lens_packs.py chore(packs): re-seal register packs (ISSUED_AT bump + missing seals) 2026-05-20 07:39:38 -07:00
ratify_ethics_pack.py feat(packs): expansion round 2 — ethics ×3, anchor-lens ×3, relations-v3, register ×2 (#48) 2026-05-20 07:18:35 -07:00
ratify_identity_packs.py feat(identity-packs): ADR-0027 Phase 5 — ratify all three v1 packs 2026-05-17 19:31:55 -07:00
ratify_register_packs.py fix(packs/register): remove bare '.' closings + ratify gate refuses them 2026-05-21 06:57:43 -07:00
ratify_rhetorical_style_packs.py feat(adr-0087): rhetorical-style pack substrate (loader + default_unstyled_v1) (#74) 2026-05-20 16:19:36 -07:00
ratify_safety_pack.py feat(safety): ADR-0029 — always-loaded, never-replaceable safety pack 2026-05-17 19:56:29 -07:00
review_trace.py
run_examples.py
run_pulse.py
scaffold_phase5_domain_lanes.py feat(phase5): land 5.2–5.7 — six new fluency lanes, parallel sweep 2026-05-16 20:59:31 -07:00
score_phase5_holdouts.py feat(phase5): land 5.2–5.7 — six new fluency lanes, parallel sweep 2026-05-16 20:59:31 -07:00
seal_gsm8k_test.py feat: ADR-0119.7 — seal GSM8K test as gsm8k_math holdout (Phase 5 substrate complete) 2026-05-22 20:08:35 -07:00
seal_holdouts.py feat(evals): ADR-0105 — sealed holdout encryption via age (#108) 2026-05-22 10:09:43 -07:00
verify_definitional_closure.py feat(packs): ADR-0085 content style pass v2 — 3sg + plural agreement (+ closure infra) (#100) 2026-05-20 23:12:28 -07:00
verify_lane_shas.py feat: ratify independent-gold invariant (INV-25) + SHA-pin deductive lane 2026-06-04 15:56:28 -07:00
verify_semantic_equivalence.py test(derivation): add ADR-0184 semantic replay equivalence harness 2026-06-10 14:35:22 -07:00
workbench feat(workbench): one-command launcher with fail-loud preflight + README quick-start 2026-06-13 00:06:31 -07:00