Skip to content

Complete the contract-v1.37 cut: release digest inventory - #238

Merged
brettheap merged 1 commit into
mainfrom
change/release-contract-v1.37
Aug 21, 2026
Merged

brettheap merged 1 commit into
mainfrom
change/release-contract-v1.37

Conversation

@openxfactory

@openxfactory openxfactory Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

contracts/releases/contract-v1.37.digests.yaml (190 entries), built by validate-contract-release.py build --tag contract-v1.37 against the realized commit 6cbb449 (PR #235) and verified with verify-commit. Mirrors the v1.36 cut's completion flow; the annotated contract-v1.37 tag is applied to this completion commit once it lands. (PR #235's squash title says v1.36 — it predates the merge-order renumber; the manifest/CHANGELOG content is authoritative at v1.37.)

🤖 Generated with Claude Code

contracts/releases/contract-v1.37.digests.yaml (190 entries) built by
validate-contract-release.py against the realized commit 6cbb449 (PR
#235 — whose squash title says v1.36 from before the merge-order
renumber; the manifest and CHANGELOG inside are authoritative at
contract-v1.37). The annotated tag contract-v1.37 is applied to this
completion commit once it lands, mirroring the v1.36 cut's flow.

Co-Authored-By: Claude Fable 5 <[email protected]>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @openxfactory[bot]! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@brettheap
brettheap enabled auto-merge (squash) August 21, 2026 22:12

@brettheap brettheap left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved (submitted via terminal per Brett's instruction).

@brettheap
brettheap merged commit c1ffa0f into main Aug 21, 2026
@brettheap
brettheap deleted the change/release-contract-v1.37 branch August 21, 2026 23:57
brettheap added a commit that referenced this pull request Aug 22, 2026
…ract-v1.38)

* WIP 11.7: the routing-rule declaration, in the schema and in the type

Additive on `$defs/model_entry`: three OPTIONAL fields that travel together --
`routing_rule`, `routes_to` (opaque catalog handles, uniqueItems), and
`resolved_model_id` -- plus `dependentRequired` and two conditionals that BOTH
require `routing_rule` to be present, so an entry declaring no routing rule is
judged exactly as it was before. Verified against an eleven-case matrix.

`ModelCatalogEntry` gains the same three as defaulted fields (plain-model
defaults, so every pre-existing construction means what it always meant), with
the per-entry rules in `__post_init__` and the four CROSS-ENTRY rules in
`ModelCatalog._validate_routing_targets`: no dangling target, no chained rule,
an available rule resolves to an available model, and the BADGE COVERING the
ratified scenario's THEN demands.

`as_public_dict` discloses the three only for an entry that IS a routing rule,
so a plain entry's public dict is byte-identical across the release boundary.

Co-Authored-By: Claude Fable 5 <[email protected]>

* WIP 11.7: the delegated validator learns the routing rules, with self-tests

`check_routing_rules` enforces the five rules the shape cannot express — no
dangling target, no chained rule, an available rule resolves to an available
model, THE BADGE COVERING, and a rule declaring no more headroom than its
narrowest destination. The same five are enforced at catalog construction in
doxbench_model; neither place substitutes for the other, because an in-process
catalog never becomes a file and a file is never constructed through that type.

One packaged POSITIVE (`workbench-model-catalog-routing-rule`) and SIX negatives,
one per rule plus the structural plain-entry-carrying-a-routing-field case.
Verified individually: every negative fails for exactly its stated reason.
Validator output stays 0 errors / 4 warnings (the four v1 deprecations, by
design); the example self-test goes 37 -> 38 valid and 50 -> 56 negative.

Co-Authored-By: Claude Fable 5 <[email protected]>

* WIP 11.7: re-allocate to contract-v1.38 and repin the runtime

MAIN MOVED UNDER THIS SLICE. The branch base is 6cbb449 (PR #235,
identity-brokering + trust-anchor), which ALLOCATED contract-v1.37 -- a
CHANGELOG heading plus `contract_bundle_version: contract-v1.37` -- while its
own squash message still says "at contract-v1.36". CHANGELOG presence is the
availability test under docs/contract-versioning-policy.md, so v1.37 is taken
and this release is contract-v1.38. Every one of this slice's own v1.37
references is renumbered; #235's twenty-odd manifest/README mentions are ITS
release's and are untouched.

PRE-EXISTING DEFECT FOUND AND NOT FIXED HERE: at origin/main,
`validate-contract-release.py verify-commit --commit origin/main` exits 1 with
HGR-RELEASE-INVENTORY-MISSING -- #235 bumped the bundle to v1.37 without
shipping contracts/releases/contract-v1.37.digests.yaml. It is another lane's
release surface; recorded, not touched.

Repin (the v1.34 pattern, mirrored): doxbench_contracts CONTRACT_TAG ->
contract-v1.38 with the `unpublished:` sentinel for the ref, the CATALOG digest
moved (the chat-turn's unmoved), manifest row digest + consumption_rule, and the
test-side RELEASED_* mirror plus the packaged-positive count 9 -> 10.

Co-Authored-By: Claude Fable 5 <[email protected]>

* WIP 11.7: flip the type-pin, and pin the release from four sides

FLIPPED (test_doxbench_bridge): the pin that asserted `ModelCatalogEntry` has
NEITHER routing attribute becomes its inverse -- the type CARRIES both, and an
entry declaring neither still reports `routing_rule: False`,
`resolved_model_id: None` and a public dict with the three keys ABSENT. The
antecedent is asserted first (`hasattr` + `__slots__`), so it cannot pass against
a type that lost the fields again.

KEPT GREEN, UNTOUCHED, and that is the evidence: the duck-typed bridge test and
`test_a_routing_rule_entry_would_be_reported_as_one_without_touching_the_route`.
Each gains a REAL-TYPE sibling proving the release changes neither `_apply_model`
nor `doxbench_selected_model`.

New coverage: the five cross-entry catalog refusals (each also through the direct
constructor), the per-entry refusals, the TypeError/ValueError split, the
degraded-bridge projection still constructing, and eight schema-level refusals
against the REAL released bytes -- including `provider_id` on an entry, which
keeps task 11.6's placement ruling enforced by the shape.

Co-Authored-By: Claude Fable 5 <[email protected]>

* WIP 11.7: the menu probe, and the corpus's seven-field claims corrected

THE MENU SCENARIO IS CLAIMED WITHOUT A VIEW CHANGE, and proved rather than
argued: a node probe mounts the SHIPPED chat rail over the packaged
contract-v1.38 routing catalog and reads the option text back. The `auto`
option's visible text contains BOTH routed models' handling badges, because the
covering rule requires the rule's own `data_handling` to carry them and this view
already renders `label — data_handling`. `sendDisclosure` needs no change for the
same reason. `adoptCatalog` spreads the whole entry (`{...entry}`), so the three
new fields reach browser state rather than being silently projected away.

Corrected our own "CLOSED seven-field" claims, which the release makes false:
`_apply_model`'s two docstrings (its 11.6 provider-id RULING is preserved and
now says WHY the growth does not reopen it — the schema still refuses
`provider_id` structurally), contracts/README's row, the local example's header,
and two test comments.

Co-Authored-By: Claude Fable 5 <[email protected]>

* contract-v1.38: the doxBench model-catalog routing rule (additive growth)

Completes the release surface for tasks.md §11.7 of add-doxbench-editing-phase-b:
the CHANGELOG entry and the release DIGEST INVENTORY. The schema growth, the
manifest row (recomputed digest + rewritten consumption_rule), the bundle bump
and the consuming runtime repin are the preceding commits on this branch; the
branch squashes to one unit, exactly as §13's release did.

ALLOCATED v1.38, NOT v1.37. Main moved under this slice: 6cbb449 (PR #235)
allocated contract-v1.37 while this was in flight, its own squash message still
saying v1.36. CHANGELOG presence is the availability test, so v1.38 is the next
available number and the entry says so.

INVENTORY BUILT AFTER THE BUNDLE BUMP (v1.36's first tag failed on exactly this):
190 entries, and exactly four digests move -- CHANGELOG, README, manifest, and
the catalog schema, which are precisely this cut's inventory-member files.

RECORDED, NOT FIXED: at 6cbb449 `verify-commit` already exits 1 with
HGR-RELEASE-INVENTORY-MISSING, because that cut bumped the bundle to v1.37
without shipping releases/contract-v1.37.digests.yaml. `resolve_committed_inventory`
reads the bundle version AT THE COMMIT, so this cut verifies against its own
v1.38 inventory and is unaffected; v1.37's provenance gap is that lane's.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Tick 11.7: the model-catalog release is cut, with its judgement calls flagged

The box is CHECKED because the ratified `The menu offers a routing rule` scenario
is now claimable: a conformant catalog can declare an `auto` entry, and the
runtime that already honoured one was not rebuilt.

The tick records the release, the five delegated rules and their revert-tests,
the credential/provisioning sentence P3-23 asked for, and SIX flagged judgement
calls for the reviewer: text-containment badge covering (with the unchanged
500-byte ceiling as its stated consequence), routes_to holding REFERENCES rather
than badge objects, disclosure only when declared, the three rules inferred from
how the turn gate actually works, no view change (proved by a node probe against
the shipped rail), and the v1.37 -> v1.38 re-allocation.

Ledger row struck; the blocking set is now 10.7, 12.7 and 13.8. The proposal's
`contract_release:` frontmatter goes TWO releases -> THREE and now owes one, not
two. 10.7 and 13.8's own task prose is deliberately NOT edited (13.8 still says
11.7 owes a release -- its owner's to re-adjudicate).

Co-Authored-By: Claude Fable 5 <[email protected]>

* F1+F2: the badge covering becomes SEGMENT MEMBERSHIP, and the file gate stops
being weaker than the type gate

F1 (BLOCKING). Raw substring containment was wrong in the direction that
matters, and the reviewer broke it twice on the released bytes: a rule badged
"Routes to a non-tenant endpoint." was accepted as carrying a target badged
"on-tenant" (`"on-tenant" in "non-tenant"` is True — the menu then showed the
INVERSE of the posture it routes to), and a rule ending "...retain nothing." was
accepted as carrying a target badged "retain". Both reproduced on BOTH gates
before the fix.

The covering is now segment membership over a DECLARED separator (" / ", chosen
because `;` `.` `,` all occur in real badges and `/` does not). Each routed
entry's own badge must be one segment of the rule's badge, compared with
whitespace collapsed, case folded and trailing `.;,` dropped — the
over-strictness the reviewer also flagged — and with INTERIOR characters never
rewritten, because that is exactly where on-tenant/non-tenant lives. The
grammar's own residual collision is refused rather than hoped away: a routed
badge that itself contains " / " could never be one segment, so the catalog is
refused as ill-formed. Extra segments are permitted, so a rule may keep its own
lead-in. Declared in the schema (data_handling's comment plus both routing
fields' descriptions), implemented once in `doxbench_model`
(`ROUTING_BADGE_SEPARATOR`, `normalized_badge_segment`, `badge_segments`) and
restated in the standalone validator, which imports nothing from that package —
a companion test pins the two equal (next commit).

F2 (BLOCKING). `check_routing_rules` never checked `resolved_model_id ∈
routes_to` nor self-reference, so the reviewer's B instance passed the file gate
0-errors: badged safe, resolving to a model badged "retained and used for vendor
model training", which every covering check skipped because they all run over
`routes_to`. The type gate always refused it, so the file gate was strictly
WEAKER — while its own docstring claimed those rules were the type's business and
that "a structurally invalid instance never reaches this function". Both checks
added; self-reference is now its OWN named refusal instead of falling out of the
chained-rule rule with a misleading message. Docstring corrected, and it now says
the parity is asserted by a test rather than merely stated.

PACKAGED: all four reviewer instances (A, B, C, D) plus the separator-collision
case, as negatives that fail for exactly their own reason. Existing routing
instances converted to the segment grammar so each still fails for its intended
single reason. Both gates verified to AGREE on all thirteen catalog instances.
Example self-test 56 -> 61 negatives; validator still 0 errors / 4 warnings.

Co-Authored-By: Claude Fable 5 <[email protected]>

* F3+F4+F6: the sidecar names the answering model, and the route scenario is tested

F3 (BLOCKING). `_mirror_turn_into_sidecar` was handed the REQUESTED model id
while the v2 wire record carried the RESOLVED one, because
`doxbench_selected_model(model_entry)` was computed INSIDE the v2 arm, after the
sidecar block. On a routed turn the durable transcript on disk therefore named
`auto` and no reader could learn which model wrote the answer -- against the
ratified THEN's own purpose clause, "so a transcript names the model that
actually answered". The derivation is hoisted above the sidecar and the sidecar
takes `selected_model["resolved_model_id"]`. One call site, one derivation, both
readers.

RECORDED v1 LIMITATION (F3's other half): the deprecated v1 success envelope has
ONE `model_id` and no `selected_model`, so it cannot state both facts on a
routed turn. It carries the REQUESTED id -- what every v1 consumer already reads
and revalidates -- and the fix is the v2 envelope, which exists. Widening a
deprecated closed shape whose whole promise is byte-identical stability is what
contract-v1.34's deprecation forbids. Noted at the v1 arm itself; the CHANGELOG
half follows. The sidecar on the v1 lane DOES name the answering model, because
it is written above the branch.

F4. `doxbench_selected_model`'s docstring still said no catalog entry can declare
a routing rule and that a release was owed. Rewritten; it now also names its
three consumers, which is what made F3 visible. Swept serve.py for siblings --
none.

F6. Two route-level tests, written in test_doxbench_thread_wiring rather than
test_doxbench_routes because only that harness sees BOTH halves in ONE real
request: the wire record (`model_id` == the resolved model, `selected_model`
naming the rule) and the sidecar's turn header. Its negative sibling asserts the
unrouted case is unchanged, so hoisting cannot have moved the ordinary path.

Plus: the two gates' badge grammar pinned equal (separator, punctuation set,
normalizer, segmenter), a pin that the normalizer forgives only what cannot flip
a posture (on-tenant vs non-tenant), the separator-collision refusal, F2's
resolved-badge-is-covered assertion, and a PARITY test running both gates over
all ten packaged routing negatives -- the claim review round 1 found stated in a
docstring and untrue. Catalog schema digest repinned (three places) after F1's
declarations moved its bytes.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Add the DIRECT type-level pins on the covering predicate

The revert-test of the type's segment predicate (R1) failed only the
packaged-corpus PARITY test, which means the type's own suite had no direct
guard: a rule that lives in one gate's tests is a rule the other gate can lose.
Three rows now pin it where the predicate lives -- review instances A and D plus
a badge swallowed into a longer sentence -- and a positive sibling pins that the
predicate did not become a blanket refusal, across all three forgiven
normalizations.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Make the two diagnostic-only arms honest, and guard them on their MESSAGE

REVERT-TESTING FOUND TWO ARMS THAT ARE NOT INDEPENDENT REFUSALS, and rather than
let a test imply otherwise, both now say so. Disabling the file gate's
separator-collision refusal left the validator at 0 errors, and disabling its
self-reference refusal did the same: a badge holding the separator can never BE
a segment, so the covering check refuses that catalog anyway, and a rule that
names itself names a routing rule, so the chained-rule arm refuses that one
anyway. Each arm's value is purely that it names the REAL cause instead of
sending the operator to add a badge that still will not match, or telling them
their rule 'routes to something that is itself a routing rule'.

So: comments in both gates state the arms are diagnostics; a new test pins every
routing negative's own finding CODE (ten rows, keys asserted against the corpus
so a new negative cannot skip the table); and a second test pins the two
diagnostic MESSAGES, which is the only guard that can fail if those arms are
deleted.

F2(b) asked for the self-reference check as 'an explicit check, not incidental
via the chained-rule rule' -- that is exactly a diagnostic ask, and this records
it as one rather than overclaiming a new refusal.

Co-Authored-By: Claude Fable 5 <[email protected]>

* F5+F8 and the prose the fixes changed: ledger, tick, CHANGELOG

F5. The ledger note claimed a three-item blocking set including 12.7's tag +
pin. 12.7 is TICKED and its own body ends "Nothing on this task remains" -- its
tag is published and the aggregation pin landed at 04366e3. FOUR open rows became
TWO, not three, and the residual set is 10.7 + 13.8. ADJACENT-BUT-OWED, FLAGGED:
striking 12.7's un-struck ledger ROW is a bookkeeping correction on our own
change's kept-current table, made on the authority of that task's own already
-ticked discharge rather than on any new judgement of mine.

F8. The schema names codexFactory's `contracts/model-catalog.md` as its consumer
contract, and that document claims an exact match with the seven-field shape.
Recorded in the CHANGELOG as an owed cross-repo follow-up, with the fact that
keeps it honest: the claim is still CORRECT while codexFactory pins
contract-v1.27, and becomes wrong only when it re-pins. No codexFactory file
touched.

PROSE THE FIXES CHANGED. The tick's badge-covering judgement call is REWRITTEN
rather than patched: it states that containment was overturned, quotes both
false-accepts, and says what did and did not survive the correction (the
per-target-badge-objects alternative is still rejected, for the drift reason; the
claim that containment "buys nothing the covering rule does not guarantee" is
withdrawn, because it guaranteed the wrong thing). The tick and the CHANGELOG go
FIVE rules -> SEVEN, drop the false "enforced identically" for a claim a test
actually makes, record F3's sidecar defect and its fix, and record the v1
envelope's structural inability to carry both ids as a LIMITATION rather than
fixing a deprecated closed shape. The CHANGELOG also declares the separator for
consumers and says a renderer may split on it or show the string whole.

Manifest digest repinned and the release inventory REBUILT after every contract
edit: 190 entries, bundle contract-v1.38.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Correct the v1.37 record: PR #238 shipped the missing inventory

The defect this slice found and recorded against another lane -- #235 bumping the
bundle to contract-v1.37 without shipping its digest inventory, so
verify-commit exited 1 on main -- has been repaired by c1ffa0f (PR #238). All
three places this branch recorded it as live now say it was found, recorded, and
fixed by its own lane, which is exactly the outcome recording it asked for. The
record is kept rather than deleted because the habit it earns outlives the
defect: recheck bundle availability against the CHANGELOG at the moment you
allocate, and do not assume the preceding release surface verifies.

Inventory rebuilt after the CHANGELOG edit (190 entries; the arrival of
contract-v1.37.digests.yaml changes no membership -- prior releases' inventories
are not members of a later one). verify-commit passes on HEAD.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Rule 5 -> rule 5': the bound is the RESOLVED model, per Brett's ruling

BRETT RULED 2026-08-21, in-session: "Swap to rule 5'". The adversarial review
upheld rule 5 only WITH RESERVATION -- it permanently capped an `auto` entry's
declared limits at its narrowest destination to compensate for the runtime
computing budgets from the selected (rule) entry. The rule now bounds an
AVAILABLE rule's declared input/output limits against `resolved_model_id`'s
entry ALONE, not the minimum over `routes_to`. Rule 3 is untouched; the rule
count stays seven.

Three reasons, recorded in the type, the validator, the schema, the CHANGELOG
and the tick rather than left in a commit message: under this release's STATIC
resolution the promise that matters is that the menu's declared limits are
honoured by the model that actually answers; the un-resolved destinations are
not load-bearing, because no turn reaches them while the rule resolves
elsewhere; and min-capping would BAKE IN semantics contradicting the sanctioned
future direction -- a per-turn fit-aware router, staged in the next commit as
ideation/staging/doxchat-auto-fit-routing/ and cross-referenced from all five
places.

Unavailable rules are exempt, matching rule 3's existing exemption and keeping
the bridge's degraded projection constructible; the existing test for that still
passes untouched.

EXAMPLES. The rule-5 negative is reworked to the resolved-bound form and RENAMED
(`...wider-than-its-resolution`), and now carries a WIDER non-resolved member to
show the bound is the resolution rather than a minimum. A new PACKAGED POSITIVE
-- `workbench-model-catalog-routing-rule-wider-than-a-non-resolved-member` -- is
the point of the ruling: lawful under 5', REFUSED under the first form. Both
verified on both gates. A test named for the ruling pins it, with its own
other-side assertion so it is a bound and not an absence.

Count pins moved with the corpus (packaged positives 10 -> 11) and the schema
digest repinned in all three places.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Stage doxchat-auto-fit-routing, and cross-reference it from rule 5'

BRETT RULED "Stage the topic" 2026-08-21, in the same exchange as the rule-5'
swap -- the two are one decision seen from two sides, so the topic is what rule
5' points AT when it says a min-cap would have baked in contradicting semantics.

The fragment carries Brett's requirements as a VERBATIM origin quote, set apart
under its own heading, with the six-claim decomposition beside it so a reader can
check the interpretation against the source rather than taking it on trust.
Claims: per-turn fit-aware resolution; filter out models too small for THIS
turn's packet; no fit is a HUMAN decision (warn and ask); the answer may be
session-sticky, which makes it a standing consent with a scope and a subject;
continuing means COMPRESSING to fit rather than truncating silently; and fit is
multi-dimensional, with multi-modal named and raw size only one axis.

Six open questions, each with the template's four sub-fields and a recommended
answer: where the decision lives (the ROUTE -- the port is ratified at exactly
three members); what happens to the released `resolved_model_id` (stays as the
declared default; removal breaks consumers for no gain); the capability
vocabulary (ONE closed `modalities` set, nothing else until a consumer names
itself, on the roster's admission_surface precedent); whether the consent is a
governed record (the TURN record must state the posture it ran under -- browser
state alone rejected, because §11.7's review found exactly this defect class in
the sidecar); one-change-or-three plus compression's home (three exits, with
compress-to-fit CONSUMING task 10.7's posture-and-reason field); and whether the
union badge survives (yes -- narrowing it would disclose after the fact).

Four conflicts recorded honestly, including two against this very release: the
static `resolved_model_id` becomes a default or a fiction, and rule 5' itself
loses its referent once resolution is per-turn.

Cross-linked both ways: the topic names contract-v1.38 as its floor, task 10.7,
add-doxchat-model-intake, add-model-provider-broker and the sibling
context-compression-runtime; the type, the validator, the schema, the CHANGELOG
and the 11.7 tick all name the topic as the reason rule 5' is not a min-cap.
Template-conformant (checked directly against doc_health's own `_template_gaps`
-- staged after ratification, so conformance is REQUIRED, not opt-in), with the
INDEX row and detail section in the same commit per the maintenance rule.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Rebuild the v1.38 inventory after the merge: the CHANGELOG digest moved

contracts/CHANGELOG.md is an inventory member, and the merge brought main's
amendment to the contract-v1.37 entry's install-repo naming into it. Exactly one
digest moves. verify-commit passes on the merged tip.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Say the exit is this topic's OWN change, not the sprint it builds on

DOC-HEALTH CAUGHT A REAL AMBIGUITY, and the document is fixed rather than the
rule waived. The location-conformance family reported ERROR
"staged material already cites proposal add-doxbench-editing-phase-b — move
selected material into the proposal supporting-docs folder", class contested,
and it was right to: `_staged_exit_changes` scans the `## Exit` section
precisely for a change a topic EXITS VIA, and my Exit section said "raise the
change AFTER add-doxbench-editing-phase-b closes its obligations" — sequencing
prose that reads exactly like an exit path, in the one section where that
reading is the rule's whole point.

A disposition would have recorded a waiver for a sentence that was genuinely
unclear. Instead the Exit section now states plainly that this topic exits via
its OWN change, which does not exist yet and is named nowhere there on purpose,
and carries the sequencing as an explicitly separate fact pointing at Related
work — where the change id is an evidence citation, which this rule deliberately
does not scan. Both facts survive; the ambiguity does not.

Doc-health: 3 critical / 7 error / 75 warning / 3 info at the branch tip,
IDENTICAL to origin/main, zero new regressions, and the new topic produces no
finding of any kind.

Co-Authored-By: Claude Fable 5 <[email protected]>

* WIP checkpoint before the N3 revert-test

* N1-N4 from the re-verify: correct the "main verifies again" claim, and close a
real accept in the separator diagnostic

N1 (must-land). Three places said `verify-commit` passes on main again after PR
#238. It does not. Reproduced and BISECTED before touching prose: green at
c1ffa0f (#238), red from e11a057 (#242) onward with
HGR-RELEASE-DIGEST-MISMATCH on contracts/CHANGELOG.md -- #242 edited the
CHANGELOG, a v1.37 INVENTORY MEMBER, without rebuilding v1.37's inventory. All
three claims now past-tense the repair and name the new state, plus a fourth
mention in doxbench_contracts' pin comment that the brief did not list. Still
that lane's to fix; still exactly the habit those notes name -- so the ledger
note now earns the habit twice and says REBUILD THE INVENTORY WHENEVER YOU TOUCH
A MEMBER, the CHANGELOG being one. This branch verifies on its own throughout.

N2. `normalized_badge_segment`'s docstring claimed interior characters are never
rewritten. Casefold IS an interior rewrite for the multi-character folds (ß->ss,
the fi ligature). The claim is restated as the one that is actually true and
actually load-bearing: no fold casefold performs can separate or merge two
handling POSTURES, and that is the test a future normalization step must pass.

N3 -- AND IT WAS NOT COSMETIC. The separator-collision arm tested the RAW badge,
so `"read /\nwrite"`, which holds no literal " / ", slipped it AND THEN SATISFIED
THE COVERING CHECK, because the rule's own badge normalizes to exactly that
segment. That is a full ACCEPT of an ill-formed badge, in both gates -- proven by
revert-test (R13: file gate accepted it). Both arms now test the NORMALIZED
badge; three collapsing forms are pinned on the message, and R12 fails exactly
the newline row.

N4. `test_the_packaged_routing_positive_is_accepted_by_BOTH_gates` covered only
the first positive, so the rule-5' instance was never bound to the TYPE gate --
and rule 5' is enforced in both places. Parametrized over both, with a companion
test asserting the list equals what is on disk, so a later positive cannot skip it.

Inventory rebuilt after the CHANGELOG edits; verify-commit passes on HEAD.

Co-Authored-By: Claude Fable 5 <[email protected]>

* WIP checkpoint before the P2 revert-test

* Correct the record: 0c4ac6a carries the PR #244 bot-round fixes, not a WIP

0c4ac6a's message says "WIP checkpoint before the P2 revert-test", which is why
it was MADE -- the protocol requires a checkpoint before any revert-test -- and
badly undersells what it CONTAINS. The revert-tests (R14, R15) then confirmed it
rather than changing it, so no later commit restates the work. This branch is
change/*, which refuses force-push, so the record is corrected here rather than
rewritten.

0c4ac6a carries all four bot-round dispositions, each reproduced first:

* CODEX P2 (behaviour, confirmed): `ModelCatalogEntry` accepted a `routes_to`
  of 65+ (and 200) while the released schema caps it at maxItems 64 -- the type
  gate weaker than the wire gate, F2's divergence in the other direction. Capped
  per-entry with `MAX_ROUTING_TARGETS`, a literal pinned to the RELEASED BYTES by
  a test rather than restated blind. Boundary asserted both ways, 64 accepted /
  65 refused.
* COPILOT 1 (confirmed): the packaged positive's header still described the old
  min-cap; rewritten to rule 5' with a pointer to the instance that separates the
  two forms.
* COPILOT 2 (confirmed): the validator's `normalized_badge_segment` docstring
  still claimed interior characters are never rewritten -- N2 had landed
  type-side only. Both gates now carry the same corrected claim.
* COPILOT 3 (confirmed): `InvalidRoutingRuleError`'s cross-entry list omitted
  rule 5' and the separator-collision arm; both docstrings now enumerate all six
  and say which refusals are per-entry instead.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Name the right model in the routing-rule example's rule-5' sentence

Final review, comment-only. The header said the rule's limits are bounded by
`routed-hosted-zr-1` "THE MODEL IT RESOLVES TO" and that "the resolution IS the
narrower of the two". Both wrong: the rule resolves to `routed-on-tenant-1`
(800000/900000, the WIDER member), and the declared 2048/8192 coincides with
`routed-hosted-zr-1` -- the member it does NOT resolve to.

The conclusion the sentence was supporting is TRUE and unchanged: this instance
is valid under BOTH the old min-over-routes_to form and rule 5', so it does not
discriminate them, and `...wider-than-a-non-resolved-member` is the one that
does. Only the supporting sentence is rewritten, now naming the right model and
the right direction (the rule sits FAR UNDER its 5' bound, and equals the
non-resolved member's limits, which is why the old form accepts it too).

Comment-only and digest-neutral, ASSERTED rather than assumed: the catalog
schema's sha256 is unchanged, `examples/` contributes zero paths to the release
inventory, and verify-commit still passes. Validator 0 errors / 4 warnings.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Fold the final review's two wrong-record fixes: N6 and N7

Both are defects a squash+tag would have frozen, so they land before the merge.
Reproduced before fixing, as always.

N6 -- THE CAP TEST'S "ACCEPTED" CASE WAS WIRE-REFUSED TWICE. The test built 64
targets PLUS the rule = 65 models, over the schema's `models.maxItems: 64`, with
a per-target badge list 901 bytes long, over `data_handling`'s 500. So a test
whose stated purpose was two-sided boundary parity accepted a catalog the wire
refuses on two grounds. The accepted case is now the largest set a conformant
catalog can express -- 63 targets plus the rule, exactly 64 models, one shared
short badge -- and it is checked THROUGH the projection against the released
schema, which is the only way that assertion means what it says. The 64/65
boundary moves to where it is actually true: the ENTRY SUBSCHEMA, validated
directly (no `$ref`s inside `model_entry`, so no registry needed), parametrized
1/63/64 valid and 65/200 invalid. And the cap's own comment now says the
operative maximum is 63, because `models.maxItems` is 64 and the rule takes a
slot -- 64 is still the right number for the type to enforce, since it is
`routes_to`'s own bound and this type must not invent the catalog-level cap it
has never enforced.

N7 -- THE TWO NEW ID-BEARING FIELDS ESCAPED THE SCHEMA'S ITEM BOUNDS. The cap
landed but `routes_to.items.maxLength`/`pattern` and the identical pair on
`resolved_model_id` did not, so the same type-weaker-than-wire divergence
survived on the two fields THIS release introduced. Both now enforced per-entry
as `InvalidCatalogEntryError`, consistent with the documented split. The pattern
is evaluated WITHOUT importing `re`, so the module's promised two-import list
holds; the `isascii()` guards are load-bearing and revert-tested, because
`"trailing"` with an accent satisfies `str.isalnum()` while the released pattern
refuses it. `model_id`'s IDENTICAL gap is pre-existing and deliberately left --
pinned by a test that says so, and the released-bytes pin now asserts all three
fields carry the same bounds so the sameness is on the record.

Revert-tested: R16 (maxLength), R17 (pattern), R18 (the isascii guard), R19 (the
accepted case back to 64 targets), R20 (per-target badges again). Each fails the
row it guards.

DIGEST-NEUTRAL, ASSERTED: nothing under contracts/ changed, the catalog schema's
sha256 is unmoved, and verify-commit passes.

Co-Authored-By: Claude Fable 5 <[email protected]>

---------

Co-authored-by: brettheap <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
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