Repository navigation
refactor(jev): share bounded System One exchange across decision questions - #6698
geunwoojun99 wants to merge 12 commits into
Conversation
Extract the JEV service exchange into a shared module used by the combo routing path, with routing tests and updated structure docs and layout. Co-authored-by: SeongwoongCho <35558061+SeongwoongCho@users.noreply.github.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change moves JEV endpoint selection and bounded HTTP exchange into a shared service. Route decision handling supplies request preparation and response parsing. Tests cover endpoint checks, transport limits, failure gates, cancellation, and deadlines. ChangesJEV Decision Exchange
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Route as resolveJevDecision
participant Exchange as exchangeJevDecision
participant Endpoint as JEV decision endpoint
Route->>Exchange: Provide request preparation and response parsing callbacks
Exchange->>Endpoint: Resolve endpoint and credentials
Endpoint-->>Exchange: Return endpoint details
Exchange->>Route: Request preparation with model and criteria
Route-->>Exchange: Return request body
Exchange->>Endpoint: Send bounded decision request
Endpoint-->>Exchange: Return response
Exchange->>Route: Return parsed value or failure gate
Merge Risk: ⚪ Minimal · up to The new test is registered consistently in both routing layouts. No actionable merge risk introduced by these changes is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Merge dev at 1a8377d without rewriting the published P0 history. Keep the P0-only delta and preserve the upstream restart-grace and thinking-token changes. Co-authored-by: SeongwoongCho <35558061+SeongwoongCho@users.noreply.github.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
Current dev brings layout.json to the 2000-line rejection threshold. The native layout/file-size suite reproduces NEW_OVERSIZED on the actual merged tree. Compact adjacent JEV map entries onto one line without changing parsed data, exemptions, or guards; the existing repository ratchet test supplies the red/green regression. Co-authored-by: SeongwoongCho <35558061+SeongwoongCho@users.noreply.github.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
Reject pre-aborted callers before endpoint and preparation work. Prefer the caller's exact reason when endpoint, preparation or parsing callbacks abort then refuse or throw, and after redirect inspection cancels a body. Keep ordinary errors, destination denials, request-body sampling and deadline gates. Add direct-call regressions and document the exported cancellation contract. This is a separate bounded bugfix after the dev refresh and layout repair, not a behavior-identical refactor claim. Co-authored-by: SeongwoongCho <35558061+SeongwoongCho@users.noreply.github.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
Check the caller after best-effort non-waiting HTTP error-body cancellation and before returning the HTTP gate. Keep ordinary cleanup failures, pending cleanup promises and deadline behavior unchanged. Add direct and route regressions in the existing exchange test and cover oversized-response cleanup at the retained checkpoint. Co-authored-by: SeongwoongCho <35558061+SeongwoongCho@users.noreply.github.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
Merge c0f8165 additively after the HTTP cleanup cancellation fix. Preserve published P0 ancestry and the six upstream commits, including the layout compaction. The actual merge is conflict-free, leaves P0 source bytes unchanged, and has the upstream parsed layout plus the existing exchange registration. Four newer fetched commits remain outside this bounded refresh. Co-authored-by: SeongwoongCho <35558061+SeongwoongCho@users.noreply.github.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
Merge b1e1735 additively after the specified dev c0f8165. The four newer upstream commits are 18a8cda (lidge-jun#6731), 13348ce (lidge-jun#6729), 8d30945 (lidge-jun#6713) and b1e1735 (lidge-jun#6732); their history is preserved unchanged. The only content conflict is src/combos/jev.ts, where lidge-jun#6731 edited the endpoint resolver that the P0 exchange extraction moved to src/combos/jev-service-exchange.ts. This merge keeps the P0 side of jev.ts byte for byte. The exchange resolver still applies the pre-lidge-jun#6731 trailing-slash normalization after this commit; carrying the shared endpoint authority into it is a separate follow-up commit. Co-authored-by: SeongwoongCho <35558061+SeongwoongCho@users.noreply.github.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
…esolver lidge-jun#6731 (18a8cda) made jevDecisionEndpointUrl the authority for the decision destination: an arbitrary HTTPS path is sent exactly as configured, and only a /systemone path keeps its trailing-slash normalization. Management and validation already use it; the extracted exchange resolver still stripped every trailing slash, so a row accepted by validation and shown by discovery was posted to a different URL. The exchange now takes the destination from jevDecisionEndpointUrl and admits it through isSystemOneEndpoint, with no local normalization. Add regressions to the existing exchange test: exact HTTPS paths and trailing slashes, /systemone normalization, query, fragment, userinfo, control-character and admission refusals, and a request body that does not depend on the path. The same URLs go through the exchange and the route resolver. Note the URL contract in the structure document. Co-authored-by: SeongwoongCho <35558061+SeongwoongCho@users.noreply.github.com> Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@coderabbitai review |
|
The branch is refreshed on the latest |
✅ Action performedReview finished.
|
Document bounded state admission, usage projection, strict answer validation, fallback metadata, and hosted credential-reference helpers. Runtime behavior is unchanged. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
@coderabbitai review Addressing the docstring-coverage warning: Exact-head validation now uses checksum-verified Bun 1.4.0 and a separate frozen-lockfile dependency tree: typecheck passed; focused JEV 217/0, layout/ratchet 28/0, adjacent contracts 85/0, outbound controls 4/0; privacy, structure, and file-size gates passed. This removes the prior pinned-runner failure and four installed-version mismatches without changing shared dependencies. Full-suite exception and remaining CI coverage will be updated in the description. Human security review and maintainer-approved exact-head CI remain required before merge. |
✅ Action performedReview finished.
|
|
Current-head evidence is now in the description. All three CI compiler argument sets and the separately scoped exchange regression typecheck pass, in addition to 334 bounded tests and the privacy/structure/ratchet gates. The full-suite resource exception and exact omissions remain explicit. Two readiness attestations are checked: local validation under that exception, and the branch is 0 behind the current |
|
The exact-head CodeRabbit rerun is complete: docstring coverage is 83.33% (threshold 80%), all five pre-merge checks passed, and no actionable comments were generated. The documentation warning is addressed; there were no inline threads to resolve. All four author readiness boxes are now checked at Merge still requires maintainer-approved exact-head CI and explicit human security review of the destination/credential boundary. Neither is claimed as complete, and the security checklist remains unchecked. |
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
…tions (#6791) Carry of #6698 onto current dev with a review fix. The System One / TypeSafe HTTP exchange moves from src/combos/jev.ts into src/combos/jev-service-exchange.ts behind exchangeJevDecision(options, prepare, parse); route state, choices and accounting stay route-owned. Caller cancellation now takes precedence at every gate, HTTP error-body cleanup no longer waits, and the extracted resolver uses the shared jevDecisionEndpointUrl / isSystemOneEndpoint authority from #6731. Review fix: drop a wall-clock assertion from the cancellation test. The one-second race and the abort-reason identity checks already prove prompt cancellation, and an elapsed-time bound flakes on loaded CI workers. Supersedes #6698 Co-authored-by: GeunwooJun <313474999+geunwoojun99@users.noreply.github.com>
|
Thank you, @geunwoojun99! This change landed on |
Summary
dev, merge the next frozendevand carry its shared endpoint-URL authority into the extracted exchange, then mergedevaeebf11e5a2c49b5f2edb2e0d8ecafd95e872119, laterdevc15037b324dcd982f32ac3b86b2841ef127c393eand the currentdev68c9d354574ed240c17805493409f8c589682b91, each with no conflict and no P0 source change. This is not a behavior-identical refactor claim.eb3b75488a6a9c7af3074163af7ba5088a10669f(tree062c83df79536e52d0c4ac7f963b2a8baffd2280) is a no-conflict merge of the prior heada03b44fba71ddcfd4daebd37bd7ffaef891ea757anddev68c9d354574ed240c17805493409f8c589682b91(fix(desktop): point to a manual download when an update install fails #6789). It was exactly 12 commits behinddevbefore the merge and is 0 behind at the 2026-10-09 inspection. Published history is preserved: fast-forward push, no force push, rebase or amendment. The P0 delta againstdevis still the same seven files (872 insertions / 234 deletions); the merge left five of them byte-identical and brought upstream layout entries into the other two (scripts/test-layout/layout.jsonandtests/fixtures/test-layout-expected.json), keeping the P0 exchange-test registration. Exact-head local validation passed again (below); no remote CI or human security approval is claimed.exchangeJevDecision(options, prepare, parse)as the question-agnostic public seam. Builders receive only{ model, descriptiveCriteria }; route state, choices, probability validation, fallbacks, and accounting remain route-owned. Canonical hosted URL/model, destination denial before key/state reads, self-hosted credential ownership, inclusive 65,536-byte caps, deadline normalization, ordinary redirect/HTTP/network gates, and golden route request bytes remain unchanged.devcommits include feat(jev): allow arbitrary HTTPS decision endpoints (carry #6384) #6731, which madejevDecisionEndpointUrlplusisSystemOneEndpointthe shared authority: an arbitrary HTTPS path is sent exactly as configured (trailing slash kept), only a/systemonepath keeps trailing-slash normalization, and query, fragment, userinfo, control characters, non-HTTPS public hosts and non-local cleartext are refused. Management uses bothjevDecisionEndpointUrl(URL derivation) andisSystemOneEndpoint(admission); combo vetting and the GUI use theisSystemOneEndpointpredicate, not the URL helper. The extracted exchange resolver was the only divergent inline copy (it stripped every trailing slash and accepted only/systemone); a separate commit now calls the shared helper with no local normalization. No guessed rule is added.timeout); this is not per-instruction interruption or a universal prompt-settlement guarantee for arbitrary injected callbacks. The inherited redirect helper's waiting cleanup is not redesigned.dev. The matched route differential uses the existing candidate getter during parsing, not a fabricated public route-parser callback. Intentional cancellation differences and upstream endpoint changes are separated from invariant behavior below.scripts/test-layout/layout.jsonis 1,980 lines at this head (threshold 2,000, so 20 lines of margin; upstream growth has consumed 25 lines across the last two merges); againstdev68c9d3545…its only semantic delta is one exchange test registration, with two adjacent entries packed onto one line; the expected fixture agrees. No cap, exemption, guard, dependency or symlink is weakened. New cases live in the existing exchange sibling; no extra registration is needed.structure/providers/jev-decision.mdcontract (including the endpoint-URL clause) and useful exported API docstrings. No new user configuration, GUI, docs-site, or live hosted-service claim. Preserve upstream feat(lifecycle): allow an explicit restart drain grace (carry #6703) #6724 restart grace and fix(anthropic): preserve reported thinking token usage #6721 thinking-token accounting; carry the shared-exchange attribution from feat(combos): JEV quota signals and level decision mode #6423 without importing its older endpoint resolver or level/quota work.Verification
Exact additive history
b1c2fa0d0c2cce2feedae98b15a7a082c6066841.be42b2747b3db0d9dc6e96d0030aeb48f7c39208; parents are published P0 anddev1a8377dc7ca06027711ceda774eb0eb37365f4cb; tree1593304bc5e4f962e5f9aa6378bbd597ccc203ed.6fe6beb41701d0a67d52b7390377be7745625a61; parent is the merge. P0 source/test bytes are unchanged at this repair commit.778a4c715623a10ed5e5dec0dfea67ab7c6f1478; parent6fe6beb41701d0a67d52b7390377be7745625a61.da79f86245a42ab86b43744ecf499e2373a28a3f; only the exchange, its direct test, and the owning contract; the causal source repair is one caller check before the HTTP gate. This and the earlier cancellation fixes are kept unchanged in this refresh.devc0f8165074d448b82a40443e19485c73e69bb724:70aa296566eda3b825bb902ad46868ead0c87ccb; tree618ccb061dbd2226377bb020cce29e6f09af116e.devb1e1735cdf7d51ed6f86edf85ca94602ca07a2fa:7edeb1ab99bf1c2df66c82f6ed49b79b60b73157; parents are70aa296…andb1e1735…; tree1090fad90019aa1c7a5d696e0a805b8acf920dd5. The four newer upstream commits are 18a8cda (feat(jev): allow arbitrary HTTPS decision endpoints (carry #6384) #6731), 13348ce (fix(auth): require independent sessions and expire revealed API keys (carry #6672) #6729), 8d30945 (fix(runtime): ship Bun 1.4.2 and keep the CI test runner on 1.4.0 #6713) and b1e1735 (fix(responses): relay undeclared passthrough tool calls on chat and anthropic inbound #6732), preserved unchanged. The only content conflict wassrc/combos/jev.ts, where feat(jev): allow arbitrary HTTPS decision endpoints (carry #6384) #6731 edited the endpoint resolver that this branch had moved into the exchange. The merge keeps the P0 side byte for byte; the P0 exchange source,jev.tsand direct test are identical to70aa296…at this commit. At this commit the exchange still carries the pre-feat(jev): allow arbitrary HTTPS decision endpoints (carry #6384) #6731 normalization (shown red below).5d996bd2e6c7f84c38d857e04102c98dc2df537f; parent is the frozen-dev merge; treecafa71fd2985f54e3e588f35f4a158abf36c0583. Three files (+69 / −6): the exchange resolver now takes the destination fromjevDecisionEndpointUrland admits it throughisSystemOneEndpoint; the direct exchange test gains the URL-contract regressions; the owning contract gains one clause.devaeebf11e5a2c49b5f2edb2e0d8ecafd95e872119:6dfb61c4d0ebb45155c683185a70185e9bffb4e0; parents are5d996bd2e…andaeebf11e5…; treea9b00450ab6cb83320959d27227059897145b9e2. Three newer upstream commits, bf9ecf3 (fix(catalog): keep Codex's auto-review model so reviews stop falling back to the task model #6727), dfea21d (feat(clients): add native Command Code integration and catalog sync (carry #3833) #6728) and aeebf11 (feat: add Claude Haiku 5.5 pricing, catalog rows and request contract #6744), preserved unchanged: 110 files, 2,694 insertions / 170 deletions, none under the JEV combo or decision paths. Git mergedscripts/test-layout/layout.jsonandtests/fixtures/test-layout-expected.jsonautomatically with no conflict, keeping both upstream entries and the exchange test registration; no cap was raised. The exchange source,jev.ts, the direct test and the owning contract are byte-identical to5d996bd2e….devc15037b32…:a03b44fba71ddcfd4daebd37bd7ffaef891ea757; parents0afe25013…andc15037b32…; treeec325948483dabe1b01a35ce44b8b85cef4cba3f. Ten newer upstream commits merged with no conflict: 357 files, 21,109 insertions / 2,474 deletions against the previous head; five of the seven P0 files are byte-identical to the previous head and the two layout registries only gained upstream entries (the diff againstdevc15037b32…is still exactly those seven files). The only dependency-manifest change is the upstream version bump 2.81.0 to 2.82.0 inpackage.json;bun.lockis unchanged. No cap or guard was altered.dev68c9d354574ed240c17805493409f8c589682b91:eb3b75488a6a9c7af3074163af7ba5088a10669f; parentsa03b44fba…and68c9d3545…; tree062c83df79536e52d0c4ac7f963b2a8baffd2280. Twelve newer upstream commits (through fix(desktop): point to a manual download when an update install fails #6789, including fix(claude): carry a provider's own encrypted reasoning, bound to its minting route (carry #6741) #6804, fix(compaction): keep hosted search history as bounded reference notes in portable summaries (carry #6746) #6799, fix(responses): keep external task input a user turn in raw-body repairs (carry #6769) #6795, fix(runtime): keep catalog probes async and release aborted translator budgets #6796, fix(test): drain ACL work and close history before Windows fixture removal #6797, fix(oauth): bound and classify ChatGPT token refresh failures #6792, fix(opencode-go): pin claude-haiku-5-5 to the Anthropic wire #6788, test(link): isolate the remote-prelude tests from a host-installed ocx #6787, fix(quota): read the Ollama Cloud quota from /api/balance #6786 and fix(codex): carry LazyCodex role-model fixes ([codex] mirror, routed effort ladder, omo tab) #6785) merged with no conflict: 170 files, 6,481 insertions / 734 deletions against the previous head; five of the seven P0 files are byte-identical to the previous head and the two layout registries only gained upstream entries (the diff againstdev68c9d3545…is still exactly those seven files).package.jsonandbun.lockare unchanged by this merge. No cap or guard was altered. Merge commit authorship uses the public noreply identity with the Claude Code co-author trailer.0afe25013b1e9652249327a274eb94d89539c1e0; parent6dfb61c4d…, treee3c60a3a3720469e74e0ebe9eb85a1cc286808b2. Two files, eight added docstring lines, no executable statements changed. Bun 1.4.0 transpilation of each changed file is identical to its parent. Six exported route helpers document bounded state, state admission, candidate bounds, usage projection, answer validation and fallback metadata; two moved exchange helpers explain canonical-row policy and credential-reference recognition. The owning contract and both mapped general architecture documents were reviewed; their present-tense explanations remain accurate.dev68c9d3545…: seven P0 files, 872 insertions / 234 deletions (exchange,jev.ts, owning contract, transport inventory, layout map, expected layout fixture, direct test). Against published P0b1c2fa0d0…: 710 files, 41,548 insertions / 4,020 deletions, including merged upstream work. Published ancestry, public noreply identities and human carry trailers are preserved. No rebase, amendment, or published-history rewrite.Endpoint contract: controls and result
Oracle is the frozen
devsource (shared helper) driven through the same injected-POST harness with a synthetic own key and a fixed clock; no network or service. Twenty-five baseUrl rows cover five control classes: trailing slash (arbitrary HTTPS path versus/systemonecontrol), exact path (case, nested path,@inside a path,/systemoneprefix), query/fragment/userinfo/control character (including empty?,#,@), admission (public HTTP, local HTTP with and without/systemone,ftp, non-URL, empty), and body independence (the serialized request, model and own-key Bearer header are identical for every admitted URL).dev(oracle)/systemonenormalized70aa296…)ftp, public-HTTP and control-character URLs and refused arbitrary HTTPS paths7edeb1ab…)5d996bd2e(P0 bytes unchanged since)The same URLs are asserted through both the direct exchange and the route resolver in the new regression block of the exchange test (50 tests in the file, 284 assertions): head
5d996bd2e50 pass / 0 fail; the identical test bytes run against the merge-only exchange give 46 pass / 4 fail and against the pre-#6731 exchange 37 pass / 13 fail. The reds are retained; they are not edited into passes. As independent accepted-review evidence, upstream #6731's unchangedtests/routing/jev-decision-destination.test.tsalso gives 15 pass / 1 fail on the head5d996bd2e's merge-only parent (7edeb1ab…, thedecisions/case) and 16 pass / 0 fail on the head5d996bd2e. Those reviewer runs are separate from the writer's 25-row differential and are not re-run for this correction.Current-head isolated validation (
eb3b75488, 2026-10-09)The official Bun 1.4.0 Linux x64 archive was verified against both the release's
SHASUMS256.txtand GitHub asset digest (sha256:2d03fb5fb83ac8b567aca0a281b2ce1a1a19d488f56c2968d88c3f25e92fe452). It runs outsidenode_modules, with no global installation or persistent PATH change. A detached worktree at the exact current head has its own dependency directory, populated bybun install --frozen-lockfile --ignore-scripts(106 packages at first install; the install log for this head was not retained). The same command set was first run at0afe25013, then ata03b44fba, each with identical pass/fail counts; those logs are retained as historical receipts. The frozen-lockfile install ateb3b75488(package.jsonandbun.lockunchanged by the latest merge): the install log for this head was not retained, so no install result is claimed for it. No tracked package/lockfile changed and no shared dependency directory or symlink was mutated.The four previously mismatched packages now match the lock:
@modelcontextprotocol/sdk1.31.0,proxy-addr2.0.8,fast-uri3.1.8 andip-address10.7.1. TypeScript is 7.0.2. Installation scripts remain intentionally unexecuted: this is not a packaged Bun 1.4.2, native-keyring, optional-transport or full installed-byte attestation.Each command runs in that detached worktree, with a credential-free synthetic HOME/config/cache/temp environment, the repository test-home guard intact, and an external 120-second deadline.
$BUNdenotes the verified Bun 1.4.0. Test commands use this exact prefix, followed by the repository-relative paths in the tables:eb3b75488"$BUN" --no-install run --bun typecheck(repository script:bun x tsc --noEmit)"$BUN" x --no-install tsc --noEmit -p tests/tsconfig.doctor-service-memory-contract.json"$BUN" x --no-install tsc --ignoreConfig --noEmit --strict --target ESNext --module ESNext --moduleResolution bundler --types bun-types --skipLibCheck scripts/ci/docker-smoke.tstests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts--test-name-pattern 'blocks an unsafe POST destination|requires HTTPS before invoking|admits a cleartext POST only|never sends a cleartext POST' tests/providers/provider-outbound.test.ts"$BUN" --no-install run --bun privacy:scan"$BUN" --no-install run --bun structure:check"$BUN" --no-install scripts/file-size-ratchet.ts"$BUN" x --no-install tsc --noEmit -p <scoped exchange config>(srcplustests/routing/jev-service-exchange.test.ts)git diff 68c9d354574ed240c17805493409f8c589682b91 --check(devtip)Total bounded tests: 334 pass / 0 fail across 24 files. This supersedes the current-environment runner/dependency gap, not the historical red results below. The custom historical endpoint/differential probes were not rerun: the P0 source and test inputs they exercise are unchanged by the latest merge (only the two layout registries gained upstream entries). Current-head commands, versions, exits and log hashes are retained as local execution receipts, not as remote CI evidence.
Full-suite exception: the root AGENTS.md policy permits focused regression validation where a full run is disproportionately costly, including concurrent-worktree contention. This P0 seam is covered directly and through its route/management consumers, the source/golden/layout oracles, cancellation checkpoints, byte boundaries, endpoint admission and outbound controls above. Changed/full discovery was not run: its wrapper can acquire GUI dependencies and its broad selection reaches subprocess, live-service-manager and storage domains while other worktrees are active. Required CI remains the broader coverage owner; the exact omissions are listed below. The older broad red logs are not erased, diagnosed or counted as green by these narrower results.
Historical re-checks on merge head
6dfb61c4dSame local environment and prefix as the historical table below (Bun 1.3.14 and the existing TypeScript 7.0.2 compiler, no installation, preload after
test). Only the checks sensitive to the new merge were re-run; the P0 source and test bytes did not change, so the other historical rows were not repeated.6dfb61c4dtests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.tsdomain verification launches isolate tests through the pinned runner) that cannot pass on 1.3.14; no other failuretsc --noEmit -p tsconfig.jsonscripts/privacy-scan.ts,scripts/structure-ssot.ts,scripts/file-size-ratchet.tsgit diff aeebf11e5a2c49b5f2edb2e0d8ecafd95e872119 --checkHistorical note from the
0afe25013run (not the current head): the first scratch tsconfig for the scoped exchange typecheck omitted thenode_modulestype root and failed with TS2688 forbun-types; correcting only that external config resolved it. No repository change was required.Historical final-byte bounded checks at
5d996bd2e(before the latestdevmerge)Native Bun 1.3.14 and the existing TypeScript 7.0.2 native compiler run directly, without installation, package wrappers,
bun x,bunx, ornpx. Each run has a credential-free synthetic HOME/config/cache/temp environment and an external deadline; native tests also use--no-orphansand the inspected repository preload. JavaScript guards are not process-tree containment; native compiler child scope is not contained. These are local fixture checks, not sandbox certification, formal security approval, or live-service validation.All native tests use this prefix, with preload after
test:Rows marked historical below were run on
5d996bd2eand are not relabeled as runs of the refreshed head. Execution receipts retain exact absolute argument lists, runtime versions, exits, input/log hashes bound to the head5d996bd2e, synthetic environments, deadlines, and the original reds. Public examples below use repository-relative arguments;$BUN,$REPO,$EXISTING_TSC, and$SCRATCHname the inspected local inputs, not a package-resolution wrapper.5d996bd2etests/routing/jev-decision-destination.test.ts tests/routing/jev-decision-model-config.test.ts tests/routing/jev-decision-provider-combo.test.ts tests/routing/jev-decision.test.ts tests/routing/jev-model-backend.test.ts tests/routing/jev-service-exchange.test.ts tests/routing/jev-typesafe-golden.test.ts tests/server/jev-decision-scope.test.ts tests/server/server-jev-model-decision-e2e.test.ts tests/server/server-jev-combo-e2e.test.ts tests/providers/jev-provider.test.ts tests/server/decision-routes.test.ts tests/server/decision-discovery.test.ts tests/gui/combo-workspace-jev-decision.test.ts5d996bd2e(25 rows, four variants)dev/ specifieddev/ pre-cancellation-fix P0 / head5d996bd2etests/usage/jev-stats.test.ts tests/usage/request-log-jev.test.ts tests/claude-integration/claude-source-envelope.test.ts tests/server/bounded-body.test.ts tests/claude-integration/claude-inbound-token-footer.test.ts tests/adapters/anthropic/anthropic-thinking-usage.test.tstests/providers/provider-outbound.test.ts --test-name-pattern 'blocks an unsafe POST destination|requires HTTPS before invoking|admits a cleartext POST only|never sends a cleartext POST'(pattern precedes path in executed argv)tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.tsdomain verification launches isolate tests through the pinned runner, which asserts the test itself runs on the pinned Bun 1.4.0 (#6713) and cannot pass on 1.3.14. The same case fails identically on an extracted pristine frozen-devtree under the same Bun (control). The repository-scan ratchet case passes"$EXISTING_TSC" --noEmit -p "$REPO/tsconfig.json""$EXISTING_TSC" --noEmit -p "$SCRATCH/tsconfig.p0-check.json"(source plus direct exchange test)"$BUN" --no-install "$REPO/scripts/privacy-scan.ts""$BUN" --no-install "$REPO/scripts/structure-ssot.ts""$BUN" --no-install "$REPO/scripts/file-size-ratchet.ts"git diff b1e1735cdf7d51ed6f86edf85ca94602ca07a2fa --checkandgit diff 70aa296566eda3b825bb902ad46868ead0c87ccb --checkThe registered HTTP-cleanup regression was causally red before its repair (26 pass / 1 fail) and green after it, and removing only the HTTP caller check from the repaired source reproduced 26 pass / 1 fail; that removal run was made on the prior head and is not repeated here (the check is retained unchanged and the regression is green in the 50-test run above). Earlier causal evidence stays historical and is not relabeled as a final-head run: the original cancellation matrix improved from 3 pass / 6 fail to 9 pass / 0 fail; pre-fix direct source produced 19 pass / 5 fail; each of six earlier single-check removals produced 23 pass / 1 fail; the independent HTTP direct and actual-route probes were red on the unrepaired variants. The original adversarial control retains its 5 pass / 1 fail after the prior fix: it expects both routes to return
invalidafter parser-triggered abort, but repaired P0 rejects with the caller reason. This superseded expectation is disclosed, not edited away or counted as a passing suite.Expected differences versus invariants
The 628 matrix cases compare thirteen endpoint/scope configurations, six deadline settings, eight response variants, plus four abort phases. Nine configurations are invariant: requests, headers, destination/policy flags, gates, target/effort, usage, normalized deadlines, and abort identity agree across frozen
dev, specifieddevand pre-fix P0 with the head5d996bd2e, with a fixed latency clock. The other four are upstream endpoint-contract changes (#6731): a non-/systemoneHTTPS path, an arbitrary HTTPS path with a trailing slash, a/systemoneURL with a query, and a public HTTP/systemoneURL. Specifieddevand pre-fix P0 agree with each other and differ from frozendev; the head5d996bd2eequals frozendevin all 192 of those cases. Exact 65,536-byte success and 65,537-byte rejection remain pinned; TypeSafe golden serialized bytes are unchanged.The additional 21 scenarios contain 13 intentional bugfix cases and eight invariant controls; these are unchanged from the earlier refresh and re-run against the new base:
invalid) or throw (own error); credential abort then foreign-reference refusal (missing_key) or throw (own error); state extraction abort then no usable state (no_state) or throw (invalid); parser abort then throw (invalid); redirect-body cancel abort (redirect); HTTP cleanup abort with normal return, throw or nonsettling promise (http). Frozendev, specifieddevand pre-fix P0 agree; the head5d996bd2erejects by exact caller-reason identity.timeout), simultaneous caller/deadline abort (caller reason wins), and the three HTTP cleanup modes without caller cancellation (http, no cleanup wait).The differential does not claim every race, microtask-by-microtask equivalence, or real hosted behavior.
Coverage left to CI
All coverage below is pending maintainer-approved exact-head CI at
eb3b75488…. At the 2026-10-09 inspection right after the push, Cross-platform CI and React Doctor had completed asaction_required(fork PR awaiting maintainer approval; no build/test job ran); the CodeRabbit status was pending. Administrative gates (PR hygiene, PR Labeler, Enforce PR target branch) re-run on each push and body edit; some runs are cancelled and superseded by later ones, so their live state is the source of truth and no point-in-time count is given here. No build/test CI has run or passed for this head and none is claimed. This is the explicit full-suite exception coverage, not additional local green evidence:bun x --no-installto forbid package acquisition. The hosted CI jobs themselves remain unrun, and compilation is not Docker execution or platform validation.test 1/4–test 4/4): NOT run. The bounded focused sets above are not full shard coverage.Review notes and limits
decision-routescalls both the URL helperjevDecisionEndpointUrland the admission predicateisSystemOneEndpoint;combos/typesand the GUI service call only the predicate. The connection probe goes through the same exchange resolver, which uses both. Not changed here: the System One discovery hint builder derives a suggested URL from a provider prefix with its own slash handling (it does not choose the URL a request is sent to), and the localized GUI strings still say the base URL must end in/systemone. Both are upstream; no broad cleanup was done.action_required; Cross-platform CI had zero jobs. This is a fork PR, so a maintainer has to approve CI runs on the new head; until they run, results for this head are missing or awaiting approval and are not passing evidence. PR hygiene/target/label successes are administrative checks, not build/test success.0afe25013without analyzer or threshold changes and explained in the review-response comment. The completed exact-head CodeRabbit review reports 83.33% against 80.00%, 18 functions across three files, all five pre-merge checks passed, and no actionable comments. The 83.33% review was for0afe25013; ateb3b75488the CodeRabbit status was still pending ("Review in progress") when inspected, so no CodeRabbit result for this head is claimed. REST reviews, inline comments and GraphQL threads contained no findings or human questions at the 2026-10-09 inspection. The bot separately retains pending human security review and exact-head CI as merge requirements.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
All four author attestations are true at
eb3b75488: local validation passed under the documented AGENTS.md full-suite exception; the branch is 0 behinddev68c9d3545…after the merge; all earlier Codex/CodeRabbit findings were answered and no thread or review finding is open; and the bounded P0 change is ready for maintainer review. This is author readiness, not merge authorization: required remote CI and formal human security review remain merge blockers. The security checklist above intentionally remains unchecked.Co-authored-by: SeongwoongCho 35558061+SeongwoongCho@users.noreply.github.com
Co-authored-by: lidge-jun 243035832+lidge-jun@users.noreply.github.com
🤖 Generated with Claude Code
Summary by CodeRabbit