Skip to content

Amend install-repo naming to Opensoft-level: Keycloak-Install + OpenXPKI-Install - #242

Merged
brettheap merged 1 commit into
mainfrom
change/opensoft-level-install-repo-names
Aug 22, 2026
Merged

brettheap merged 1 commit into
mainfrom
change/opensoft-level-install-repo-names

Conversation

@openxfactory

@openxfactory openxfactory Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Brett's 2026-08-21 ruling: the broker and CA install repositories are Opensoft-level operator infrastructure, not xFactory-product repos — renamed unprefixed (opensoft/Keycloak-Install, opensoft/OpenXPKI-Install) on the CloudPC-Install/Omnigent-Install precedent, which the promoted repo-boundary-governance spec's own unprefixed vocabulary already matched. Applied in place to both ratified ADDED requirements and all referencing prose (19 files, 45 occurrences) before repository creation; recorded as Amendment notes in both changes' Ratification sections. Aggregation paths (installs/keycloak-install, installs/openxpki-install) and successor change ids unchanged. Source snapshots and the Status: record co-residence finding deliberately retain the pre-amendment name as provenance. Supporting-docs digests refreshed. Gates: 63/63 --all --strict, proposal-support ok for both changes, 150 manifest digests verify, family validators 0/0, doc-health zero drift.

🤖 Generated with Claude Code

…PKI-Install

Brett's 2026-08-21 ruling: the broker and CA install repositories are
Opensoft-level operator infrastructure, not xFactory-product repos —
renamed unprefixed on the CloudPC-Install/Omnigent-Install precedent
(which the promoted repo-boundary-governance spec's own unprefixed
vocabulary already matched). Applied in place to both ratified ADDED
requirements and all referencing prose before repository creation;
aggregation paths and successor change ids unchanged; source snapshots
and the Status:record co-residence finding retain the pre-amendment
name as provenance. Supporting-docs digests refreshed; all gates green
(63/63 strict, proposal-support ok, 150 digests, doc-health zero drift).

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 22, 2026 00:10

@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 e11a057 into main Aug 22, 2026
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]>
brettheap added a commit that referenced this pull request Aug 22, 2026
…ve contract-v1.40) (#256)

* WIP 10.7: the assembled context's posture, on the schema and in the record

Additive on `$defs/success_v2`: ONE optional property, `context_packet`, a
closed object carrying the packet's own `posture` (`full | reduced`) and its
`reduced_reason`, with two conditionals refusing each half of the truth-pairing
`ContextPacket` enforces at construction -- reduced-without-reason and
reason-on-full. Nothing previously valid becomes invalid: the key is OPTIONAL and
its ABSENCE is not a posture claim.

ONE OBJECT rather than two sibling keys, on the `selected_model` precedent in
the same file: one fact about one thing, the present-iff rule stays local to the
object that owns it, and the ENVELOPE's key set is identical for a full turn and
a reduced one.

`serve.doxbench_context_packet` is the ONE derivation, beside
`doxbench_selected_model`, reading the packet the turn actually ran under --
never re-deriving from "was there a knowledge service?", which would be a second
authority (the packet also reduces when a live backend REFUSES a retrieval). It
is called INSIDE the route's packet boundary, so a lying injected assembler is a
`PacketError` mapped to the fixed `invalid_turn_request` rather than a guessed
posture. The builder takes two named scalars, not a dict, and the posture is
REQUIRED of it.

The v1 lane is untouched and its second limitation is recorded at the arm.

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

* WIP 10.7: the surface states the reduced posture

The browser half the release exists for. `settleTurnSuccess` adopts the record's
`context_packet` instead of projecting it away (the adopter is total by refusal
and FAILS CLOSED on a contradiction -- a `reduced` with no readable reason drops
to null rather than showing the silent degradation with a badge on it), and
`beginTurn` and `adoptThreadTranscript` clear it, so the note only ever
describes the answer currently on screen.

`reducedContextNote` is the one pure selector, and `div.doxchat-context` is one
aria-live note under the transcript. A FULL turn shows nothing new: a standing
"full context" badge is a line operators learn to stop reading, which is how the
reduced one would stop being noticed.

Deliberately a rail-level fact about the LAST ANSWER, not a per-turn badge: a
transcript restored from the server's thread sidecar carries no posture, so
per-turn badges would be present on a lived-through turn and absent on the
identical restored one.

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

* WIP 10.7: the delegated validator, the packaged corpus, and the repin

The validator learns `check_context_packet`: the PAIRING (restated on purpose --
the v1.38 F2 finding was a file gate that had grown weaker than the type gate
while claiming parity, and three gates now assert this one rule) plus the
credential/endpoint spelling scan over the reason, which is the release's one new
free-prose field and the only rule here the shape cannot express. A third rule
was considered and rejected in the docstring: prose-matching the reason.

Packaged: TWO positives (reduced-with-its-reason, explicitly-full) beside the
unchanged pre-release record whose continued validity IS the additive claim, and
FOUR negatives -- reduced-without-reason, reason-on-full, an unknown posture, and
a fourth fact on the closed object. Validator stays 0 errors / 4 warnings;
examples 39 -> 41 valid, 61 -> 65 negative.

Repin: CONTRACT_TAG -> contract-v1.39 with the `unpublished:` sentinel for the
ref, the CHAT-TURN digest moved (the catalog's unmoved -- the mirror image of the
v1.38 repin), the manifest row digest + rewritten consumption_rule, and the
test-side RELEASED_* mirror plus the packaged-positive count 11 -> 13.

The route fixture schema declares `context_packet` and does NOT require it,
mirroring the release: that fixture's job is discriminators and closedness, and
the released bytes hold the value rules.

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

* WIP 10.7: pin the release from four sides

CONTRACTS: the additive-class block against the REAL released bytes -- the
pre-release record still valid with no posture at all, four conformant postures,
eleven refusals (including the reason at its exact 500-byte ceiling and one byte
past it), the S1-vs-S3 read on this shape (each conditional guards a case the
other does not, and the unknown posture is refused by the enum NEITHER touches),
and the blast radius: the v1 success and the v2 failure both refuse the key, so
"one optional property on one shape" is checkable rather than described.

THREE GATES, ONE RULE, asserted: each packaged pairing negative is refused by the
shape, by the delegated validator with the `context-packet` finding code, AND by
`ContextPacket.__post_init__`. The other two negatives are the shape's alone and
the table says so -- the validator does not restate an enum or a closure.

ROUTE: the reduced and full scenarios end to end on the widened lane; the record
and the packet's own declaration pinned equal; a REFUSING backend recording its
own reason (the case a "re-derive from whether a knowledge service existed"
implementation would get exactly backwards); the v1 lane still succeeding and
still unable to say so; and every shipped reduction reason checked against the
released ceiling, because an over-long one would turn a degraded turn into a
`response_invalid` refusal on the one path nobody exercises by hand.

FAIL-CLOSED: four lying-assembler cases through the injected seam, each refused
with the fixed `invalid_turn_request` and nothing dispatched.

SURFACE: a node probe over the SHIPPED bytes -- reduced renders the note and the
reason, full renders nothing, an older record renders no phantom badge, both
self-contradicting records render silence rather than half a statement, and a
new flight clears the note.

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

* contract-v1.39: the doxBench chat-turn's assembled-context posture (additive)

Completes the release surface for tasks.md §10.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 §11.7's and §13's releases did.

ALLOCATED v1.39, CHECKED AT ALLOCATION. At the branch base 6614061 the
CHANGELOG's newest heading was contract-v1.38 and the bundle read
contract-v1.38, so v1.39 was the next available number. CHANGELOG presence is
the availability test -- the habit the v1.37/v1.38 episode earned.

THE PRECEDING RELEASE SURFACE IS GREEN, checked rather than assumed:
verify-commit --commit origin/main PASSES at 6614061 against
contracts/releases/contract-v1.38.digests.yaml. The v1.37 lane's
HGR-RELEASE-DIGEST-MISMATCH no longer applies now the bundle has moved.
Recorded in the entry, because the two preceding releases both found the
surface broken when they got there.

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 chat-turn schema, which are precisely this cut's
inventory-member files.

A FIFTH PACKAGED NEGATIVE lands with the entry: a reduction reason leaking a
raw endpoint and a bearer credential. It is the ONE case the shape cannot
refuse, which is why it is the one this release delegates -- and the negative
table now records which gate owns each case rather than settling for
"something refused it".

* Tick 10.7 and 13.8: the last release is cut, and the build is closed

10.7 is CHECKED because the ratified `The knowledge service is unavailable`
scenario is claimable in full: the record carries `context_packet` and the rail
states the reduced posture to the HUMAN, which is the half the task stayed open
for. The tick records the release, the one derivation and its four
lying-assembler refusals, the two delegated rules and the third that was
rejected, the five packaged negatives and which gate owns each, the fail-closed
ceiling hazard, and SIX flagged judgement calls: one nested object with the
packet's own names, always stating the posture (the OPPOSITE of 11.7's
disclosure call, and why), omission is not a posture claim, no
`dependentRequired` and why that is not a weakening, the rail-level note rather
than per-turn badges, and the THREAD SIDECAR GAP -- flagged as a gap, refused on
the parser's fixed arity rather than on merit, and named as F3's honest
counterpart.

13.8 is CHECKED because the set it waits on is empty. Its stale sentence
claiming 11.7 owes a model-catalog release is CORRECTED with the citation
(contract-v1.38, PR #244 / 0f50b35, pin resolved at 58e4aec) -- 11.7's own
tick deliberately left that to this task's owner, and this is the owner
arriving. What the tick does NOT claim is spelled out: the squash sha, the
published tag and the sentinel resolution are the post-land step, with a blank
line for the follow-up to fill in.

Ledger: both remaining rows struck with attribution, TWO open rows became ZERO,
and the note says plainly that the archive gate's mechanical refusal no longer
standing is a statement about the gate rather than permission to walk through
it. Nothing archived.

proposal.md `contract_release:` goes THREE releases -> FOUR across three schemas
(the chat-turn schema carries two), and owes none.

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

* 10.7: guard the thread-switch clear, which revert-testing found unguarded

R24 came back GREEN: deleting adoptThreadTranscript's posture clear broke no
test. The probe now asserts it -- switching documents replaces the transcript
with the SERVER's thread record, which carries no posture, so a note left
standing captions one conversation with a fact about another (the same defect
class P2-9 found for the transcript itself).

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

* 10.7: record what revert-testing actually found, and rebuild the inventory

TWO honest corrections to the record, both from the 26-case revert pass:

* the delegated validator's RESTATED pairing arms are a DIAGNOSTIC, not an
  independent guard -- disabling both leaves the validator's own self-test
  green, because the shape refuses the same instances anyway. Same class as
  11.7's separator-collision and self-reference arms, handled the same way
  (pinned on the finding CODE, which is the only guard that fails). Said in
  both the CHANGELOG and the tick rather than left implying a second refusal.
* the tick now carries the revert-test summary, including the ONE case that
  came back GREEN and the test added for it.

The CHANGELOG is a v1.39 INVENTORY MEMBER, so the inventory is REBUILT with it
-- the habit the v1.37 lane's PR #242 miss earned. Still 190 entries, still the
same four moved digests.

* 10.7: state the revert-test count exactly (29 runs, 27 mutations, two GREEN)

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

* 10.7: tighten six claims the record was overstating, and repin

An adversarial reader would have caught every one of these, so they are fixed
before one has to:

* the key-set-equality argument cited "an existing route-level test still passes
  UNCHANGED". The pre-existing test is on the DEPRECATED v1 lane, where the key
  does not exist at all and which therefore says nothing about the nesting. The
  claim now names the NEW widened-lane test that actually carries it -- and says
  why two sibling keys would have made that test unwritable.
* "the packet half shipped at contract-v1.34's slice" -> it shipped with §10
  itself (PR #216). v1.34 was §13.
* "the inventory ships inside this cut, as contract-v1.34 through v1.38 all did"
  -> v1.37 did NOT, which is the defect this very file records against it.
* "the two preceding releases both found the surface broken" -> ONE preceding
  release found it broken, twice.
* the codexFactory chat-turn consumer doc is NOT in this checkout and was NOT
  read. The entry now states the OBLIGATION rather than asserting a finding.
* "1..500 bytes" -> JSON Schema counts `maxLength` in CODE POINTS. The producer's
  guard checks the stricter UTF-8 BYTE count against the same number, which is
  now what both the schema comment and the entry say.

Also: the unchanged pre-release example is unchanged in its INSTANCE (its header
comment grew), the pin-drift revert wording says three surfaces drifted once
rather than "both directions", `check_context_packet`'s own docstring now carries
the diagnostic finding, and 13.8's green numbers are re-measured AFTER the
origin/main merge with the fifteenth skip explained as a checkout-layout artifact.

The CHANGELOG and the SCHEMA both moved, so the digest is repinned on all three
surfaces and the inventory REBUILT after it.

* Review round 1: four should-fixes and three notes, each reproduced first

S1 — THE NOTE WAS WRITTEN WHILE HIDDEN, so "live-announced" was nearly false.
A `hidden` node is out of the accessibility tree; the text mutation landed in a
node no live region observed, and `aria-live` read `polite` either way, which is
why an attribute assertion could not catch it. Order now matches the failure
note beside it (un-hide, then write), and the probe pins the ORDER by recording
`hidden` AT THE MOMENT of the write.

S2 — THE SCHEMA COMMENT CLAIMED A BYTE GUARD THAT DID NOT EXIST, in released
bytes. Reproduced against the RELEASED validators: a 500-code-point CJK reason
(1,500 bytes) SERVED 200; a 501-code-point reason 502 `response_invalid` with
dispatch ALREADY COUNTED. Three fixes: the comment now says CODE POINTS and what
that means for a consumer sizing a buffer; the constants test's docstring names
its unit and why it uses the stricter one; and `doxbench_context_packet` gained
the bound itself, in code points, pre-dispatch -- so it refuses exactly what the
shape refuses and no conformant record more (the CJK case is still served, and a
test says so). The constant is pinned to the released `maxLength`.

S3 — 13.8 ASSERTED "MERGED" PRE-MERGE. The three pending facts (squash sha, tag,
sentinel) are lifted to the HEAD of the block so a reader meets them before any
claim they qualify, and the gate's verb is stated exactly: BUILT AND GATED now,
MERGED at the landing squash.

S4 — A FAILED FOLLOW-UP STRIPPED THE REDUCED ANSWER'S DISCLOSURE. Reproduced
(reduced -> note; FAILED follow-up -> no note, transcript unchanged). Took the
reviewer's SECOND shape: delete the `beginTurn` clear, because a flight starting
replaces no answer and every path that replaces one already replaces the posture
beside it. Restoring in `settleTurnFailure` was rejected -- it would need a stash
plus the same restore in `abortTurn` and `recordLocalFailure`, re-implementing
one invariant at three sites. Both directions probed and revert-tested.

N1 the redaction scan is a LINT with misses in both directions, not a guard --
kept, reworded in the validator docstring, the CHANGELOG and the tick.
N3 one route test drives a reduced turn through the RELEASED schema with the
default validator seam, closing the fixture-schema gap on the posture rules.
N6 `TurnStore` is per-process, in-memory and bounded; nothing durably stores a
v2 body. The durable record is the thread sidecar, which does not carry it.

The schema and the CHANGELOG both moved: digest repinned on all three surfaces,
inventory REBUILT after it.

* S1: assert the order over EVERY write, not the last one

The R27 revert-test came back GREEN with the defect restored. Cause: under the
wrong order a reduced turn produces TWO non-empty writes -- the settling render
writes the text while the node is still hidden (the announcement is lost there)
and a LATER re-render writes the identical text with it already visible. The
probe read writes[length-1] and saw only the benign second one.

Now asserted over every non-empty write: none may happen while hidden, and the
FIRST one is checked explicitly. Exactly the trap the reviewer warned about when
they said attribute assertions cannot catch this.

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

* 10.7: record the review round's nine revert runs, including the third GREEN

The S1 probe itself came back GREEN with the defect restored -- the most useful
result in the table, and the reviewer's own predicted failure mode one level up.
Recorded beside the other two.

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

* 10.7: re-measure 13.8's green numbers after the review round (3896 -> 3903)

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

* Review round 2: the ledger verb, the fourth answer-replacing path, and the snapshot

S3 RESIDUAL — the ledger summary paragraph, which a reader reaches BEFORE the
tick block, still said the release had "landed" and that the archive gate's
sentence "is true ... and it now is". Same overclaim, same correction: built and
gated now; merged and landed become true at the landing squash.

NEW-1 — `restoreChatState` is a FOURTH answer-replacing path and kept a stale
posture. Reproduced: restore a different conversation's snapshot over a reduced
state and the note survives, captioning "a DIFFERENT, un-described answer".
Reachability nil (the sole caller restores onto a freshly mounted rail) but
three enumerations claimed completeness at three paths. Named as the fourth in
all three, probed, revert-tested.

NEW-2 TAKEN AS (a), CLOSE IT, NO VERSION BUMP. `CHAT_SNAPSHOT_VERSION` is a
fail-closed gate -- restoreChatState keeps the FRESH state on an unrecognized
version -- so bumping would discard every stored blob on the first reopen:
composer text, subject, model choice and proposals, spent to add a caption. An
OPTIONAL field invalidates nothing: an old blob restores to posture-unknown (no
note, the pre-release behaviour), and a new blob read by an older build is
ignored because the restore reads named fields and never enumerates. Same
additive reasoning the wire contracts use, applied to a blob. The stored field
is named `context_packet` and carries the released object whole, so ONE
validator serves both readers and a contradictory blob fails closed.

An explicit `full` IS persisted. The first probe called that an oversight; it is
the doctrine -- absent and `full` are different facts everywhere else in this
release, so dropping `full` would restore "unknown" over a posture somebody
checked.

NEW-3 the live region is written only when its text CHANGES (the reviewer
measured seven re-announcements of the same 227-char sentence from composer
keystrokes); probe pins the write count across seven keystrokes.
NEW-4 the CJK conformance test now runs @released_only through _UNSET, so
"conformant" is a claim about the released bytes rather than about the fixture.
Its over-long sibling needs no such treatment: the producer guard fires before
any validator is consulted.

Also corrected: a tick sentence still saying `beginTurn` clears the note.
The CHANGELOG moved, so the inventory is REBUILT with it (the schema did not).

* NEW-2: pin the stored-posture guard on the ADOPTED STATE, not the rendered note

R39 came back GREEN twice. Cause: reducedContextNote holds its own second guard
on the same rule, so a note-level assertion is satisfied even when
restoreChatState trusts the blob whole. The probe now reads the adopted state
across five contradictions and also asserts the honest blob still adopts, so the
guard is shown to be discriminating rather than merely refusing.

(The second GREEN was a process error of mine, not a second defect: revert.py
restores with , which reverted this strengthening because I
had not committed it before running the drive. Committing first from here.)

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

* 10.7: record round 2's eight revert runs and the fourth GREEN

Twice now a probe has been satisfied by a downstream guard rather than by the
thing it names (S1's later re-render, NEW-2's selector second-guard). Recorded
as a habit to check. Also records the harness process note: commit before
revert-testing, because restore() is git checkout -- .

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

* 10.7: re-measure 13.8's green numbers after review round 2 (3903 -> 3908)

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

* Fold the reviewer's last two notes: soften a comment, name a follow-up

The adopter NORMALIZES (drops an unknown key and still adopts) where the
released shape's closure REFUSES the instance. "Exactly the rule a malformed
wire record does" was a shade strong for the closure case, so the comment now
says the PAIRING rule is shared and the verdicts differ -- and why each is right
where it sits. It lives in doxbench-chat-model.js, which is not released bytes,
so the correction lands at the source rather than in a frozen entry.

Recorded, NOT coded: adoptContextPacket applies no length bound to a RESTORED
reason (a tampered browser-local blob renders an arbitrarily long muted note;
browser-local, self-tamper only, nothing reaches the wire, the server or another
viewer). One line is the fix and it belongs to the slice that touches the
function next.

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

* 10.7: re-measure at the final merge (origin/main 0f9e14b, 3930 passed)

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

* Copilot #256: presence is not truthiness — fixed at four gates, not two

BOTH FINDINGS CONFIRMED, reproduced across all five gates before anything was
touched. The released shape forbids `reduced_reason`'s KEY on a `full` posture
(`not: {required: [reduced_reason]}`). Three other gates forbade only a USEFUL
value, so `{posture: "full", reduced_reason: ""}` passed them:

  instance            shape   delegated  ContextPacket  serve    adopter
  key absent            ok       ok           ok          ok       ok
  reduced_reason ""  REFUSES  REFUSES      ACCEPTS*    ACCEPTS*  ACCEPTS*
  reduced_reason null REFUSES ACCEPTS*       n/a         n/a     ACCEPTS*
  a real reason      REFUSES  REFUSES      REFUSES     REFUSES   REFUSES

Copilot 1 (serve.py) and Copilot 2 (doxbench-chat-model.js) are the third and
fifth columns. Fixing them surfaced two more of the same class: the CONSTRUCTION
gate `ContextPacket.__post_init__` had it too — and the release claims in writing
that the type, the shape and the validator "assert this one rule", which was
false at the blank — and the DELEGATED VALIDATOR read `reason is not None` where
the shape reads the key, so `.get()` could not tell a `null` from an absent one.
Copilot named two gates; there were four.

FIXED at each, with the unit matched to what the reader can see: `is not None`
at the type and the derivation (a Python attribute has no key/value distinction,
so that IS presence there), own-key presence in the validator and the adopter,
which read JSON and do.

THE REDUCED ARM IS UNCHANGED, deliberately, and the asymmetry is the shape's
own: `full` refuses the field for BEING THERE, `reduced` refuses it for being
UNUSABLE (`required` plus `minLength: 1`). Two rules, not one predicate — said
at each site, because collapsing them is how this comes back. Pinned both ways:
a blank still refuses on `reduced`, a real reason still passes, an absent key
still adopts on `full`.

Two packaged negatives, one per instance a different gate missed:
`-context-empty-reason-on-full` and `-context-null-reason-on-full`. Six
revert-tests, all RED, including two that loosen the reduced arm to prove the
fix tightened `full` without weakening it.

NO CONTRACT BYTE MOVES — the shape was right all along. Schema digest unchanged
at cc874fef…, inventory untouched, verify-commit passes; asserted rather than
assumed, and the two new examples confirmed NOT inventory members.

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

* 10.7: correct the bot round's revert count (7 runs) and note R43 is no fifth GREEN

The validator revert leaves its own self-test green because its pairing arms are
DIAGNOSTICS -- already recorded, and the finding-code pin that guards them went
RED. Predicted, then observed.

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

* Review N-1 and N-2: correct a "not rebuilt" claim, and make a per-stem table per-stem

N-1: two sites said the PACKET was not rebuilt and that `ContextPacket` is
byte-identical to what §10 shipped. False since the bot round, which tightened
the construction gate's full-arm predicate. Bounded and re-verified before
rewording: `assemble_packet` and both `REDUCED_*` constants have zero hits in
this branch's diff and `test_doxbench_packet.py` is unmodified, so the ASSEMBLY
claim stands as written -- one predicate moved, and it moved to keep the
three-gates-one-rule claim true rather than as a carve-out.

N-2: the type-gate parametrization mapped every non-reduced stem to
`(FULL, _REASON)`, so four parameterisations constructed TWO distinct packets
and the test reported per-stem coverage it did not provide -- the blank stem,
the exact instance the type used to accept, was never constructed there. Now a
per-stem table. The null stem asserts ACCEPTED against a stated representational
limit: a Python attribute has no key/value distinction, so `reduced_reason=None`
IS absence and the wire instance has no counterpart; the shape and the delegated
validator refuse it and are pinned doing so, and
`...agree_on_PRESENCE` is the faithful pin for the type.

A companion test requires every stem to have its OWN instance -- and it earned
itself on its first run, catching that `-reason-on-full` is a suffix of both new
stems, so the table is keyed on whole stems.

No contract byte moves.

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

* 10.7: re-measure 13.8 at the v1.40 re-cut (origin/main 1f45e42)

3940 passed / 15 skipped; doc-health 704 and openspec 66 both move because
#259's tests and its still-active change packet came in with the merge. Counted
fresh, not carried forward.

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

* Bot round 2 on the re-cut: three findings, all real, all from the renumber

Copilot and Codex INDEPENDENTLY caught the same miss, and it is the useful one.

1+2. styles.css:1881 still said contract-v1.39. A genuine miss: the file was not
in the renumber list, AND my own post-renumber audit could not have caught it --
the grep was scoped `--include="*.py" --include="*.md" --include="*.yaml"
--include="*.js"` with no `*.css`, so the one file that needed it was the one
class the audit was blind to. Re-swept with a content-only grep across ALL file
types: styles.css was the only hit, and it is now v1.40.

3. Codex, tasks.md:1085 -- the blanket renumber rewrote a HISTORICAL record into
a false one. That paragraph describes the allocation at branch base 6614061,
where the next available number was v1.39 and this cut took it; renumbering it
made it claim v1.40 "was available" there, which was never true. The CHANGELOG's
re-cut narrative had preserved the sequence correctly and the tick had not. The
paragraph now tells the sequence -- allocated v1.39 at the base, lost it to
PR #259 at landing, re-cut to v1.40 -- and says in as many words that an earlier
version of itself was the false one, rather than quietly correcting it. Swept
for siblings; this was the only historical claim the renumber corrupted.

4. Copilot, the credential-leak negative's header: "bounded at 500 bytes" is the
byte-vs-code-point confusion this release explicitly fixed elsewhere. Now
"`maxLength: 500` (code points, not bytes)".

No contract byte moves: none of the three touches contracts/, the schema digest
is unchanged at d8ee5624..., and the validator holds at 0 errors / 4 warnings
with 41 valid + 68 negative examples.

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

* Codex round 3: the same corrupted-history defect, in the pin comment

Codex found a SIBLING of its own previous finding: doxbench_contracts.py's pin
history carried the same mechanically renumbered historical claim -- "v1.40 WAS
AVAILABLE WHEN THIS SLICE ALLOCATED IT ... at the branch base (6614061)" --
which was never true. v1.39 was available there and this slice allocated it;
v1.40 came only after PR #259 took v1.39.

My previous sweep was scoped to tasks.md and the CHANGELOG. That is twice now
that a scoped sweep has been the thing that missed: first a grep with no *.css,
now a sweep of two files when the claim lives in four. The sweep is now
content-based across EVERY file for the historical phrases (branch base, was
available, next available, mid-flight, and each merge sha), and it finds only
the corrected paragraphs.

Fixed here:
* the pin history now tells the sequence -- allocated v1.39 at the base, lost it
  to #259 at landing, re-cut to v1.40 -- and says outright that a blanket
  renumber had left the false claim, rather than quietly restating the number;
* proposal.md's `contract_release:` frontmatter said only 11.7 had to move a
  number in flight. TWO of the four did: v1.37 -> v1.38 (#235) and v1.39 ->
  v1.40 (#259). Both re-cuts are the availability test working as written.

No contract byte moves; schema digest unchanged at d8ee5624...

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

* Codex round 4: a restored posture must not outlive the answer it describes

A NEW finding and a real one. `restoreChatState` drops malformed turns WHOLE
(P3-6(a)/(b)), so a perfectly valid stored `context_packet` can arrive with no
answer to describe. Three cases reproduced before fixing:

  empty transcript + valid posture      -> note rendered for NO answer
  assistant turn filtered, human kept   -> same
  NEWEST assistant turn dropped         -> the note captioned the OLDER answer
                                           with the NEWER answer's posture

The third is the wrong-answer caption this invariant exists to prevent, arriving
by a THIRD route after the failed follow-up (S4) and the cross-restore (NEW-1).

Fixed at the invariant rather than per-case: the posture is adopted only when
the restored transcript ENDS with an assistant turn, because that is the answer
a posture would be describing. A transcript ending in a human turn has no answer
on screen -- including the ordinary case of a tile closed mid-question. The
honest case still adopts, and the probe asserts that too, so this is a condition
and not a blanket refusal.

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

* Codex round 5: a reduction reason must be a STRING, not merely truthy

Reproduced, and worse than reported. `if not reason:` accepted any truthy value
and `str(reason)` then MANUFACTURED a reason from it:

  123          -> "123"
  ["a","b"]    -> "['a', 'b']"
  {"why": "x"} -> "{'why': 'x'}"
  object()     -> "<object object at 0x71c078978c90>"

A heap address, in a durable record, on the degraded path. Same
silent-normalisation class as the presence findings: malformed collaborator
output turned into a conformant-LOOKING posture instead of a refusal.

Fixed at BOTH gates, as the presence rule was -- the derivation and
`ContextPacket.__post_init__` -- because the released shape says
`type: string` and a truthy non-string is not a reason. The reason is now
carried VERBATIM rather than coerced: `str(reason)` is gone from the return and
from the ceiling measurement.

NOT restated in the delegated validator, deliberately and consistently: that
gate restates the PAIRING and nothing the shape already expresses, exactly as it
restates neither the posture enum nor the object's closure. A type constraint is
the same category. The browser adopter already required `typeof === "string"`.

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

* Codex round 6: the released ceiling on the reading side, and a guard that could not see its own case

TWO findings, both reproduced, both real -- and one of them breaks a guard this
branch added two rounds ago.

F1 -- THE ADOPTER HAD NO CEILING. This was recorded in the tick as a named
follow-up, deliberately deferred, on the grounds that the blob is browser-local
and self-tamper only. That rationale covered the wrong half of the surface: the
same adopter also reads the WIRE, the dispatcher validates only `ok` and `kind`,
so a malformed transport's oversized reason reaches browser state, the live
region and from there the persisted snapshot. Reproduced at 5,000 code points.
The bound is now in, pinned to the released `maxLength` by its own test, with a
reason exactly AT the ceiling still adopting. The tick records this as a
REVERSAL of its own deferral rather than quietly doing it.

F2 -- MY ROUND-4 GUARD COULD NOT SEE ITS OWN CASE. It tested the FILTERED
transcript's tail, which cannot distinguish the original terminal answer from an
earlier retained one: `[human, assistant "older", assistant(malformed)]` filters
to a tail that IS an assistant turn, so the guard passed and captioned the older
answer with the newer answer's posture -- exactly the defect it was added to
prevent, one layer in. Reproduced.

The test is now THE SNAPSHOT'S OWN TERMINAL ROW: adoption asks whether the
answer the posture BELONGS TO survived, using the same well-formedness predicate
the transcript filter uses so the two cannot disagree about what "survived"
means.

THREE restatements of one ceiling now exist (schema, serve, browser) and each
pair has a pinning test, so they cannot drift into three ceilings.

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

* Codex round 7: count the reading-side ceiling in CODE POINTS, not UTF-16 units

Correct, subtle, and the same mistake this release argued against on the server
side -- arriving on the browser side in the other unit.

JavaScript's `String.length` counts UTF-16 code UNITS; JSON Schema's `maxLength`
counts CODE POINTS. Reproduced: a conformant reason of 300 emoji is 300 code
points and `.length === 600`, so the ceiling added one round ago DISCARDED a
record the released contract accepts -- hiding the very disclosure this release
exists to show. `[...reason].length` iterates code points.

This is precisely the reasoning the S2 fix used to reject a BYTE-counting guard
on the server ("a byte-counting guard would refuse a conformant 1,500-byte CJK
reason"); the unit discipline was right there and the browser side got it wrong
anyway, which is worth recording rather than just fixing.

Pinned: 300 code points / 600 UTF-16 units, adopted.

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

* Fix the broken escape my own round-7 test commit introduced

`\u{1F600}` inside the Python-hosted JS harness string is an invalid Python
unicode escape (`\u` wants exactly four hex digits), so the previous commit
left test_doxbench_chat_view.py failing to COLLECT -- caught immediately by the
targeted run, but it was committed broken. `String.fromCodePoint(0x1F600)`
needs no backslash and says the same thing.

Recorded rather than amended away: a commit that cannot be collected is worse
than the defect it was fixing, and the reason it happened is that I ran the
tests AFTER committing rather than before.

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

* Codex round 8: drop the stale byte-guard claim from the tick

The tick's shape description still said the producer's guard "shadows [the code
point bound] with the stricter UTF-8 byte count". That was true of a draft and
is not true of the code: `serve.doxbench_context_packet` counts `len(reason)`
(code points) and the browser adopter counts `[...reason].length`, both pinned
to the released bound; the BYTE count applies only to the shipped `REDUCED_*`
constants, in a test, as a rule about text this repository authors.

The same task already called that claim false 90 lines further down, so the
change packet was contradicting both the implementation AND its own correction.
Now it describes the runtime code-point guard and the separate constants test as
two different things.

The two remaining "500-byte ceiling" mentions are contract-v1.38's, about
`data_handling`, and are not this release's to restate.

No contract byte moves.

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

---------

Co-authored-by: brettheap <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
@brettheap
brettheap deleted the change/opensoft-level-install-repo-names branch September 4, 2026 19:25
brettheap added a commit that referenced this pull request Sep 6, 2026
…bytes (#710)

Lane: openxfactory-1 (openXfactory-1)

Origin block restored byte-for-byte to the ratifying commit 1570ff7; post-ratification text (e11a057 (PR #242 rename sweep)) preserved in a dated note in the packet. Explicit disposition: Brett Heap's word 'restore all four, land them when green' (2026-09-05). Gate: ORIGIN RETAINED. Refs #709.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01H9aKd8YF3ktcLmVJJxQYKv
brettheap added a commit that referenced this pull request Sep 6, 2026
…712)

Lane: openxfactory-1 (openXfactory-1)

Origin block restored byte-for-byte to the ratifying commit 1570ff7; post-ratification text (e11a057 (PR #242 rename sweep)) preserved in a dated note in the packet. Explicit disposition: Brett Heap's word 'restore all four, land them when green' (2026-09-05). Gate: ORIGIN RETAINED. Refs #709.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01H9aKd8YF3ktcLmVJJxQYKv
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