Repository navigation
T080, 16.3: the credential stays a reference, and a raw key is refused (plan 034) - #63
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Arc: neutral-product-standalone-operability
Plan 034, phase-3 slice P3-B, task T080. The plan was read at openxFactory
maine369cb25, fromspecs/034-opendox-standalone-operation/tasks.md, and read again atmain2140f5a7and, after T063 landed, atmaina883bbf6(see the box below). The slice is claimed on openxFactory#656, comment5875729625.This was drafted ahead, and T063 has now landed. Brett's phase-3 word, as the holder recorded it (2026-09-28, ~18:00Z), was "Only the independent ones (Recommended)". Every phase-3 task comes after T063, which landed as openxFactory#1218 →
a883bbf6and closes phase 2. T078 landed as #61 →8a98e317and T079 as #62 →2fc714d2, so this PR may go READY. Its READY line is the holder's to post.Important
Dependencies:
After: T079, T007 (batches H and K). Both batches have landed, and so have T063 and T079 (#62).f99a2097: 16.3's addendum for the built-in resolver and the auth kindnone(R1Q17 (b), R1Q18 (a)). This PR carries it out.39f19145: the dated note in requirement 17's body in #1144's spec delta, with a pointer after 16.3's batch H addendum (5916000030, item 1). See Ruled below.main2140f5a7, and again ata883bbf6, where it is unchanged. Plan 034's T080 entry records the loopback rule, batch K and openDox-code#64, and itsAfter:line names both batches. F16.1's block is unchanged.One PR per task, stacked. T078 (#61) and T079 (#62) have landed, and this PR is based on
main. #64, the broker hardening, is based on this branch, so retarget #64 tomainbefore this branch is deleted, because a merge with--delete-branchcloses the PR stacked on it.What changes
A key inside the endpoint URL is refused when the binding is declared. Two checks ask. One is the product's own detector,
runtime/local_git_adapter.carries_a_credential, imported where it is asked, asauthoring.pydoes. The other is a raw key's shape anywhere in the URL, its path and fragment included (the adversarial review's M5, below). Both run before the scheme check, and every refusal of an endpoint is a fixed sentence, the scheme's too (M3), so no refusal repeats the URL. The key's refusal isENDPOINT_CARRIES_A_CREDENTIAL, because the URL it refuses carries the key, and through the console the refusal can reach a browser. A key in an extra field is refused as an unknown key, as it always was.An endpoint longer than the product's URL bound is refused before the detector is asked. The bound is
runtime/config.MAX_REMOTE_URL_CHARS(2048), which the repository act applies to a remote for the same reason: the detector is quadratic in a parameter name's length. It is read when the binding is declared, and its refusal,ENDPOINT_TOO_LONG, repeats nothing of the endpoint.A reference is never a raw key (the adversarial review's M2, below). A reference is held to the same length bound (
CREDENTIAL_REF_TOO_LONG), and then refused if the detector flags it or it has a raw key's shape (CREDENTIAL_REF_IS_A_RAW_KEY). Both sentences are fixed. A reference a broker hands back at intake meets the same rule.Each record now has ONE resolver, and
credential_source()names it:broker_argvcredential_refenv:NAMEorkeyring:SERVICE/USERNAMEnone(R1Q18 (a))The built-in resolver is
doxbench_provider.resolve_credential_reference, insidedoxbench_provider.pyonly.Authorization: Bearer <value>and nowhere else.DIAG_REFERENCE_UNRESOLVED, before any provider is contacted. A keyring that cannot be read refuses withDIAG_KEYRING_UNAVAILABLE. That refusal is raised after the backend's error has been handled, so it has no cause and no context: neither the backend's words nor its frames travel with it.FIXED_DIAGNOSTICSgoes from eight to eleven: these two, andDIAG_PROVIDER_REDIRECTEDbelow.DIAG_PROVIDER_REFUSEDwith no retry. The 2026-08-26 ruling's re-mint is for a minted token, and a second read of a reference names the same value.A credential the built-in resolver reads travels only by a private route:
https://, orhttp://to127.0.0.1,::1orlocalhost. This is Brett's ruling of 2026-09-28, openxFactory#656 comment5880893901, which batch K's note to #1144's requirement 17 records (see Ruled below).doxbench_binding.is_a_private_routeis the one predicate. It matches the endpoint as written, case-blind:https://, orhttp://followed by exactly one ofLOOPBACK_HOSTS(the IPv6 literal bracketed), an optional port, and then/,?,#or the end.http://evil.example\@localhost/,urllib.parsereads the host aslocalhost, while the HTTP client reads the whole authority.ENDPOINT_NOT_PRIVATE, and it comes before any resolution, because no binding exists to resolve.AssertionErrorwith nothing read, as a broker's reference already does.none's, since it presents no credential. The one change this PR makes to the broker path is L4's mapping in the shared transport (below).A request that carries a built-in credential keeps it on that route. This came out of Copilot's later rounds, below.
urllib's default opener re-sends the credential header to anyLocation, whatever its host or scheme. The redirect is declined, and the turn refuses with the fixedDIAG_PROVIDER_REDIRECTED.http://it uses no proxy, because a proxy would carry a loopback request off this host. Anhttps://request may still use one, since a proxy reaches it only by CONNECT and the credential stays inside TLS._PresentedCredential, whose repr says nothing, on both paths. A refusal of such a request is raised with no cause and no context, so no traceback reaches urllib's own frames, whose locals hold the headers.nonejoinsAUTH_KINDSafterapi_keyandoauth, so F16.1'sAUTH_KINDS[0]is unchanged. Its requests carry no authorization header.Around them:
built_in_reference_parts), and reads nothing a reference names. Both forms parse to one shape,BuiltInReference(form, name, user).env:andkeyring:forms are reserved for the built-in resolver. So a broker whose intake answer names a reference in one of them is refused as malformed (DIAG_BROKER_MALFORMED), which both entry points already catch.serve_workbench.py, which is left alone), so there the refusal would have gone uncaught.--auth-kind none, an omitted--credential-ref, and an empty broker invocation.set-credentialrefuses a binding no broker answers, without reading its standard input.broker_operation_argvtreats such a binding as a programming error, since its empty base invocation would run the subcommand as a program.http.client.HTTPExceptionjoins the errors the transport maps. A responsehttp.clientcannot read, or a path it cannot send, lands onDIAG_PROVIDER_UNREACHABLE(the adversarial review's L4, below). The transport is shared, so this changes the broker path's failure too: a broker's turn now lands on that sentence where it escaped before. Raising it afresh there, with no token in a kept frame, is Broker-path credential hardening (follows T080): a minted token keeps a built-in credential's rules (plan 034) #64's (Copilot at44582f8f).keyringpackage that fails as it is imported, with anything other than anImportError, refuses withDIAG_KEYRING_UNAVAILABLE, raised with no context, as a failed read already does (Copilot at82ec9a20).Files:
src/opendox/doxbench_binding.py,src/opendox/doxbench_provider.py,src/opendox/cli_model_binding.pyandtests/test_model_provider_broker.py, all inside P3-B's row. One docstring outside the row,doxbench_intake.auth_kind_disclosure's, now says which kinds the console flow offers (see Review remarks).pyproject.tomlis untouched.Realizes: 16.3. Ruled: R1Q22 (a),
5817152735; R1Q17 (b) and R1Q18 (a),5850003126; and the loopback rule,5880893901, with batch K's note to requirement 17,5916000030, item 1 (see Ruled below).Readings Brett let stand
Brett's word, relayed by the holder on 2026-09-28: the readings below stand.
broker_argvgiven beside a built-in reference is refused. This is the plan's fail-closed reading (analyze round 2, V2-21), which openxFactory#656 comment5851950767records as standing, not overruled. That such a record needs no broker at all follows from R1Q17 (b). One test holds both halves:test_a_built_in_reference_needs_no_broker_and_refuses_one_beside_it.env:plus a portable variable name, andkeyring:SERVICE/USERNAME, split at the last/so a service may contain one;keyringpackage, imported at call time and not declared as a dependency. Without it, a keyring reference refuses with the fixed sentence.pyproject.tomlis outside this slice, and T072 owns itslocalextra, so declaring it is a holder decision;The falsifier: F16.1's three refusals, and tests of the resolver and of
noneThis is F16.1's record block, extracted verbatim from #1144's
tasks.mdat openxFactorye369cb25, and unchanged atmain2140f5a7after batches H and K and atmaina883bbf6after T063 (sha2568af3001b5f5fb885…), with the control record and the three raw keys:At T079's head
b04a3a95it stops withFAIL: a raw key was accepted in ['endpoint']. At this head05cb1c70, as at4948e6dd, the whole block passes:The named tests are in
tests/test_model_provider_broker.py:test_f16_1_a_raw_key_is_refused_in_a_field_and_in_the_url(the block above, as a test) andtest_f16_1_the_first_auth_kind_still_takes_a_credential;runtime/configat declaration;env:and akeyring:reference):https://,127.0.0.1,[::1](IPv6 loopback),localhost,LOCALHOSTand a barehttp://localhost;localhost.evil.com,127.0.0.1.evil.com,localhostonly in the path,127.0.0.2,[0:0:0:0:0:0:0:1],localhost.,localhost%2eevil.com(the HTTP client decodes it) and0.0.0.0;HTTP://to another host andHttp://localhost.evil.comare not private, whilehTTp://127.0.0.1,HTTP://[::1],HTTPS://andhTtPs://are. Also not private: the backslash case, a leading space and another scheme;env:binding overhttp://to another host and stores nothing, while anonebinding to that host is declared. A broker binding and anonebinding keep their route;none: forbids both fields, round-trips, may leave both out, sends no authorization header, spawns no broker (over a real loopback socket too), and refuses a 401 without a retry;env:read at call time and rotated between turns; production readingos.environ; eleven unusable values refused before any request, and every printable ASCII character but the space presented unchanged; a value outside latin-1 refused over a real socket with nothing chained; availability restored after a success; the keyring read per request at the last-/split; an absent entry and three unusable keyring answers; a failing backend (fixed sentence, no cause and no context); thekeyringpackage absent; the production import path; the bearer over a real socket; no trace of the resolved value in answers, notices, the ledger, the port's state or on disk; and the refusal mapping onto the seam's fixedmodel_failed;\wis held to ASCII); a broker's answer in either built-in form refused as malformed, through two real broker scripts;doxbench_provider.pyalone: the record reads no environment and no keyring, andget_passwordandimport keyringappear in no other module of the package;set-credentialrefusing a binding no broker answers.F16.1's other blocks are later tasks'.
tests/test_provider_boundary.pyis T083's, and it passes here: 24 passed. The no-model block is T081's, and it still fails as #1144 records (['omp-local']), untouched here.tests/test_chat_model_configuration.pyis T081's and T082's, and does not exist yet.The repository's own suite
Local runs of the whole suite, as CI runs it (
python -m pytest -q), use a PostgreSQL 16 service fortests_runtimeandLANG=C.UTF-8, as on the runner:main9a490405(T081 landed)05cb1c70Along the way this round,
abbb05d4read 3361,93660ec9(the merge ofmain2fc714d2) 3418,82ec9a203419 and44582f8f3420. Before this round,main047bb4fa, T079'sb04a3a95and this branch's4948e6ddread 3044, 3083 and 3206. Before phase 2 landed, the same three read 2468 (2d116415), 2507 (053e207a) and 2630 (3f14bb96).CI's
validateat this head (run37086697677) readsselected=3486 passed=3475 skipped=11 failures=0 errors=0, against the pins 2476, 2465 and exactly 11.The +213 cases are in
tests/test_model_provider_broker.py: 64 at the first push (e9ef9514, 2571 passed), 16 in the fix commitf92fca47, 1 in146b5a22, 32 in the ruling's commit4abc6d4d, 9 in the three transport commits (5167084c,1b0fb3f4and286655f3), 1 in3f14bb96, 82 in the adversarial review's commit645280ac, 1 in82ec9a20, 1 in44582f8fand 6 in47c9da9a. None skips, because the keyring is always a stand-in. Skipped stays at the pinned 11.This round's commits, and its merges (
05cb1c70)In order:
645280acfixes the adversarial review's four findings (next section).03fb7791merges T079'scb059d5d. That commit merges openDox-codemain8a98e317: T078's squash (T078, 16.1: the OpenAI-compatible dialect joins DIALECTS (plan 034) #61), with T085 (T085, the standalone doxBench defaults for T027's seams, and T058's two workbench rules move into opendox.validator (plan 034) #71), T088 (T088, the lens's two seed actions are offered only where a binding answers them (R1Q19 (a)) (plan 034) #65) and T071 (T071, 13.2 and 13.3: load_settings refuses a non-PostgreSQL DSN and a collapsed DSN pair (plan 034) #60) landed before it. None of those landings changes a file this PR changes, and the merge had no conflict.abbb05d4merges T079'se7f3a7b3, a docstring fix indoxbench_intake.pythat Copilot asked for on T079, 16.2: a model field the provider receives (plan 034) #62. This PR's own edit to that file is a different docstring, and the merge had no conflict.93660ec9mergesmain2fc714d2, which is T079's squash (T079, 16.2: a model field the provider receives (plan 034) #62), after T070 (T070, 13.4-13.6: OPENDOX_INSTALL_MODE and generate-and-open --local (plan 034) #67). This branch carried T079's own commits, so the five files T079 changed met its squash onmain:main's copy of each equals T079's heade7f3a7b3.maingained beyond T079:git diff abbb05d4 93660ec9isgit diff e7f3a7b3 2fc714d2, T070's thirteen files.82ec9a20makes the scheme refusal route-neutral (Copilot atabbb05d4).67d00617fixes SonarCloud's five findings at82ec9a20.44582f8fmakes a failingkeyringimport refuse like a failed read (Copilot at82ec9a20).47c9da9aruns the L4 case for a broker's turn too (Copilot at44582f8f).05cb1c70mergesmain9a490405, T081 (T081, 16.4: "no model configured" is a state, shown before any turn (plan 034) #74). T081 changestests/test_model_provider_broker.pyat cases this PR does not change, and the merge had no conflict. Its changed lines in that file are T081's exactly, and every other file it touches equalsmain's.The suite above is this head's. Before this round,
4948e6ddmerged T079'sb04a3a95, which carried T078's merge ofmain047bb4fa(phase 2's nine landings). SonarCloud at this head: 0 issues, 0 hotspots to review, quality gate OK.The adversarial review at
4948e6dd: M2, M3, M5 and L4An adversarial reviewer read this PR at
4948e6dd, and the holder forwarded four confirmed findings.645280acfixes all four. Every new case fails at4948e6dd, and every mutant of the new checks is killed.--credential-refwas taken as a broker's reference. It was stored in the file the module calls safe to commit, andlistprinted it. Each mint then put it in the broker's argv, where/proc/<pid>/cmdlineshows it to every local user.has_a_raw_key_shape, below). A reference that fails either is refused with one fixed sentence,CREDENTIAL_REF_IS_A_RAW_KEY.DIAG_BROKER_MALFORMED), which both entry points already catch.--endpoint <key>,ftp://<key>and" https://…?q=<key>"printed the key to the terminal, to startup's standard error (doxbench_install.py:322) and, through the console's intake route, to a browser (serve_workbench.py:1110). It is now one fixed sentence,ENDPOINT_SCHEME_REFUSED, built fromENDPOINT_SCHEMESalone. A short key that no shape rule knows is not repeated either. Since82ec9a20it also says nothing about hosts, because every resolver meets it and only a built-in credential is held to a private route (Copilot atabbb05d4).ENDPOINT_CARRIES_A_CREDENTIAL. That covers a key used as a path segment, glued to a path word (bot<key>), placed in the fragment, put in a parameter with an innocent name, or given in place of the URL.http.client.HTTPExceptionescapeddispatch.http.clientraises it when it cannot read a status line, a protocol, a header line or a body, or cannot send a path. It is noOSError, so it escaped, and its traceback keptdo_open's frame, whoseheadershold the key.DIAG_PROVIDER_UNREACHABLE. The built-in path raises that afresh, with no cause and no context, as it does every refusal.BadStatusLine,UnknownProtocol,LineTooLong,HTTPException(more than 100 headers),IncompleteRead, andInvalidURL(a path with a space, which the record accepts).urllibalone raises exactly that class. Each runs for a built-in credential, fornoneand, since47c9da9a, for a broker's turn with a real fake broker's mint. For a broker's turn it pins the sentence only. Broker-path credential hardening (follows T080): a minted token keeps a built-in credential's rules (plan 034) #64 raises it afresh there and pins that.The shape, and where it stops. A key has no grammar, so the rule is a shape, and it errs toward refusing. A text has a raw key's shape if it holds any of these:
sk-,ghp_,xoxb-,hf_and the rest of_KEY_PREFIXED) with 16 or more key characters after it. Those characters must mix all three classes, or two where the prefix begins a word, sobotglued to a key is still refused, while a word that only ends in a prefix, asbenchmark-ends inrk-, is not;The rule passes this product's
opref-references, UUIDs, model and deployment names under 32 characters, and the 32-character lowercase hex ids that gateways put in their paths and key vaults put in their secrets' versions. The tests hold both sides at each rule's edge.It cannot see a key that uses only one class, a two-class key under 40 characters with no known prefix at the start of a word (that is the shape of a gateway's account id), or a format it does not list. Every refusal around it repeats nothing, so a key it misses still reaches no message.
A length bound on the reference, which is new and accepted. Asking the detector about a reference means running a quadratic check on a value that had no bound. Measured locally, an
opref-reference of 65,536 characters took the detector 4.3 s. So a reference is held to the endpoint's bound first (MAX_REMOTE_URL_CHARS), with its own fixed sentence,CREDENTIAL_REF_TOO_LONG, andcarries_a_raw_keynever asks the detector about a longer text. The holder accepted the cap. Brett's "Leave unbounded (Recommended)" (openxFactory#656 comment5916000030, item 5) is about a TIME limit on reading the operator's key. It does not reach the size of a reference field.Not in this PR: M4, and the execution of
broker_argvfrom a served repository's bindings file. Both belong to T100, another writer's PR stacked on #64, and neither is touched here.Failing first. The 82 new cases were run against
4948e6dd's sources. 67 fail, and the 15 that pass are controls. Each failure is the case's own:DID NOT RAISEwhere a key was accepted, the scheme refusal's echo, and eachhttp.clientsubclass escaping. Each later case fails without its fix:82ec9a20's with93660ec9's record,44582f8f's with82ec9a20's import, and47c9da9a's six with4948e6dd's transport.30 mutants, each run against the whole broker module, and each killed:
benchmark-runner-…, a word that ends in a prefixcarries_a_raw_keycarries_a_raw_keywithout the shapecarries_a_raw_keywithout the detector4948e6dd)4948e6dd)93660ec9)test_the_scheme_refusal_is_route_neutralhttp.client.HTTPExceptionin the transport's tuplenoneand a broker's turnkeyringimport that catches onlyImportError(82ec9a20)test_a_keyring_package_that_fails_as_it_is_imported_refuses_the_same_wayReview remarks, answered at
4948e6ddCopilot's overview (review
5343397205, ate9ef9514) asked to "address the endpoint-size handling and credential encoding validation findings". It posted no inline threads. Both remarks were valid, and both were measured before they were fixed:Endpoint size. The endpoint reached the detector unbounded, from the command line or from the console's intake route. Measured locally over two runs, the detector takes about 0.002 s on a 2,048-character parameter name, about 0.1 s on 16,384 characters, and 1.4 to 2.2 s on 65,536. The bound now comes first (see What changes).
Credential encoding. The resolver refused only CR, LF and NUL. Measured against
urllib:DIAG_PROVIDER_UNREACHABLE, which names the wrong party, and theUnicodeEncodeErrorchained to it held the whole header, credential included;Both now refuse with
DIAG_REFERENCE_UNRESOLVED. With the old check restored,test_a_value_outside_latin_1_is_refused_before_any_header_is_builtfails over a real socket with the provider-unreachable sentence.SonarCloud (13 findings at
e9ef9514):[A-Za-z_]\w*underre.ASCII) and S7632 (a bare# noqa: BLE001, with the reason on the line above);pytest.raisesblock) and S9073 ×2 (composite assertions split).All 13 are fixed in
f92fca47. Its own analysis found one more, S8997 on the new real-socket test, which reset the stand-in handler's record by assignment.68b6e412resets it throughmonkeypatch. At4abc6d4dit found S3776: the binding's__post_init__reached a cognitive complexity of 17, where 15 is allowed.d240fd50moves the endpoint's own checks into_require_a_declarable_endpointand the loopback rule into_require_a_private_route. Every check keeps its order.Five mutants of the fix, each killed by a named test:
re.ASCIIdropped…malformed_built_in_reference…[env:NAMÉ]…outside_latin_1…over the sockettest_an_endpoint_past_the_url_bound_is_refused_before_the_detectortest_the_url_bound_is_the_products_own_read_when_it_is_askedCopilot's later rounds. Each inline thread is answered with evidence and resolved.
146b5a224abc6d4dAUTH_KINDS(low)5167084c; the pin test, with evidence and no code changed240fd501b0fb3f45167084c1b0fb3f4286655f3286655f3Bearerexpression286655f3, re-run3f14bb963f14bb964948e6dd, the merge ofmain4948e6dd, asked again through the reviewer APIabbb05d4, the adversarial review's fixes and T079's mergesnonebinding, which may name anhttp://endpoint on another host (moderate)82ec9a20: the sentence names the schemes alone; reply417102280482ec9a20keyringpackage whose import fails with something other than anImportError44582f8f44582f8f47c9da9a, and this description05cb1c70, the merge ofmain9a490405Copilot's run at
abbb05d4(Actions run37082414121) also stored notes it did not post. Its summary reads "Three unresolved moderate findings remain in diagnostics, malformed endpoint handling, and bearer-header construction", and its log gives each note by location only:doxbench_binding.py:290-293, posted as the one thread above;doxbench_provider.py:905, was dropped as a duplicate of the resolved six asterisks thread;doxbench_provider.py:995-1000, where the request is built from the declared endpoint, passed the duplicate check but was not posted, and its text is not in the log. This PR's reading, an inference, is an endpoint thathttp.clientcannot send, such as one with a space in its path. The record accepts it, and the turn refuses it with the unreachable sentence (L4'sInvalidURLcase). Refusing such an endpoint when it is declared would be a new rule, so it is left for the holder.Copilot's run at
05cb1c70(Actions run37086706082) stored two notes and posted neither. Its summary reads "Update catalog privacy metadata fornoneand locally resolved credentials, and clarify the endpoint diagnostic fornone." Its log gives the notes by location:doxbench_provider.py:1217-1221, where a binding no broker answers takes_dispatch_without_a_broker. This is the catalog's data-handling sentence, which For the holder below records as outside this PR.doxbench_binding.py:276-280, a nit:ENDPOINT_CARRIES_A_CREDENTIALadvises naming the credential by its reference incredential_ref, which anonebinding may not declare. The sentence still repeats nothing, and it is left as it is.SonarCloud at
82ec9a20found five issues, all in this round's code. S5713:urllib.error.URLErroris anOSError, so the transport's tuple named one class twice. S5778 ×4: four new cases built an argument inside theirpytest.raisesblock.67d00617fixes all five, and no behaviour moves.Before that, Copilot's run at
f92fca47posted nothing, but its log recorded three notes by location only.146b5a22answered two of them: a spelling note, and the console flow's kinds. Its security note later became the frame-locals thread.Six mutants of the transport fixes, each killed:
Two mutants of
3f14bb96, each killed:test_a_keyring_that_cannot_be_read_refuses_and_says_nothing_of_its_owntest_a_broker_reference_in_a_built_in_form_is_malformedRuled: a built-in credential travels only by a private route
Brett Heap ruled on this PR's question on 2026-09-28, choosing "Refuse unless loopback (Recommended)". It is recorded at openxFactory#656 comment
5880893901:Batch K records it in #1144 (openxFactory#1210 →
39f19145). Brett Heap's word for the batch is5916000030, item 1: "Yes, amendment batch K (Recommended)".tasks.mdpoints to it after 16.3's batch H addendum.5880893901) and a token a broker mints (5890601202). It rewrites no ratified text.Until
5880893901was posted, this body quoted the holder's in-session relay of the same ruling.4abc6d4drealizes it, andd240fd50answers SonarCloud's complexity note on it.5167084cand286655f3complete it on the wire, because a followed redirect or an environment proxy would have sent the credential by another route. See What changes for the rule and The falsifier for the cases.Seven mutants of the rule, each killed by the named tests:
HTTP://to another host andHttp://localhost.evil.comlocalhost.evil.comand127.0.0.1.evil.com::1dropped fromLOOPBACK_HOSTSLOCALHOSTandhTTp://127.0.0.1Readings, for Brett to overrule if he wishes:
127.0.0.2,[0:0:0:0:0:0:0:1]andlocalhost.are refused, which fails closed. Widening to all of 127.0.0.0/8 would change one constant.main, so it refuses a mixed-case scheme at declaration before this rule is asked. The predicate's case-blind reading is what the resolver's own check relies on.ENV:NAMEorKeyring:…is a broker's reference, which needs its broker. Copilot's run at5167084cleft an unposted note at that check.3f14bb96refuses a broker's intake answer in a built-in form. That is the broker's enrolment answer, not its token's route, so this PR reads the ruling's "leave the broker path as it is today" as still met. The token is presented exactly as atmain.For the holder: downstream, none of it edited here
tests/test_doxchat_model_intake.pyasserts, in two places, that the intake flow's served kinds equallist(doxbench_binding.AUTH_KINDS). Withnoneappended, both fail at T086's pin.test_the_console_flow_offers_every_kind_a_broker_enrols.doc_health). For T086.cli-help-tree.golden.txtchanges at T094's pin:--auth-kind {api_key,oauth,none}, an optional--credential-ref, and an optional broker invocation.doxbench_install.brokered_catalog'sdata_handlingsays "leaves this host: … a short-lived token the credential broker minted". That is false for anonebinding to a local server and for a built-in one.doxbench_install.pyis P3-D's file. T081 has since landed (T081, 16.4: "no model configured" is a state, shown before any turn (plan 034) #74) and moved the sentence intoBROKERED_DATA_HANDLING, unchanged, so the item stands for that file's owner. Copilot's summary at05cb1c70names it too.nonekind sent through it, the binding it would build is refused, and the route answers with that reason.test_the_consoles_intake_shaped_binding_still_buildsholds the refusal. Enrollingenv:, keyring ornonebindings from the console would be a feature of its own.e1a6cb0f. At this head, a provider answer nested past the recursion limit escapes the shared parse in_post_to_provideras aRecursionError, on every path, as it does onmain's broker path.4948e6ddon the built-in path: theRecursionErrorescapesdispatch, and its traceback keeps_post_to_provider's frame. That frame'srequestholds the key in itsAuthorizationheader (_post_to_provider.request.Authorization).DIAG_PROVIDER_MALFORMEDat that parse (da9e639a, thena271d307), with a case for each credential source.The broker path's pre-existing gaps, left here as the ruling says, and closed by #64
Each of these is at
main, and only item 3 moves here, as noted. This PR asked whether the broker path should follow the built-in path's pattern. Brett Heap answered "Yes, separate phase-3 draft (Recommended)", openxFactory#656 comment5890601202. openDox-code#64, stacked on this branch, closes all four, and T080's scope is unchanged.http://to any host.test_the_loopback_rule_is_the_built_in_resolvers_alonepins that scope.do_open.headers,_send_request.headersandsend.data. Since645280ac, anhttp.client.HTTPExceptionon a broker's turn lands on that refusal too, where it escaped before, so this item covers it as well.urllibasDIAG_PROVIDER_UNREACHABLE.🤖 Generated with Claude Code