Tightens the ADR-0250 increment 2 multi-word phrase grounding relaxation to verify that the matched words appear as a contiguous substring in the original source, preserving the strict wrong=0 gate while admitting the 0148 conversion. Includes graph dump as proof of conversion.
Commits the WIP parser integration and recognizer logic left by previous session. Updates graph logic, refusal taxonomy filters, roundtrip token matching, and recognizer_match patterns to formally support mass-noun comparatives.
Passes exact holdout_dev/v1 261-case measurement and full smoke validation.
Updates has_numeric_token to preserve comparative sentences containing only multiplier anchors like 'twice' by adding _COMPARE_MULT_ANCHOR_TOKENS_RE.
Updates _COMPARE_MASSNOUN_RE to allow an optional prepositional prefix before the subject.
Increment 2, target 0148. _COMPARE_MASSNOUN_RE + wiring in
_compare_multiplicative_candidates: 'the [total] number of <unit> counted on
<A> was twice the total number counted on <B>' -> A = factor x B. Verified:
extracts 0148's statement correctly (actor='the first day', ref='the second
day', factor=2.0, forward); fail-closed (additive 'N more than' -> 0 cands;
off-shape -> 0 cands; possessive frame unaffected). Regression-safe: 76
comparative/compare/q-diff tests pass, tune wrong=0 PARSED=3.
NOT yet converting 0148: discovered parse_and_solve parses these day-entity
sentences via a DIFFERENT reader path (produces title-case 'First Day'/'Second
Day' entities) — both extract_operation_candidates + extract_initial_candidates
return [] for the possessive compare + seed, yet the full reader solves rung-1.
Next: locate that path, wire the mass-noun frame into it with matching entity
canonicalization; then passive-seed + prepositional-lead; then the 3-part proof.
The compound discrete-count extractor's all-or-nothing tail guard is digit-
based, so a no-digit compare clause in a conjunctive list ('buys 4 lbs beans,
6 lbs milk, and twice the amount of carrots as beans') was silently DROPPED —
injecting 4+6 and losing the carrots (a wrong=0 landmine, masked only by the
case refusing elsewhere). The #78 substrate widens the compound extractor's
verb reach, so harden it: refuse the whole compound on any '<factor> the
amount/number of' / 'twice/thrice/times/half the' / 'double/triple' surface.
Verified: 0082 compound now refuses fail-closed; tune+measure wrong=0; PARSED
unchanged (3/2); smoke 176 green.
The two reusable foundations of increment 1, both verified wrong=0:
- NEUTRAL_COUNT_VERBS (math_roundtrip): the shared positive-polarity ALLOWLIST
(production/acquisition/possession-count verbs), fail-closed. Extends ADD_VERBS
with curated neutral production verbs (score/write/teach/plant/harvest/produce/
draw/sing). Depletion/transfer (SUBTRACT/TRANSFER_VERBS) excluded by positive
determination — 'Alice lost twice as many' refuses, not via a blocklist.
- Seed reader: discrete_count matcher acquisition path aligned to the allowlist
(made/baked/grew/scored/wrote/taught now inject; depletion refuses).
- Comparison reader: _comparison_anchor_verb() allowlist extended to the same
NEUTRAL_COUNT_VERBS (keeps fail-closed; captures scored/caught/wrote frames).
Verified: production injects, depletion refuses; 71 pinned comparative tests
pass (polarity guards now via allowlist); tune wrong=0; smoke 176 green.
FINDING (measured 4 ways: yield harness, band map, band oracle, capability
histogram): band-1 as scoped {seed + forward-comparison + q:simple/summation}
converts 0 tune cases. Its otherwise-in-band cases STRAND on multi-compound (25)
and compare-additive (17) — capabilities outside the ~30 band. The conjunction
recurs at sub-capability granularity; the band-map taxonomy was too coarse.
Foundations validated + reuse-ready (done-when part 2); band-solve>0 (part 1)
needs the band to grow to +compare-additive(+multi-compound) — a scope/done-when
ruling for Josh. No merge until ruled.
Five fast-lane failures on main made the full suite dishonest.
- Refresh INV-21 allowlist pins in demo tests for holographic_vault (ADR-0241)
- Skip non-powerable (mixed-parity) rotor_power calls in generate recall and
session anchor pull instead of crashing the cognitive path
- Align session_anchor_pull fixture to grade-1 field parity
- Ledger: docs/analysis/full-suite-reds-ledger-2026-07.md
[Verification]: targeted 10 passed; lane SHAs 9/9; smoke 175 passed
The post-CGA / ProblemFrame pivot comes to fruition: geometric dilation for
fraction_decrease is built from the bound scale role's GroundedScalar
(exact Fraction from kernel slash_fraction / pack numerics), not from a
local "decrease to N/M of" regex on evidence spans.
- Remove _build_fraction_decrease_payload_and_bind (legacy overfitting path)
- Add _fraction_decrease_scale_binding + _versor_binding_from_scale_value
- assess_fraction_decrease attaches VersorBindings when runnable
- assess_geometric_proposals uses frame scale only for fraction_decrease
- compose fallback prefers obligation-complete contracts with bindings
- Guard test: contracts source must not reintroduce the prose regex
Invariants: construction-boundary CGA only; versor_condition < 1e-6;
no new derivation-organ prose parser.
Addresses MEDIUM from code-review: eliminates duplication risk between GraphNode method and pure canonical func.
Tests (graph_anti / node_depths) remain green.
- root_normalize + depths in anti_unifier/derive/recognize for AC1
- default enrichment no flag for AC2
- depth to pass_manager + assess for AC3
- graph_anti_unify helper for AC4
- direct tests + verif per plan
Aligned with exact recall, immutability, cognitive spine path.
- Add LexicalResolution dataclass + resolve_entry() in chat/pack_resolver.py
that returns language, root, morphology_id, gloss, semantic_domains from
he/grc/en packs (lru-cached, first-match, full depth support).
- Extend GraphNode (generate/graph_planner.py) with optional language/root/
morphology_id fields (defaults preserve all call sites). Update as_dict()
to include them conditionally. ground_graph() now propagates depth.
- Generalize enrichment in core/cognition/pipeline.py:
- Per-subject resolution map using depth packs.
- Enrich all matching nodes before ground (subject→node map).
- Pass depth alongside recalled_words to ground_graph().
- Consume depth on articulation side:
- realize_semantic() and render_semantic() now accept/use language+root
for etymological/Logos framing on Hebrew/Greek nodes (e.g. "אמת (Hebrew
root: א-מ-ן) is defined as..."). English unchanged.
- Enrich oov_geometric_context with node_depths for future geometric
anti-unification using roots.
- Extend recognition/connector.py to forward depth from EpistemicNode
paths into GraphNode.
- Add full Hebrew turn test under realizer_grounded_authority flag.
- Update related tests (semantic realizer, OOV context, surface resolution).
- Cleaned legacy type() hack immediately on discovery (hard-stop rule).
All targeted tests green (52+ in slices), broad relevant suite 581 passed.
Invariants preserved: versor only at owned boundaries, exact recall,
immutable updates, no new legacy parsers. 3 pillars upheld.
Work continues tomorrow from this checkpoint.
* chore(kernel): tighten construction_affordances catalog invariants
- Delete stale make_proposal (deferred from PR #919; no live callers remain)
- Derive _PROPOSAL_FIRST_FAMILIES from _CATALOG keys to eliminate hidden
sync obligation (was a manual restatement of all four catalog entries)
- Introduce _SERVING_AUTHORIZED_FAMILIES frozenset so the serving-allowed
exemption in ConstructionFamily and ConstructionProposal __post_init__
consults one central authority instead of two string-literal comparisons
- Pre-compute _SORTED_FAMILIES at module load so all_diagnostic_families()
returns a constant rather than re-sorting on every call
- Remove _VALID_STATUS ClassVar from ConstructionProposal; the field is
already typed Literal["proposed"] and the indirection adds no safety
No behavior change to serving, assessment, or proposal creation paths.
ADR-0236: small load-bearing PR, single-file, invariants as code.
* refactor(contemplation): unify organ pipelines in pass_manager
- Introduce OrganPipeline descriptor (organ, reader, solver, reason_adapter)
so every routed solve path shares one _solve_and_verify implementation.
Adding a new organ is now a single OrganPipeline(...) declaration.
- Extract _maybe_ask helper that collapses the triply-duplicated
family_by_name / assess_from_family / exercise_ask inline block.
- Add _result() helper that appends the terminal Finding and constructs
ContemplationResult in one call, enforcing terminal-is-last-finding
by construction across every return site.
- Replace assert not isinstance(problem, Refusal) with
InternalContemplationError so the routing invariant is enforceable
under python -O and surfaces a named, debuggable exception.
No behavior change: all Terminal states, Finding sequences, family
resolution, CMB-over-R3 precedence, boundary-first ordering, and
ask/proposal emission logic are preserved exactly.
* fix: final cleanups for CGA substrate migration PR
- Update UI test fixtures to packs/data paths
- Clean CLAUDE.md/GEMINI.md to minimal per AGENTS.md
- Refactor fraction geometric construction into dedicated helper in problem_frame_contracts.py
- No TODOs left in code; notes in PR description
This completes the mechanical readiness for the CGA substrate + registry consolidation work.
* docs: include PR description for review
* chore: enforce forgejo tooling in AGENTS.md
* docs: update bootstrap skill and add git-forgejo config doc per new rules
* docs: remove deprecated git-forgejo wrapper docs
* chore: ignore local .mcp.json configuration file
* fix(ui): remove unsupported assessment.bindings usage to fix TS2339/TS7006 in constructionEvidencePanelModel
- Implement CandidateOperatorPolicy and cue dataclass for quantity entity binding
- Add build_quantity_entity_binding_candidate constructor with strict refusal checks
- Bump CANDIDATE_OPERATOR_SET_VERSION to candidate_operators.v2
- Update exact export and static table shape tests
- Reconcile stale static guards across binding replay adapters
- Provide full explicit determinism and failure mode test coverage
Return PracticeTraceRefusal before dereferencing bindings or operator
results when structural type/shape checks fail. Guard seal_bound zip
against binding_result_count_mismatch. Add five refusal-without-exception
tests for malformed bound inputs.
Adds immutable practice-trace input, sealed-trace, and trace-refusal
records with deterministic identity-chain validation after the Contract/
Proof Replay Adapter, as authorized by ADR-0230.