Repository navigation
The broker mints and doxBench calls, so the provider boundary narrows to one module - #392
Conversation
… to one module doxBench had a model seam and no model: `doxbench_model.py` said so outright, and every model-backed affordance refused `model_capability_unavailable` unconditionally. `add-model-provider-broker` is ratified (Brett, in-session, 2026-08-26, recorded in the proposal's `Ratified:` line under the `sanction-ratified-record-spelling` record-citing form) and this is its build. WHAT LANDS * `doxbench_binding.py` — the `model-provider-binding` record and its store. Five fields and the ABSENCE of a sixth: a frozen, slotted dataclass, so a secret is not optional but unrepresentable — an extra keyword is a `TypeError` at construction and an extra attribute is refused at assignment. The argv template is DECLARED and carries a closed placeholder vocabulary drawn from the binding's own fields, so no substitution can smuggle a value the record does not disclose. YAML is imported lazily because the lean hosted image has no PyYAML and both entrypoints now read this store at startup. * `doxbench_provider.py` — the ONE module permitted to hold a provider endpoint, a provider SDK or a minted token, declaring its own name so the boundary test cannot drift from it. The credential hand-off takes an OPEN HANDLE and never a value, streaming it handle-to-pipe; the minted token lives in memory behind a redacting `__repr__`; every refusal is one of nine FIXED sentences a `BrokerRefused` cannot be constructed outside of, so a broker's stderr and a provider's error body are dropped unread. * The `model-binding` CLI verb group (list / add / edit / remove / set-credential) — the operator door. A CLI verb rather than a browser pane, stated as a limitation in tasks.md 1.2: a credential typed at a terminal crosses no HTTP wire, so "no credential reaches the browser" is structural. * `declared_model_port_factory`, resolved by both entrypoints: a checkout declaring a binding gets the brokered port, a checkout declaring none gets exactly the harness construction it always got, and a bindings document that will not read falls back and says so on stderr. * Brett's 2026-08-26 expiry ruling, in `BrokeredProviderPort.dispatch`: discard-on-expiry unconditionally, and on the race a re-mint plus ONE paid retry, recorded in the port's content-free ledger and printed as a fixed notice. A second expiry inside one turn refuses; no third call is bought. THE BOUNDARY NARROWS RATHER THAN DISAPPEARING `test_provider_boundary.py` sweeps the WHOLE package in two tiers with one named exemption, which is a wider net than the eleven per-module scans it narrows — those named one file each, so a new module inherited no check at all. Every one of those scans is untouched and still passes, and this file pins them by name so the narrowing cannot be achieved by deleting the guard it narrows. The views clause stays absolute. THE TICK AUDIT All eleven tasks 1.1-3.3 were re-verified against the code and the test that discharges each; every note matches what exists and nothing was unticked. One gap was found and finished here rather than left: task 1.2's CLI verbs were covered only at the store, so `test_the_cli_verbs_list_add_edit_and_remove_a_binding` now drives all four through the real parser. 0.2 IS DISCHARGED, AND A RECONCILIATION SLICE IS OWED openProfiler PR #18 merged 2026-08-26 (`docs/broker-cli.md`, openProfiler main `d0538c31`), so task 0.2 is ticked: `intake`/`mint`/`revoke`/`list` implemented for `api_key`, `authorize`/oauth DECLARED-DESIGN, `--retry-of <audit_ref>` for the re-mint rule, secrets on stdin only, one JSON object on stdout with the exit code authoritative. A minted token is PROVIDER-NATIVE in both kinds; on the `api_key` path it is the stored key verbatim and `expires_at` is broker bookkeeping the consumer is bound to honour. The tick records that a surface now EXISTS to consume, not that this seam consumes it. Cross-checking found six incompatibilities — operation framing, an enrolment stdin the request line corrupts, a mint answer carrying neither `endpoint` nor `dialect`, the `reference` / `credential_ref` key, an unpassed `--retry-of`, and a broken pipe reported as an unstartable broker — all recorded in 0.2's body. None is fixed here: closing them changes the binding's SHAPE and the adapter's parsing of a document it does not own, which is a second slice rather than a correction to this one. Until it lands, this seam mints against the contract it declares in `doxbench_provider` and against no broker that exists, which is why every test drives a broker child this repository writes. Suite: tests/ideation-dashboard green; openspec validate --all --strict 78/78; doc-health --single-repo byte-identical to the base commit's report. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
Pull request overview
This PR implements the “add-model-provider-broker” slice for the ideation dashboard: it adds a broker-backed model-provider binding/store plus a single provider-client module, and rewires the entrypoints to resolve either the existing harness bridge (unconfigured) or the brokered provider port (configured), while enforcing a narrowed “provider boundary” across the package.
Changes:
- Add a binding record + YAML-backed store and CLI surface for managing model-provider bindings and handing credentials to a broker via stdin.
- Introduce
doxbench_provideras the only module allowed to hold provider transport concerns (endpoint/token/SDK), with a package-wide structural boundary sweep test. - Wire
serve.pyandcli.cmd_generate_and_opento use a newdeclared_model_port_factory()that resolves brokered vs harness ports without changing the unconfigured posture.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ideation-dashboard/test_provider_boundary.py | New package-wide structural sweep enforcing the narrowed provider boundary (plus absolute “views clause”). |
| tests/ideation-dashboard/test_model_provider_broker.py | End-to-end tests for binding/store/CLI, broker hand-off & minting, expiry retry rule, and refusal mapping. |
| scripts/ideation_dashboard/serve.py | Switch entrypoint wiring to declared_model_port_factory(...) and document the new resolution behavior. |
| scripts/ideation_dashboard/doxbench_provider.py | New broker runner + token minting + provider transport + expiry retry/ledger logic behind the model seam. |
| scripts/ideation_dashboard/doxbench_install.py | Add brokered catalog + brokered port factory + declared_model_port_factory() resolver. |
| scripts/ideation_dashboard/doxbench_binding.py | New binding dataclass, placeholder substitution, and YAML binding store with disclosure/read-back semantics. |
| scripts/ideation_dashboard/cli.py | Add model-binding verb group (list/add/edit/remove/set-credential) and wire entrypoint to declared resolver. |
| README.md | Update OpenSpec index entry to reflect ratification/build and note reconciliation slice owed. |
| openspec/changes/add-model-provider-broker/tasks.md | Update task ticks with detailed audit narrative and cross-check notes. |
| openspec/changes/add-model-provider-broker/proposal.md | Mark proposal ratified and record the 0.3 expiry ruling decision and 0.2 answer notes. |
Suppressed comments (1)
scripts/ideation_dashboard/doxbench_binding.py:422
BindingStore._save()also does a bareimport yaml, so on environments without PyYAML the CLI verbs will crash with an uncaughtModuleNotFoundErrorinstead of refusing cleanly. If the intent is “stdlib at import time, YAML only when needed”, it’s still better to surface missing PyYAML asBindingRefusedso the operator sees a controlled error message and a non-zero exit code.
import yaml
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| with opener(request, timeout=timeout) as response: | ||
| payload = response.read() |
| retry VISIBLY RECORDED in the turn record; a SECOND expiry within the | ||
| same turn surfaces the standard refusal. Silently retrying a paid call |
| # install with no bindings document answers here and never needs a | ||
| # YAML parser at all. | ||
| return [] | ||
| import yaml |
… and its trail carries the retry Task 2.6, and the six findings 0.2 recorded against the merged declaration (`opensoft/openProfiler`, `docs/broker-cli.md`, main `d0538c31`) are closed rather than restated. The findings stay verbatim as the record of what was reconciled. The operation is the declared argv SUBCOMMAND, not a request document this repository invented: `broker_operation_argv` appends the subcommand and its declared flags to the binding's own base `broker_argv`, and expresses all four of `intake`/`mint`/`revoke`/`list`. The binding still names the program and no command path appears in code; what moved is the verb vocabulary, which was never the operator's to respell. `intake` now receives the credential and nothing else, because the declaration reads standard input to EOF and treats all of it as the secret. The mint answer is parsed for exactly the seventeen fields it declares, under its own kind, and the intake answer for `reference`. The mid-turn re-mint passes `--retry-of <audit_ref>`, so the broker's own trail shows one turn that needed two tokens instead of two unrelated issuances; a discard-on-expiry deliberately passes nothing, because a token that bought no call replaced no issuance. A broken pipe on the credential write is the refusal arriving and is read as one. The endpoint and the dialect moved to the BINDING, which is where the declaration's silence puts them: the broker is provider-agnostic about the request grammar and will not name an endpoint it would then be accountable for. Both are validated at declaration, so an unknown grammar and a schemeless endpoint are refused when an operator declares a binding rather than on a paid call — which is why the fixed-diagnostic set is eight sentences now and not nine. The binding carries nine fields and still no secret field. The lane's fake broker was rewritten to speak the declared contract, so it can no longer agree with the adapter about a protocol nobody implements, and `test_openprofiler_broker_e2e.py` drives the REAL binary through intake, mint, a mid-turn 401, a `--retry-of` re-mint read back out of the broker's own `broker-audit.jsonl`, an aged clock, list and revoke — greping the custody root throughout, where the sentinel lives in exactly one file while it is held and in none once it is revoked. It skips with a stated reason when the binary is absent, which is every CI run and no local one. The four review notes on #392 are answered. The answer parser enforces the exactness its docstring already claimed, for all four kinds, with the cost stated where a reader will meet it. The provider read is bounded by the server's own declared output ceiling rather than a second number, one byte over so the bound itself is still honoured. `BindingStore` raises its own refusal when PyYAML is missing instead of a `ModuleNotFoundError` the entrypoint does not catch, which is what makes the hosted fallback hold for an install that had ever written a binding. And 2.4 now says exactly where "visibly recorded" lands — the ledger, stderr, and the broker's trail — because the browser's turn record is a released, digest-pinned, closed envelope and a fact on it is a contract release this change cannot pay for; that half is now a named task on the change that owns the surface, `add-doxchat-model-intake` 3.6. Co-Authored-By: Claude Fable 5 <[email protected]>
| request = urllib.request.Request( # noqa: S310 - endpoint declared by the broker's mint answer | ||
| token.endpoint, data=body, method="POST") | ||
| request.add_header("Content-Type", "application/json") | ||
| request.add_header("Authorization", f"Bearer {token.token}") |
| DECLARED-DESIGN. Cross-checking this seam against that declaration found | ||
| SIX incompatibilities (operation framing, the enrolment stdin, a mint | ||
| answer carrying neither `endpoint` nor `dialect`, the reference key, an | ||
| unpassed `--retry-of`, and EPIPE handling); they are recorded in 0.2's body | ||
| and A RECONCILIATION SLICE IS OWED before a binding can name the real | ||
| broker. |
…bility landed, and the README no longer owes a slice it has The Authorization-header note is not taken: the code sends Bearer plus the minted token; the review read GitHub's secret-redacted rendering of the diff. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Review disposition on the |
…-broker-build # Conflicts: # openspec/changes/add-doxchat-model-intake/tasks.md
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
scripts/ideation_dashboard/doxbench_provider.py:651
- The
# noqa: S310justification says the endpoint comes from “the broker's mint answer”, but this request usestoken.endpoint, which is sourced from the operator binding (ModelProviderBinding.endpoint). Updating this comment avoids misleading future security reviews/audits.
request = urllib.request.Request( # noqa: S310 - endpoint declared by the broker's mint answer
token.endpoint, data=body, method="POST")
scripts/ideation_dashboard/doxbench_binding.py:503
BindingStore._load()only wrapsyaml.YAMLError. If the bindings file exists but is unreadable at the filesystem level (permissions, transient IO error, etc),read_text()will raiseOSErrorand bypass the intendedBindingRefused/fallback path indeclared_model_port_factory(), potentially crashing the entrypoint instead of degrading to the harness posture.
try:
document = yaml.safe_load(self.path.read_text(encoding="utf-8"))
except yaml.YAMLError as error:
raise BindingRefused(
f"the bindings document at {self.path} is not readable YAML"
scripts/ideation_dashboard/doxbench_binding.py:544
BindingStore._save()can raiseOSErrorfrommkdir()/write_text()(permissions, read-only checkout, full disk, etc). Right now that would escape as a raw IO error from CLI verbs, rather than the module’s single refusal type (BindingRefused). Wrapping the write inBindingRefusedkeeps the surface consistent and makes failures easier to handle upstream.
self.path.parent.mkdir(parents=True, exist_ok=True)
self.path.write_text(
yaml.safe_dump(document, sort_keys=False, allow_unicode=True),
encoding="utf-8")
| with self._lock: | ||
| held = self._token | ||
| if held is not None and not held.expired(self._clock()): | ||
| return held | ||
| self._token = None | ||
| try: | ||
| minted = mint(self._binding, retry_of=retry_of, | ||
| runner=self._runner) | ||
| except BrokerRefused: | ||
| self._mintable = False | ||
| raise | ||
| self._mintable = True | ||
| self._token = minted | ||
| self._record(reason, audit_ref=minted.audit_ref) | ||
| return minted |
| list(argv), | ||
| stdin=subprocess.PIPE, | ||
| stdout=subprocess.PIPE, | ||
| stderr=subprocess.PIPE, |
| request = urllib.request.Request( # noqa: S310 - endpoint declared by the broker's mint answer | ||
| token.endpoint, data=body, method="POST") |
| def test_the_generic_http_client_has_exactly_two_named_holders(): | ||
| """`urllib.request` / `Authorization` / `Bearer ` are HTTP-client facts, not | ||
| provider facts, so the second holder is named rather than swept away.""" | ||
| permitted = {PROVIDER_CLIENT_MODULE, SNAPSHOT_SOURCE_MODULE} | ||
| offenders: list[str] = [] | ||
| for module in _package_modules(): |
…tor, the S310 note names the binding, and exactly-two-holders asserts both halves The other two notes stand dispositioned: the 0.3 line is the verbatim ruling record with its realization note beneath it, and the Authorization header sends the minted bearer token — the review read a redacted diff rendering. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.
Suppressed comments (3)
Previously missed (2) — in code that hasn't changed since the last review.
scripts/ideation_dashboard/doxbench_binding.py:371
_substitute()performs placeholder substitution via repeatedstr.replace()over the whole output string. If any substituted value contains a later placeholder pattern (e.g., a label containing{dialect}), it can be substituted unintentionally, altering the declared argv in ways the operator did not write. Substitution should be a single pass over the original template placeholders only (e.g., scan for{name}and replace withvalues[name]).
def _substitute(member: str, values: Mapping[str, str]) -> str:
out = member
for name in ARGV_PLACEHOLDERS:
out = out.replace("{" + name + "}", values[name])
return out
scripts/ideation_dashboard/doxbench_provider.py:397
subprocess_broker_runner()spawns the broker withtext=Truebut does not set an explicit encoding. That makes decoding of the broker's JSON output locale-dependent, while later size checks assume UTF-8 (answer.encode('utf-8')). Setencoding='utf-8'onPopenso the JSON contract is deterministic across environments.
child = subprocess.Popen( # noqa: S603 - argv from a declared binding plus the declared subcommand, never a shell string
list(argv),
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL,
env=bridge_mod.child_environment(os.environ),
text=True,
)
scripts/ideation_dashboard/doxbench_provider.py:889
_current_token()setsself._token = mintedand releases_lockbefore recording the mint event. WithThreadingHTTPServer, another request can observe and use the new token before the mint is appended toledger, briefly violating the “visibly recorded” property and making ledger ordering racey. Record the mint while still holding_lock(and avoid calling_record()inside the lock, since it also locks).
self._mintable = True
self._token = minted
self._record(reason, audit_ref=minted.audit_ref)
return minted
What this is
The build of
add-model-provider-broker, ratified in-session by Brett on2026-08-26. doxBench has had a model seam and no model since it was written;
this gives it one, and does it by applying a contract this repository already
owns (
credential-contracts: a consumer holds a binding and never a secret)rather than inventing a new boundary.
Do not merge without a human read of the boundary change. The single most
consequential line in the proposal is that the "no provider is ever contacted
from this repository" invariant MOVES. It narrows; it does not disappear.
Ratification and the 0.3 ruling, recorded
proposal.mdcarriesStatus: ratifiedplus the record-citingRatified:line sanctioned by
sanction-ratified-record-spellingfor the case where noapproving OpenSpec change exists to name — approver and date, in-session.
dashboard re-mints and retries ONCE, and the re-mint plus the paid retry are
visibly recorded; a second expiry in the same turn refuses. A second paid
call the human cannot see was the decision that question was raised to
avoid, and the ruling answers it by making the retry visible rather than by
forbidding it.
(
docs/broker-cli.md, openProfiler maind0538c31). The tick recorded thata surface existed to consume; task 2.6 now records that the seam consumes
it — all six cross-check findings reconciled, and proven against the real
openprofiler-brokerbinary. See Reconciliation + review responses below.The tick audit
The previous builder ticked every task while still writing, so all eleven of
1.1-3.3 were re-verified against the code and the test that discharges each,
with each task's own note read against what actually exists.
copyfileobjto the child's pipe, real broker child, whole-checkout grep for the sentinelMintedToken; theendpoint/dialectveto flag is discharged by 2.6 (both moved to the binding)PROVIDER_CLIENT_MODULEself-declared, and the boundary test reads that constant--retry-ofmodel_port_factoryBrokerRefusedcannot be constructed outside the fixed sentences (eight since 2.6 — the dialect refusal moved earlier, to declaration time); the broker and provider failure modes are exercised;model_failedstays distinct frommodel_capability_unavailableserve.py's diff touches only the factory lineNothing was unticked. The one gap found (1.2's CLI verbs) was small and clean,
so it was finished rather than reported.
The narrowed boundary
The old claim was carried by ELEVEN per-module source scans, each naming one
file — so a new module under
scripts/ideation_dashboard/inherited no checkat all, which is exactly the gap a change introducing a provider client must
close. All eleven are untouched and still pass, and
test_provider_boundary.pypins them by name so the narrowing cannot beachieved by deleting the guard it narrows. The new sweep runs over the whole
package in two tiers: the provider tier (SDKs, provider hosts, this
repository's own minted-token type) is exempt for one module only; the generic
HTTP-client tier has a second NAMED holder,
snapshot_registry.py, fenced bya positive assertion that it holds nothing from the provider tier. The views
clause is absolute — no browser module is exempt from anything.
openProfiler contract cross-check
Checked against
opensoft/openProfilerdocs/broker-cli.mdat maind0538c31(PR #18, merged 2026-08-26):intake/mint/revoke/listimplemented for
api_key,authorize/oauth DECLARED-DESIGN,--retry-of <audit_ref>for the re-mint rule, secrets on stdin only, one JSON object onstdout with the exit code authoritative. The declaration answers
open question 1 in full: a minted token is provider-native in both kinds; on
the
api_keypath the token IS the stored key andexpires_atis brokerbookkeeping the consumer honours; the whole
oauthpath is DECLARED-DESIGNand refuses with exit 5.
Already compatible: exit-code discipline, one JSON object on stdout with the
error object on a stderr this adapter drops unread, argv-never-a-shell-string,
a placeholder vocabulary that cannot name a secret, the declared timeout, the
bounded answer, the scrubbed child environment, ISO-8601
Zparsing, andhonouring
expires_atas binding.Six findings, recorded in tasks.md 0.2's body and deliberately NOT fixed:
line on stdin; the declaration names it as an argv subcommand and reads no
request document. One
broker_argvcannot express the declaration's four.intakereads stdin to EOF as thesecret, so the request line would be prepended to the credential.
MINT_FIELDSrequiresendpointanddialect;the declaration carries neither, deliberately. Every real mint would refuse
as malformed. Task 2.1 flagged exactly this for veto pending 0.2, and the
declaration has now answered: both facts belong on the binding.
referencevscredential_refon the intake answer.--retry-ofis not passed — the declaration carries it for preciselythe 0.3 ruling; this seam never reads
audit_refand has no placeholder tocarry one, so the broker-side correlation is absent.
a consumer to treat
EPIPEas "read the refusal". Nothing leaks eitherway; the distinction is lost.
All six are now reconciled — see Reconciliation + review responses
below. They were deliberately not fixed in the first commit because closing
them changes the binding's SHAPE and the adapter's parsing of a document this
repository does not own, which is a second slice and not a correction to the
first; that slice is task 2.6, and it is the second commit on this branch. The
findings are kept verbatim in tasks.md 0.2 as the record of what was
reconciled.
Stated limitations, not hidden
built (tasks.md 1.2).
stderr, and (since 2.6) the broker's own
broker-audit.jsonl, correlatedby
--retry-of— but not in the browser's turn record. That was measuredrather than assumed: the v1 and v2 success envelopes are released schemas,
digest-pinned in
contracts/manifest.yaml,additionalProperties: false,and self-validated by the route before an envelope is stored or sent, and
dispatch_turncloses the port's answer shape a second time. A wire fact isa contract release, and this change declares
target_release: none. The gapis now a NAMED task on the change that owns that surface —
add-doxchat-model-intake3.6 — rather than prose (tasks.md 2.4).and a selection rule is not invented here (tasks.md 2.5).
contracts/, and that is a decision: a schema thereis a release act, this change declares
target_release: none, and therecord has one producer and one consumer inside this repository. Flagged for
veto (tasks.md 1.1).
Reconciliation + review responses
Second commit on this branch. Two things happened here: the seam was
reconciled with openProfiler's declared surface and measured against the real
binary, and the four Copilot notes were answered.
Reconciled against the declaration (task 2.6)
Built
openprofiler-brokerfrom openProfiler maind0538c31(
cargo build -p opensoft-open-profiler-broker --release;--version→0.1.4) and readdocs/broker-cli.mdin full. Per finding:model-provider-broker-requeststdindocument is gone.
broker_operation_argv(binding, operation, retry_of=…)appends the declared SUBCOMMAND and its declared flags to the binding's own
base
broker_argv, and expresses all four operations. The binding staysdeclaration-consuming — it names the program and its fixed leading arguments
and no command path appears in code — while the subcommand/flag vocabulary,
which is the declaration, is recorded in the adapter with a
§-levelcitation on every constant. Four argv templates in an operator's settings
file is four ways to get somebody else's contract subtly wrong.
intakenow receives the credential and nothingelse; every fact the operation needs rides a declared flag. Asserted by
reading what the broker child actually received.
MINT_FIELDSis the declaration's own seventeenunder
kind: openprofiler_broker_mint, and the demand forendpoint/dialectis dropped. Both facts moved to the BINDING withvalidation where they are declared: an unknown dialect and a schemeless
endpoint are refused when an operator declares the binding, earlier than a
mint and far earlier than a paid call. 2.1's veto flag is discharged, and
the proposal's Q1 paragraph and the spec delta both record the resolution.
referencevscredential_ref— the intake answer is read forreference, the declaration's own field name.--retry-of— the mid-turn re-mint passes--retry-of <audit_ref>,read from the mint answer and carried in per-turn state. Discard-on-expiry
deliberately passes nothing: a token that bought no call replaced no
issuance, and claiming otherwise would put a retry in the broker's record
that never happened.
It is swallowed and the answer taken from the exit code and the child's own
output, so an
--auth-kind oauthintake reads as "the broker refused" andnot as "the broker could not be started". A program that genuinely cannot be
started keeps the other sentence.
The lane's fake broker was rewritten to speak the declared contract, so it
can no longer agree with the adapter about a protocol nobody implements.
Proven against the real binary
tests/ideation-dashboard/test_openprofiler_broker_e2e.py— 3 tests, passinglocally against the real program. It skips cleanly when the binary is
absent (CI has no Rust toolchain and no reason to grow one), with a reason
naming the build command and both ways to point at one; nothing in it is
softened.
emits — which is what makes the exact parse defensible rather than a
transcription taken on trust, and confirms the mint answer names no route;
--auth-kind oauthintake with a 4 MB credential (enough to overflow thepipe buffer) asserts the EPIPE classification against the real refusal;
verbatim,
expires_at≈ 300 s and honoured either side of the instant,audit_refcaptured) → a mid-turn 401 → re-mint with--retry-of→ readthe broker's own
broker-audit.jsonland assert the third mint record'sretry_ofis the first mint'saudit_ref→ age the clock past thebroker's declared expiry and prove discard-on-expiry mints afresh and
correlates nothing → list → revoke.
custody/<reference>.jsonwhile it is held — never the index, never theaudit trail — and nowhere at all once it is revoked, while the trail
survives the revocation carrying no token material.
No environment widening was needed to reach a real broker:
HOMEandPATHwere already the scrubbed allowlist, and
HOMEis how the broker's defaultcustody root resolves. Asserted, because a seam that needed a new inherited
variable would have been a finding of its own.
The four review notes
_answer_documentexactness — enforced, not reworded. The docstringclaimed "the required keys, exactly" and the code tolerated any others; the
key set is now compared exactly, for all four answer kinds. The cost is
stated in the docstring rather than hidden: a future broker that adds a field
without moving
schema_versionrefuses here instead of being tolerated,which is the right way round for a document carrying a credential. The e2e
test above is what keeps the enumerated set honest.
response.read()— bounded, reusing the existingdoxbench_model.SERVER_MAX_OUTPUT_LIMIT_BYTESrather than declaring a secondnumber. One byte over the bound is read deliberately so an answer at the
bound is still honoured while one past it is detected rather than truncated
into a shorter document that would parse; overflow maps onto the existing
fixed
DIAG_PROVIDER_MALFORMED. Both directions tested.corrected and the gap named, because the implementation genuinely cannot
honour the ruling's last clause without a contract release. Measured first:
workbench-chat-turn-successand its v2 successor are released,digest-pinned,
additionalProperties: falseand self-validated by the routebefore an envelope is stored or sent, and
dispatch_turnrefuses anydispatch result whose key set is not exactly
{assistant_prose, proposals}.Two closed shapes, one of them released; this change declares
target_release: none. So 2.4 now says exactly where the fact lands (ledger,stderr, and the broker's audit trail — which is more than it recorded
before), and the browser half is a named task on the change that owns the
turn-record surface and carries a
target_releasethat can pay for a schemaact:
add-doxchat-model-intake3.6, with the shape it should take and anamendment-record line saying who handed it over and why.
BindingStore._load's bareimport yaml— aModuleNotFoundErroris now a
BindingRefused(_yaml_or_refused, used by_savetoo), which isthe class
declared_model_port_factorycatches. Tested end-to-end ratherthan at the exception: with the parser poisoned and a real bindings
document present, the entrypoint still resolves the harness declaration and
says so on stderr. Before this, a hosted image that had ever written a
binding would have died at startup.
Verification
tests/ideation-dashboard/— 4533 passed, 28 skipped, 1 deselected in12m04s, exit 0, with the real broker binary on PATH (31 skipped and still
green without it);
test_snapshot.py::test_find_validator_locates_pinned_checkoutdeselected(it fails identically on pristine main in a scratch clone — a location
artifact, not this change's).
OPENSPEC_TELEMETRY=0 openspec validate --all --strict— 78 passed, 0 failed.python3 scripts/doc-health.py --single-repo .— byte-identical to both thebase clone's and this branch's first commit's report once the clone name is
normalized (5 critical, 6 error, 41 warning, 4 info in all three). Zero new
findings.
openprofiler-brokeron PATH,3 skipped with a stated reason without it. Both paths exercised.
🤖 Generated with Claude Code