Skip to content

test(fastwire): A0 characterization — lock current service-tier behavior (#1886) - #1892

Merged
lidge-jun merged 2 commits into
lidge-jun:devfrom
olddonkey:codex/fastwire-a0-characterization
Aug 18, 2026
Merged

test(fastwire): A0 characterization — lock current service-tier behavior (#1886)#1892
lidge-jun merged 2 commits into
lidge-jun:devfrom
olddonkey:codex/fastwire-a0-characterization

Conversation

@olddonkey

@olddonkey olddonkey commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase A0 of the FastWire umbrella (#1886): characterization tests only — zero production changes. These suites lock the current Fast-mode behavior byte-for-byte before the A1 refactor lands, including two known bugs locked deliberately as current behavior.

What is locked

tests/fastwire-characterization-wire.test.ts (19 cases):

  • The three-state fastMode contract on supported routes (true overrides caller tier with priority; false removes any tier; undefined preserves caller values).
  • The full support === undefined × fastMode {true,false,undefined} × caller {priority,fast,flex} matrix: unclassified routes pass caller values through untouched — fastMode never intervenes.
  • Exact-model modelSupportsServiceTier: true forwards any foreign caller tier on Chat routes (flex and an unknown string), without chatServiceTier.
  • requestedServiceTier logging is mixed-semantics today: the raw caller value survives a fast-mode override, but an unsupported-route strip records undefined.
  • The raw-body observation point for fast-mode injection (annotated for its intentional A1 update).
  • Known bug (locked, fix scheduled as its own unit): the native chat passthrough ignores exact-model false.
  • Known bug (locked, same): the chat→responses converter drops service_tier.

tests/fastwire-characterization-routing.test.ts (6 cases):

  • Routing-profile require.serviceTier sees supportsServiceTier: true + chatServiceTier: false Chat routes as unsupported.
  • Compatibility-fingerprint projection of service-tier behavior for supported/unsupported providers.
  • Byte goldens for the catalog tier fields (default_service_tier / service_tiers incl. the current description string / additional_speed_tiers) and their omission when capability is false/unset.

Verification

  • Full suite on review head 6b17d6233: 12748 pass / 10 skip / 0 fail (823 files).
  • bun x tsc --noEmit clean.
  • Focused characterization suites: 25 pass / 0 fail.
  • All 24 GUI-importing test files revalidated after isolated-worktree dependency setup: 351 pass / 0 fail.
  • No src/ changes; no existing test touched.
  • The branch was synchronized to dev at e60d5506c before final verification. dev advanced 6 commits during the 696-second suite, still within the repository's enforced 10-commit readiness window.

Part of #1886 (Phase A0). The A1 refactor PR stacks on this branch.

🤖 Generated with Claude Code

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • Tests
    • Added coverage for service-tier routing and compatibility behavior.
    • Verified correct handling of fast-mode settings, including supported, unsupported, and unclassified configurations.
    • Added checks for model-specific requests, catalog metadata, request timing, and raw request data.
    • Documented and protected behavior around known edge cases and forwarding scenarios.

…ctor

Phase A0 of the FastWire umbrella (lidge-jun#1886): characterization
suites only, zero production changes. Locks the three-state fastMode contract,
the unclassified passthrough matrix, exact-model foreign-tier forwarding, the
mixed requestedServiceTier logging semantics, routing/fingerprint projections,
catalog tier-field byte goldens, and two known bugs (native chat ignores
exact-model false; chat-to-responses conversion drops service_tier) as current
behavior. Full suite at this commit: 12746 pass / 10 skip / 0 fail.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Aug 17, 2026
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently.
Maintainers: @lidge-jun @Ingwannu @Wibias

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 36adb340-4999-4468-8e34-40eb9f59802d

📥 Commits

Reviewing files that changed from the base of the PR and between 3d67ac2 and 0cdd07d.

📒 Files selected for processing (2)
  • tests/fastwire-characterization-routing.test.ts
  • tests/fastwire-characterization-wire.test.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Added FastWire characterization tests for service-tier routing, compatibility projection, catalog metadata, request forwarding, fast-mode behavior, request logging, raw-body observation, and two known bugs.

Changes

FastWire characterization

Layer / File(s) Summary
Routing and metadata characterization
tests/fastwire-characterization-routing.test.ts
Tests conflicting service-tier capabilities, provider compatibility projection, fast-mode behavior, and conditional catalog tier metadata.
Request wiring characterization
tests/fastwire-characterization-wire.test.ts
Tests service-tier forwarding, fast-mode states, unclassified providers, exact-model chat behavior, request logging, raw-body inspection, cleanup after rejection, and two known bugs.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 0cdd0

This change only adds tests that document existing FastWire behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: ingwannu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the FastWire characterization tests and their purpose of locking current service-tier behavior.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@olddonkey
olddonkey marked this pull request as ready for review August 17, 2026 06:01
@lidge-jun
lidge-jun merged commit dec332c into lidge-jun:dev Aug 18, 2026
10 checks passed
luvs01 pushed a commit to luvs01/opencodex that referenced this pull request Aug 18, 2026
…B gate

The audit caught a false statement I wrote: lidge-jun#1892 and lidge-jun#1904 are not disjoint,
they modify the same two test files. The pair is safe for a better reason -
lidge-jun#1904 contains lidge-jun#1892's commit 0cdd07d, so git resolves through the common
ancestor instead of seeing two unrelated additions, and the one blob that
differs is the intentional A0 flip. Verified both directions, and a sequential
merge of all five onto origin/dev in a scratch worktree produced five clean
merges.

Two things the plan had backwards. lidge-jun#1888's sponsorship label is its third
blocker, not its first - it is also CONFLICTING against dev and carries
CHANGES_REQUESTED. And the reason not to self-apply that label is sharper than
an agent not unblocking itself: MAINTAINERS.md requires explicit security review
for auth surfaces, and the label is the record that the review happened, so
applying it without doing the review makes the record false rather than merely
skipping a step.

The train's real gate was never merge order. All five sit behind maintainer
approval under Protect dev. Recording per-PR dispositions: lidge-jun#1884 and lidge-jun#1892 are
ready, lidge-jun#1902 has no exact-head CI on production routing code, lidge-jun#1904 is a draft
with unticked boxes, and lidge-jun#1898 is missing two of the five tests this plan
required - account appears zero times in its diff.
luvs01 pushed a commit to luvs01/opencodex that referenced this pull request Aug 18, 2026
luvs01 pushed a commit to luvs01/opencodex that referenced this pull request Aug 18, 2026
I wrote that lidge-jun#1902 merged after its suite went green. It did not. The merge
landed at 00:36:18Z and test 2/4 reported at 00:36:23, test 4/4 at 00:36:30,
npm-global windows at 00:37:32, with macos still running. Everything passed -
the run now reads completed/success with all four shards and macos green - so
the outcome is sound and the prior round's concern was genuinely answered. The
claim was still ahead of the evidence, and on production routing code that is
the specific gap the round had flagged.

Approving the fork's CI runs was legitimate: action_required protects runners
from untrusted code rather than gating merges, and the diff touched no workflow
files. The error was the twelve seconds, not the approval.

Also recording two things I did not notice at the time. lidge-jun#1892 merged with no
exact-head test CI at all, which is the same deficiency lidge-jun#1902 was held for -
two characterization test files is a reason to accept the gap, not a reason to
miss it. And none of the three carries an approving review artifact; they went
through the admin bypass, which this document had just called the train's real
gate.
luvs01 pushed a commit to luvs01/opencodex that referenced this pull request Aug 18, 2026
Three of six landed: lidge-jun#1884, lidge-jun#1892, lidge-jun#1902. Three carried forward, each with a
reason that belongs to the PR rather than to the wave - lidge-jun#1904 is a draft whose
author has not ticked its readiness boxes, lidge-jun#1898 is missing the two pacing tests
this plan required, and lidge-jun#1888 has three independent blockers including an
unsponsored auth surface.

Focused verification on the merged tree covers the replay, fastwire and router
suites: 54 pass, 0 fail. Dev's own CI at 2a9f083 is still in progress, and the
two runs before it were cancelled by supersession, so the branch has no
completed green run on its current head yet. That matters for WP9's promotion,
not for these merges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants