Repository navigation
feat: consolidate response handling and native API features - #542
Merged
Merged
Conversation
commit: |
jpr5
marked this pull request as ready for review
October 15, 2026 00:45
Contributor
Author
|
@tombeckenham Hey Tom, this one is kind of a lot of work, and I'd love someone else to validate it works... can you give it a whirl before I merge/release? |
contextablemark
approved these changes
Oct 18, 2026
contextablemark
left a comment
Contributor
There was a problem hiding this comment.
Quick P1-focused review: no P1 blockers found. Current-head CI checks are green.
jpr5
added a commit
that referenced
this pull request
Oct 20, 2026
…#551) ## Problem Unknown `after_id` and `before_id` values returned successful empty Anthropic model pages. Authentication docs missed the new native error-body migration details. The CI drift rule also required the old cursor behavior and rejected the corrected response. ## Why SDK callers need an error for an invalid cursor. Apps reading the old string `error.code` need to know that Anthropic omits it and Gemini/Vertex return numeric `401`. CI must check the new response while retaining its known missing-request-ID warning and the historical base comparison. ## Fix Reject unknown Anthropic cursors with HTTP 400, including with lifecycle filters. Keep valid paging and empty filtered pages working. Update README, changelog, provider docs, cursor tests and the drift grading rule. Header enforcement stays opt-in. The grading rule requires the exact status, error type, message and single known warning. It accepts the old empty-page policy only for cached base evidence. Regression tests mutate receipts, assertions and diffs to verify the gate still rejects mismatches. A saved actual CI receipt replay passes with 11 advisories and no blocks; this does not claim full response-body parity or fresh authenticated calls. Validation: format, lint, typecheck, all 428 test files (17,456 passed; 11 existing skips), build, package exports, all 14 unchanged API reports, and actionlint with ShellCheck passed. The earlier free-RAM test failure passed unchanged. Separate Node/Bun consumers passed 48 cursor checks each plus the original 38 each. Stacked above #542 using GitHub's native stack #552. The provider compatibility follow-up is #553, based on this PR. Merge only after required checks pass, in stack order.
jpr5
added a commit
that referenced
this pull request
Oct 20, 2026
## Problem The current Ollama SDK could not read `/api/embed` responses, and recorded batches collapsed to one vector. Recordings also flattened different input shapes and reused responses across dimensions and embedding operations. AG-UI convenience helpers replaced caller IDs. Bedrock examples omitted the HTTP/1 handler required by current AWS SDK versions. ## Why SDK clients need the right response shape and request identity. A saved batch must not answer a different width or operation. Concurrent AG-UI requests need their own IDs, and Bedrock clients need the transport aimock supports. ## Fix - Return Ollama's ordered `embeddings` matrix, preserve distinct vectors and metadata through record/replay, and honor fallback dimensions. New Ollama and OpenAI-compatible recordings persist `match.embeddingRequest` with the operation, original input and requested dimensions, plus the model. Keep fixture sequence counters separate for those criteria. Handwritten generic fixtures keep broad matching; re-record older captures to add the new match keys. - Build AG-UI text/tool/state/reasoning convenience events per request with caller thread/run/parent IDs and fresh content IDs. Explicit event fixtures keep their authored IDs. - Correct Bedrock setup docs and test Invoke, Converse, and both binary streams with `NodeHttpHandler`. **Default HTTP/2 remains unsupported.** Python’s `add_fixture(..., embeddingRequest=...)` routes the field under `match`, so width, input shape and operation constraints reach the server. Three public HTTP regressions cover both Ollama operations and OpenAI; the full Python suite passes 251 tests on Python 3.13.9 with Node 24. Matching metadata stays private: predicates and request journals retain their old request shape. The A7 test checks the exact new saved fields, then compares all prior fields with its unchanged frozen baseline. CLI test helpers await child processes so slow commands leave the Vitest worker free to report results. The controlled 104-test suite reproduces the reporting timeout before this change and passes under the identical slowdown afterward. That suite keeps its assertions, test count, child limits and test deadlines. Two validate CLI checks now distinguish a success status from `OK` inside a file path; filenames containing `OK` make that regression deterministic. Validation on Node 24.21.0: 17,483 tests passed across 430 files, with 11 existing skips. Format, lint, typecheck, build, package exports and workflow lint passed. All 14 generated API reports match the new optional fixture field; `public-api-addition` marks that change for review. The unchanged memory guard passed after freeing RAM. The added regressions cover successive batch/string/width/model requests, reverse cache hits, offline reload, both legacy/OpenAI recording orders, changed widths after another operation's recording, strict misses and independent fixture sequences. Focused suites passed 776 tests. Independent Node 24.11.0 and Bun 1.4.3 consumers each passed 235 expanded checks and nine review-specific checks, plus 12 transform/privacy checks. These use local fixtures, not fresh authenticated all-provider calls; counts overlap. Native stack #552: #542 → #551 → #553. Header enforcement stays opt-in. Merge after required checks pass, in stack order.
jpr5
added a commit
that referenced
this pull request
Oct 20, 2026
…ive (#556) ## What drifted The nightly HTTP API drift run has failed on `main` every night since #542 merged (runs 39103216353, 39209123306, 39379129945: Oct 17, 18 and 19, about 11:15 PM PDT each). The Slack alert lists 12 criticals outside model-family classification: - Anthropic native catalog: 6 (`anthropic-after-unknown` / `anthropic-before-unknown`: real `400` + `type`/`error.type`, mock `200`) - Anthropic native authentication and version: 3 (`intentional default divergence`: real `400`, mock `200`) - Gemini native authentication: 3 (`inbound policy divergence`: real `403 PERMISSION_DENIED`, mock `401 UNAUTHENTICATED`) The Slack text labels the first two groups "PROVIDER ADDED FIELD". That is the summary picking the first diff issue. The criticals themselves are `Native response value differs`. ## Root cause: a #542 harness regression, not a provider change - These 12 diffs are the documented native-policy differences that #542's native gate (`DELTAGATE` in `test-drift.yml`, `classifyNative`) checks and retains by name: default missing-version, inbound auth contracts, and empty pages for unknown cursors. None of them is a new provider shape. The vendor bodies match the exact values the gate expects. - The gate needs `drift-observations.json`. On all three scheduled runs the collector printed `Live observation evidence unavailable; observation artifact was not written.`, then `Native disposition unavailable: ENOENT ... drift-observations.json` and `strict native effective exit 1`. - The CI evidence sidecar shows one unbound assertion every night: `bedrock-misbehavior-live.drift.ts › native AWS misbehavior › invoke K9 stream=true` (passed, `consoleContext.availability: "unavailable"`). - Cause: that live cell logs a 474,767-byte diagnostic line. `sdkEvents` is 314,319 bytes because `Uint8Array` chunk bytes serialize as `{"0":123,"1":34,...}`, and `rawWire` base64 is 123,216 bytes. The evidence reporter turns any record over 256 KiB into `console-unavailable`. That taints the test, and since de36209 (#542) a tainted assertion makes the collector withhold the whole observation artifact. - Why it only fails nightly: the live AWS leg runs only on `refs/heads/main` (`AIMOCK_AWS_MISBEHAVIOR_LIVE`), so #542's PR-scoped live leg never exercised it. The pre-#542 run (39009028844, Oct 16 11:12 PM PDT) already had the same oversized record, but nothing depended on it then. That run's only critical was `gemini-4-argon`. ## Fix `src/__tests__/drift/bounded-diagnostic.ts` serializes the AWS diagnostic line within the reporter limit: - SDK byte arrays are written as base64. This is lossless and about 10x smaller. - Only if the line still does not fit: the raw wire, and after that the SDK events, are replaced by `{omitted, byteLength, sha256}`. - Decoded events and all other fields are kept. `bedrock-misbehavior-live.drift.ts` uses it on the success and error paths. The existing local `diagnosticWire: "summary"` path is unchanged. No response builder changes: the mock's documented policies stay as they are. Regression tests in `bounded-diagnostic.test.ts` (unit lane) check each stage against the reporter's real `MAX_EVIDENCE_RECORD_BYTES`. Mutation checks: disabling the base64 replacer fails 3 of 5 tests, and always returning the full line fails 2 of 5. ## Red-green (same command as CI) The CI `Run drift tests` step runs locally: the `DELTAGATE` script is extracted from `test-drift.yml` and run with `NATIVE_DISPOSITION_MODE=scheduled-retry`, `AIMOCK_NATIVE_PROVIDER_DRIFT=1`, live Anthropic/Google/OpenAI keys, and the main-branch AWS export block (`AIMOCK_AWS_MISBEHAVIOR_LIVE=1`, `copilotkit-admin`, `us-west-2`, `us.anthropic.claude-sonnet-4-5-20250929-v1:0`). Ollama, Vertex, fal, Cohere and ElevenLabs were not configured locally. RED, unmodified `main` (c1ed203): ``` Critical diffs: 13 Live observation evidence unavailable; observation artifact was not written. Exiting with code 2 (critical diffs found). Native disposition unavailable: Error: ENOENT: no such file or directory, open 'drift-observations.json' [drift-retry] Collector raw exit 2; strict native effective exit 1. [drift-retry] Collector exited 1 (not drift) — propagating without retry. unbound assertion: bedrock-misbehavior-live.drift.ts "invoke K9 stream=true" (passed) ``` Live record sizes for that cell before the fix: line 474,767 B, `sdkEvents` 314,319 B, `rawWire` 123,216 B. GREEN, this branch: ``` Critical diffs: 13 (same raw diffs; no observation-unavailable line) [drift-retry] Collector raw exit 2; strict native effective exit 2. unbound assertions: 0; drift-observations.json written (36 observations) ``` The remaining effective exit 2 is only the out-of-scope `gemini-4-argon` family canary (#541). Grading the same reports with only that one entry removed (`NATIVE_DISPOSITION_MODE=scheduled`, `NATIVE_RAW_EXIT_CODE=2`): ``` GREEN artifacts: {"rawExit":2,"effectiveExit":0,"policy":"validated documented native policy differences"} RED artifacts: Native disposition unavailable: ENOENT ... drift-observations.json {"rawExit":2,"effectiveExit":1} ``` So all 12 in-scope criticals are validated as documented native policy once the artifact exists. ## Notes - #551 (open) changes Anthropic unknown-cursor behavior to `400` and updates the gate rule for it. This PR does not touch that policy or the gate, and does not conflict with it. - The Oct 17 quarantined OpenAI Live "access unavailable" failure did not reproduce. There was no quarantine on the Oct 18 or Oct 19 nightly runs. Locally, `client lifecycle` and `managed lifecycle` passed in the final RED and GREEN attempts, with one transient `managed lifecycle` failure that cleared on retry. ## Local gate `format:check`, `lint`, `typecheck` and `build` pass. `test`: 428/428 files and 17,439 tests pass. Vitest also reported one worker RPC timeout (`Timeout calling "onTaskUpdate"`) under local machine load, which made the run exit 1. ## Review round 1: never return an oversized line A reviewer found a gap. After the raw wire and SDK events were digested, the last step returned without a size check. A large `decoded`/`decodedEvents`, `sdkResponse` or `error.message` could still go over the cap. With empty `sdkEvents` and 3,000 decoded deltas, the line was 449,172 bytes. The fix (61e941c) now does this: 1. It also digests `decoded`/`decodedEvents` (byte length + SHA-256). 2. If the line still does not fit, it falls back to `{cell, omitted: [...], byteLength, sha256}` for the full line. Every candidate goes through `fitsEvidenceRecord`, and the `sdkEvents` digest keeps its `count`. RED, head 0dfac24 with the new tests: ``` × digests decoded events when they alone exceed the record limit → expected false to be true × digests decodedEvents on the error path the same way → expected false to be true × falls back to a minimal line when other fields still exceed the limit → expected false to be true Tests 3 failed | 5 passed (8) ``` GREEN, 61e941c: ``` ✓ src/__tests__/drift/bounded-diagnostic.test.ts (8 tests) Tests 8 passed (8) ``` `format:check`, `lint` and `typecheck` pass. Drift unit tests (`src/__tests__/drift/`): 20 files, 245 passed, 6 skipped. The live gate was not re-run: this change only alters lines that would otherwise exceed the cap; lines that already fit, including the live GREEN run above, are returned unchanged.
contextablemark
pushed a commit
to abhiaiyer91/aimock
that referenced
this pull request
Oct 20, 2026
The live invoke K9 stream=true cell logged a ~475KB diagnostic line: SDK chunk bytes serialized as index-keyed objects (~314KB) plus the base64 raw wire (~123KB). The evidence reporter replaces any record over 256KiB with console-unavailable, which leaves that passed assertion unbound, so the collector withholds drift-observations.json. The native policy gate added in CopilotKit#542 then cannot validate the documented native policy differences and the scheduled run fails with strict exit 1. Write SDK byte arrays as base64 and, only when the line still exceeds the reporter limit, replace the raw wire and then the SDK events with their size and SHA-256. Decoded events are always kept.
jpr5
added a commit
that referenced
this pull request
Oct 20, 2026
…nects (#560) Docs-only fill-in for gaps left by unreleased changes since v1.45.1. Each gap and its fix: | Change | Gap | Fix | | --- | --- | --- | | #542 required-header policy | README feature list did not mention it | README feature bullet linking `aimock-cli#required-header-policy` (scope: `/v1/messages`, `count_tokens`, Anthropic-flavored `/v1/models`) | | #542 native catalogs + token counts | README feature list did not mention them | README feature bullet linking `claude-messages#model-catalog` | | #542 Anthropic cache usage | `docs/fixtures` `usage` override row listed only OpenAI/Anthropic/Gemini token names | Added `cache_read_input_tokens`, `cache_creation_input_tokens`, `cache_creation`, linked to a new `#cache-usage` anchor on Claude Messages | | #542 routes | `skills/write-fixtures` endpoint table had no count/catalog routes, and listed `/v1/models` as OpenAI-only | Added `count_tokens`, `/v1/models/{id}`, Gemini `/v1beta/models[/{model}]`, plus a note on Anthropic catalog selection (`anthropic-version`, or `x-api-key` without `Authorization`) | | #542 cache usage (skill) | Skill override table had no cache fields | Note under the override table | | #553 Ollama embed | Skill match table had no `embeddingRequest`; route table had no `/api/embed` | Added both | | #557 client disconnect | No user doc said a disconnected Messages stream journals `interruptReason: "client aborted"` | Paragraph under Claude Messages "SSE Event Sequence"; bullet in Error Injection "Interruption Behavior" | | #545 `streamingProfile` on `stream: false` | Streaming Physics and the skill described stream timing only, and did not say that `latency` never delays non-streaming replies | New "Non-Streaming Responses" section on Streaming Physics (OpenAI Chat Completions only: text, tool calls, combined content and tool calls, and `blocks` replies, per #545 and #561; summed per-chunk delays at the same `chunkSize`), a `latency` bullet saying bare `latency` / `--latency` never delays `stream: false`, and the same rule in skill gotchas #3/#4. Matches #545 head `054a5ebb` | Already covered by their own PRs (no change): #551 cursors/auth, #553 AG-UI IDs, Bedrock `NodeHttpHandler`, Ollama page, #531 phase, #533 `resources/read`. ## Checks - `prettier --check .`: pass - `pnpm lint`: pass - `pnpm build` then the doc-sample suites `mcp-fakes-doc-samples`, `aimock-cli`, `example-fixtures-loadable` and `unreleased-check-workflow`: 84/84 pass - I took local Playwright screenshots of the edited sections (claude-messages, error-injection, fixtures, streaming-physics) at 375x667, 430x932 and 1440x900. The new text renders correctly. The fixtures override table scrolls sideways at phone width, but main does the same.
This was referenced Oct 20, 2026
Merged
jpr5
added a commit
that referenced
this pull request
Oct 20, 2026
## Problem #542 (documented in #551) changed the inbound-auth 401 body on Anthropic and Gemini/Vertex HTTP routes. With `auth.apiKeys` / `AIMOCK_API_KEYS` configured, a failed key used to return `error.code: "invalid_api_key"` on every route. On main, Anthropic Messages/count_tokens omit `error.code`, and Gemini/Vertex return numeric `error.code: 401`. Clients and tests that read the old string break. aimock releases must not contain breaking changes, so v1.46.0 cannot ship this. ## Fix The 1.45 body is the default again on every HTTP route. The provider-native bodies stay available behind a new, additive policy key: - `policy.authErrors: "legacy" | "native"`. The default is `"legacy"`. - You can set it with the programmatic option, `llm.policy`, `--policy authErrors=native` (both CLIs), or the `X-AIMock-Policy: authErrors=native` request header. It uses the same parser, precedence and invalid-entry rules as `requiredHeaders`. An additive `code` field was not an option. Google's native `error.code` is the number 401, so a string `"invalid_api_key"` cannot also live there. Making native bodies opt-in is the smallest change that restores the old contract and keeps native fidelity. The drift gate is unchanged. The local auth servers in `anthropic.drift.ts` and `gemini.drift.ts` now opt into `authErrors: "native"`, so they emit the same native receipts as before. The `test-drift.yml` retained-policy rules (`localContract` / `retain`) are not edited. ## Body comparison (HTTP 401, inbound auth configured, wrong key) | Route | v1.45.1 | main (2127e9e) | this PR, default | this PR, `authErrors=native` | | --- | --- | --- | --- | --- | | `/v1/messages`, `/v1/messages/count_tokens` | legacy | `{"type":"error","error":{"type":"authentication_error","message":"Invalid API key"}}` + `request-id` header | legacy | same as main | | `/v1beta/*` (generate, countTokens, models, interactions), Vertex `publishers/google` | legacy | `{"error":{"code":401,"message":"Invalid API key","status":"UNAUTHENTICATED"}}` | legacy | same as main | | OpenAI, shared `/v1/models`, Bedrock, others | legacy | legacy | legacy | legacy | | WebSocket upgrade | legacy | legacy | legacy | legacy | legacy = `{"error":{"message":"Invalid API key","type":"authentication_error","code":"invalid_api_key"}}`. The response headers on the default path match v1.45.1 exactly: `WWW-Authenticate`, CORS, `Content-Length: 94`, and no `request-id`. ## Local red-green (real `dist/cli.js`, `AIMOCK_API_KEYS=good-key`, wrong key) RED, origin/main 2127e9e: ``` OpenAI chat 401 error.code="invalid_api_key" Anthropic messages 401 request-id=req_<random> error.code=nil Anthropic count_tokens 401 request-id=req_<random> error.code=nil Anthropic models 401 error.code="invalid_api_key" Gemini generateContent 401 error.code=401 Gemini countTokens 401 error.code=401 Gemini models 401 error.code=401 Vertex generateContent 401 error.code=401 Bedrock invoke 401 error.code="invalid_api_key" WebSocket upgrade HTTP/1.1 401 Unauthorized (legacy body) ``` Baseline, `npm i @copilotkit/[email protected]`: all 10 routes return `401 error.code="invalid_api_key"` with the legacy body. GREEN, this branch, default: ``` all 10 routes: 401 error.code="invalid_api_key", legacy body diff vs v1.45.1 capture: DEFAULT == v1.45.1 byte-for-byte (10 routes) ``` GREEN, this branch, `--policy authErrors=native`: ``` diff vs origin/main capture: NATIVE opt-in == origin/main native bodies ``` Per-request header on the real CLI: `X-AIMock-Policy: authErrors=native` on `/v1beta/models` returns the Google native body. The same request without the header returns the legacy body. ## Regression tests - `response-auth-features.test.ts`: new "default inbound auth keeps the 1.45 legacy body" block covers 8 Anthropic/Gemini/Vertex paths × 3 header variants, the per-request header opt-in, and the installed Anthropic and Gemini SDKs. The existing native block now opts in. - `response-errors-routes.test.ts`: "actual legacy auth bytes" again expects the legacy bytes on every route. A sibling test covers native with the opt-in. - `golden/auth401`: the six `replaced-*` goldens are restored to their pre-#542 legacy bytes. - `response-policy-cli.test.ts`: all 4 built binaries (`cli.js`, `aimock-cli.js`, and `.cjs`) return legacy by default and native with `--policy authErrors=native`. Invalid `authErrors` entries exit 1. - `response-policy-feature.test.ts`: covers authErrors parsing, the default, and precedence. Mutation check: I reverted only the default (dialect always path-selected) and rebuilt. 18 tests failed across the three suites, then passed again after restoring it. ## Gates format:check, lint, typecheck, build: pass. `pnpm api:report`: the only change is the additive `authErrors?: "legacy" | "native"` on `AimockPolicy`. `AimockPolicy` is new in the unreleased 1.46.0. This needs the `public-api-addition` label. Full unit suite: 432 files, 17,580 passed. One failure was a 5 s CLI-spawn timeout in `misbehavior-loading.test.ts` under full-suite load. It passed in the first full run and passes 104/104 when run alone. The offline drift suite (`pnpm test:drift`) passes: 29 files, 564 passed, 131 skipped. Docs: README, CHANGELOG `[Unreleased]` (the breaking "Changed" entry is replaced by an additive "Added" entry), plus the auth sections of `claude-messages`, `gemini` and `aimock-cli`.
jpr5
added a commit
that referenced
this pull request
Oct 20, 2026
## [1.46.0] - 2026-10-20 ### Added - Native Anthropic and Gemini model list/detail routes and token-count routes (#542, #551) - Opt-in policies: required headers, native auth 401 bodies (`authErrors: "native"`) (#542, #566) - Opt-in fixture `nonStreamingTiming: true` delays non-streaming OpenAI chat replies (#545, #567) - Anthropic/Bedrock cache usage kept in replay and record; Responses `phase` override (#531, #542) ### Fixed - Anthropic stream disconnects, Ollama embed batches, AG-UI IDs, empty MCP reads (#533, #553, #557)
jpr5
added a commit
that referenced
this pull request
Oct 20, 2026
Pre-release compatibility fix for v1.46.0: no default behavior may change versus v1.45.1. #542 made `GET /v1/models` return the Anthropic catalog whenever a request carried `anthropic-version` (every Anthropic SDK request) or an `x-api-key` without `Authorization`. v1.45.1 returned the OpenAI-format list for every header set and ignored list query params, so `client.models.list()` changed shape and Anthropic-header list queries could newly 400. **Fix:** new `policy.modelCatalog: "legacy" | "native"`, default `"legacy"` (byte-identical to v1.45.1). `native` restores the Anthropic catalog selection on the list route. Set via the programmatic option, `llm.policy`, `--policy modelCatalog=native`, or the `X-AIMock-Policy` header (same parser and precedence as `authErrors` from #566). The new `/v1/models/{id}` and Gemini `/v1beta/models` routes are unchanged. | `GET /v1/models` headers | v1.45.1 | main | this PR (default) | this PR (native) | |---|---|---|---|---| | x-api-key | OpenAI | Anthropic | OpenAI | Anthropic | | x-api-key + anthropic-version | OpenAI | Anthropic | OpenAI | Anthropic | | Bearer | OpenAI | OpenAI | OpenAI | OpenAI | | none | OpenAI | OpenAI | OpenAI | OpenAI | | anthropic-version only | OpenAI | Anthropic | OpenAI | Anthropic | | Anthropic headers + `?limit=0&after_id=missing` | 200 OpenAI | 400 | 200 OpenAI | 400 | **Red-green:** a header-matrix test runs against all four built CLI binaries. Golden snapshots are restored to the pre-#542 bytes, plus native-opt-in goldens. 8 tests fail with the fix reverted. **Drift:** `models.drift.ts` local servers opt into `modelCatalog: "native"`, so receipts are unchanged and `test-drift.yml` is untouched. **Public API:** additive `modelCatalog?` on `AimockPolicy`.
jpr5
added a commit
that referenced
this pull request
Oct 20, 2026
## [1.46.0] - 2026-10-20 ### Added - Gemini model list/detail, Anthropic model detail, and token-count routes (#542, #551) - Opt-in policies: `requiredHeaders`, native `authErrors`, native `modelCatalog` (#542, #566, #568) - Opt-in fixture `nonStreamingTiming: true` delays non-streaming OpenAI chat replies (#545, #567) - Anthropic/Bedrock cache usage kept in replay and record; Responses `phase` override (#531, #542) ### Fixed - Ollama embed batches, AG-UI thread/run IDs, empty MCP reads, Anthropic aborts (#533, #553, #557)
jpr5
added a commit
that referenced
this pull request
Oct 21, 2026
Website check before v1.46.0 ships. One gap found: the **Fixture Options** reference table on `/fixtures` did not list the new `nonStreamingTiming` fixture field (#545, #561, #567). This PR adds that row. It states the `false` default and links to `/streaming-physics#non-streaming`. The rest of the site needed no change: - The homepage feature cards and comparison matrix make no per-endpoint claims that 1.46.0 changes. The matrix has no models-endpoint row on purpose (`isRowlessRule` in `scripts/update-competitive-matrix.ts`), and no row compares token counting. - #542, #551, #553, #560, #566, #567 and #568 already updated the auth, model-catalog, token-count, cache-usage, Ollama, AG-UI and streaming-physics pages. Their default statements match the shipped defaults. - Every new section is reachable from the per-page "On this page" TOC. - #562 bumps the homepage version banner. This PR does not touch it. Checks: `prettier --check`, `eslint .`, `tsdown` build, and the docs-clean-urls, docs-matrix-legend and mcp-fakes-doc-samples tests (188/188) all pass. I captured local Playwright screenshots of the edited table at 375x667, 430x932 and 1440x900, and the row renders correctly at all three. At narrow widths, the `/fixtures` page is wider than the viewport. The page on main is the same width, so this PR did not cause it.
jpr5
added a commit
that referenced
this pull request
Oct 21, 2026
Refreshes the docs overview "What's New" cards for the last month of work, and adds three verified rows to the comparison matrix (homepage and the four scanned migration pages). ## What's New (`docs/docs/index.html`) The cards were last updated in May. The 5 old cards are replaced with 8 cards (two full rows of the 4-column grid). They cover CHANGELOG 1.43.0 (2026-09-22) through `[Unreleased]` (1.46.0, #562): | Card | Covers | Links to | | --- | --- | --- | | Model Catalogs & Token Counts | Native Anthropic/Gemini model list and detail routes. The Anthropic list on shared `/v1/models` is opt-in (`modelCatalog`). Anthropic `count_tokens` and Gemini `countTokens` estimates (#542, #551, #568) | `/claude-messages#model-catalog` | | Native Auth Errors | Opt-in provider-native 401 bodies (`authErrors`) and the opt-in required-header policy (`requiredHeaders`) (#542, #566) | `/claude-messages#authentication-errors` | | Model Misbehavior | Opt-in misbehavior faults (#508, #518) | `/model-misbehavior` | | MCP Record & Replay | MCP recording/replay, scenario-scoped tool fakes, per-test fake reports (#490, #509, #517) | `/mcp-mock#recorded-fakes` | | Stream Realism | Anthropic streams stop and journal on client disconnect (#557). Opt-in `nonStreamingTiming` for OpenAI non-streaming replies (#545, #561, #567) | `/streaming-physics#non-streaming` | | Responses API Tools | Opt-in (`responsesTools: "extended"`) namespaced and custom tool calls, plus message phases (#511, #513, #531) | `/responses-api#namespaced-and-custom-tool-calls` | | OpenAI Platform APIs | Files, Batches, Fine-tuning jobs, Vector Stores (#445, #446, #447, #497) | `/vector-stores` | | GPT-Live Sessions | GPT-Live mock, record and replay (#468) | `/websocket#openai-live` | The Model Catalogs & Token Counts, Native Auth Errors and Stream Realism cards carry a "New in 1.46.0" label, and the Responses API Tools card marks its message phases "(new in 1.46.0)". Every opt-in is called out on its card: `requiredHeaders`, `authErrors`, `modelCatalog` (the Anthropic shared list), `nonStreamingTiming`, misbehavior and extended Responses tools. The version banner is not touched. ## Comparison matrix ### New rows Homepage (`docs/index.html`), inserted before "Dependencies": | Row | aimock | MSW | VidaiMock | mock-llm | piyook/llm-mock | mokksy/ai-mocks | MockServer | WireMock | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Native model catalogs (Anthropic, Gemini) | Built-in ✓ | ✗ | OpenAI format only | OpenAI format only | ✗ | ✗ | ✗ | ND | | Token-count endpoints | Built-in ✓ | ✗ | Gemini only (fixed count) | ✗ | ✗ | ✗ | ✗ | ND | | Native 401 auth errors | Opt-in ✓ | manual | ✓ | manual | partial | manual | partial | manual | The migration pages for VidaiMock, mock-llm, piyook and Mokksy get the same three rows, in each page's own style: VidaiMock uses text cells, and the other three use the ✓/✗ glyphs with text for partial or manual values. No new legend marks are needed. The MSW, Python-mocks and openai-responses pages have different columns, so they are unchanged. Every aimock ✓ cell on the three new rows carries a muted "1.46.0+" label, on the homepage and on the four migration pages. The label uses a `.version-note` class in the muted style of the existing "Requires 1.45.0+" table note. ### Rows considered and not added - Already on the matrix: record & replay, drift detection, MCP / A2A / AG-UI, streaming physics, chaos testing, model misbehavior, provider count. - Client-disconnect handling: dropped. Most competitors' source and docs say nothing about it, so the row would be mostly ND. A server that drops a closed stream is normal framework behavior, not something a competitor's docs state. - Recorded timing replay: dropped. I could not verify the MockServer and WireMock cells from their docs, and Streaming physics already covers timing. ### Per-cell evidence (checked 2026-10-20) Competitor sources are the repos listed in `scripts/update-competitive-matrix.ts`, at the default-branch HEAD on that date: VidaiMock `e61b8ba`, mock-llm `aeb04d6`, piyook/llm-mock `9e7a3ce`, mokksy/ai-mocks `fc70777`, MockServer `c892f58`. The homepage table has an HTML comment on each new row with a short evidence note. **Native model catalogs** - aimock: Gemini `GET /v1beta/models` list and detail are native by default. Anthropic `/v1/models/{id}` detail is native by default. The Anthropic list on shared `/v1/models` needs `modelCatalog: "native"`. See `/claude-messages#model-catalog` and `/gemini#model-catalog`. - MSW: has no LLM endpoints. It is marked ✗, the same as the Embeddings and Image rows. - VidaiMock: `src/server.rs` registers `GET /v1/models`, `/v1beta/models` and `/v1beta/openai/models` on `models_handler`. (Its Anthropic `GET /v1/models/{model_action}` route is never registered, because the Gemini `POST /v1/models/{model_action}` route claims the path first.) In `src/handlers.rs`, `models_handler` always returns the OpenAI list shape: `{"object":"list","data":[{"id","object":"model","created","owned_by":"vidai"}]}`. So its Gemini catalog route is not in native format, and there is no Anthropic catalog. - mock-llm: the README's default config ships one OpenAI-format `/v1/models` rule (`{"object":"list","data":[{"id":"gpt-5.2",...}]}`). There is no Anthropic or Gemini catalog. - piyook/llm-mock: the README's "Available endpoints" lists only chat completions, `/v1/messages` and `/v1/embeddings`. `src/api/` has only `completions` and `embeddings`. - mokksy/ai-mocks: `MockAnthropic` exposes only `messages()` (`POST /v1/messages`), and `MockGemini` exposes only `generateContent` and `generateContentStream`. The repo has no models route (code search for `v1/models` finds nothing). - MockServer: the `httpLlmResponse` supported-provider path table (mock-server.com `llm_response_mocking.html`) has no models route. `docs/code/llm-mocking.md` names `GET /v1/models` only as proxied traffic that gets no telemetry. - WireMock: has no LLM-specific docs (`wiremock.org/docs/solutions/ai/` is about using AI to write stubs). It is ND, the same as WireMock's other LLM-endpoint cells. **Token-count endpoints** - aimock: Anthropic `POST /v1/messages/count_tokens` and Gemini `:countTokens` estimate tokens from the translated request. See `/claude-messages#token-counts` and `/gemini#token-counts`. - VidaiMock: `config/providers/gemini_count_tokens.yaml` matches `^/v1(beta)?/models/[^:]+:countTokens$`. Its template `config/templates/gemini/count_tokens.json.j2` always returns `"totalTokens": 9`. There is no Anthropic `count_tokens` provider config. - mock-llm and mokksy/ai-mocks: GitHub code search for `count_tokens` (mock-llm) and `countTokens` (mokksy) finds nothing. Neither README or API has a count route. - piyook/llm-mock: `src/api/` has only `completions` and `embeddings`, and the endpoint list has no count route. - MockServer: `docs/code/llm-mocking.md` names Anthropic `/v1/messages/count_tokens` only as unaccounted proxied traffic. There is no `httpLlmResponse` for it. - MSW ✗ and WireMock ND, for the same reasons as the catalog row. **Native 401 auth errors** - aimock: opt-in `policy.authErrors: "native"` returns Anthropic `authentication_error` and Gemini `UNAUTHENTICATED` bodies. See `/claude-messages#authentication-errors` and `/gemini#authentication-errors`. - VidaiMock ✓: the README lists `X-Mock-Status` and `?chaos_status=` overrides that return "real provider error envelopes". `config/templates/anthropic/error.json.j2` maps 401 to `authentication_error`. `config/templates/gemini/error.json.j2` maps 401 to `UNAUTHENTICATED`. - piyook/llm-mock partial: chaos `status` accepts any status from 400 to 599. `src/utilities/chaos.ts` types every status except 429/529 (Claude) or 429/503 (Gemini) as `api_error` or `INTERNAL`. So a 401 is not typed `authentication_error` or `UNAUTHENTICATED`. The README also says "LLMock has no authentication". - mock-llm manual: the README example is a hand-written rule that returns an OpenAI `invalid_api_key` 401. - mokksy/ai-mocks manual: `AbstractBuildingStep.respondsError` lets you set any status and body. - MockServer partial: the LLM chaos `errorStatus` accepts 401. With no `errorKind`, `LlmErrorBodies.kindForStatus` (`mockserver-core/src/main/java/org/mockserver/llm/LlmErrorBodies.java`) maps every status except 429 and 529 to `SERVER_ERROR`. So a 401 gets the provider envelope typed `api_error` or `INTERNAL`, not `authentication_error` or `UNAUTHENTICATED`. This is the same behavior as piyook. - MSW and WireMock manual: both are generic HTTP stubs with any status and body. ### Weekly scanner compatibility No `FEATURE_RULES` entry or migration variant names the new rows, so the Monday scan never reads or writes them. The `GET /v1/models` rule stays row-less. Its keyword (`/v1/models`) would match any OpenAI models endpoint, which is not what the catalog row compares. A new test, `hand-reviewed homepage rows with no scan rule` in `competitive-matrix-homepage.test.ts`, checks four things: - every new label is on the homepage; - no rule or migration variant names a new label; - when every competitor matches every rule, the homepage keeps every new-row cell; - when every rule matches, each scanned migration page keeps its new rows. I mutation-tested it: adding `"Token-count endpoints"` as a migration variant fails 4 of its tests. `docs-matrix-legend.test.ts`: the homepage ND count goes from 45 to 47, because of the two WireMock ND cells. Dry run (`npx tsx scripts/update-competitive-matrix.ts --dry-run`, with a GitHub token), before and after the change: ``` before: Parsed 41 capability rows, 8 competitor columns. after: Parsed 44 capability rows, 8 competitor columns. both: No homepage matrix changes detected. 1 migration page row(s) to check by hand: mock-llm / Azure OpenAI (combined-row) [pre-existing] 12 row-less detection(s) to check by hand [identical list] ``` The only difference is the row count. No change is proposed to the new rows or anywhere else. ## Checks - `prettier --check .`, `eslint .` and `tsdown` build: pass. - The docs and competitive-matrix tests (`docs-*`, `competitive-matrix*`, `mcp-fakes-doc-samples`): 13 files, 530 tests, all pass. - Full `vitest run`: 17610 passed. One test failed: a timing assertion in `chaos-fal-single-roll.test.ts`. That file only measures chaos latency, and this PR does not change it. It passes when run alone (4/4). - Local Playwright CLI screenshots, at 375x667, 430x932 and 1440x900: - What's New, on this branch and on main. - The homepage matrix, on this branch and on main. - The four edited migration pages. - On phones, the homepage matrix scrolls sideways inside its wrapper, as it does on main. The new rows add no width. - What's New now fills two full grid rows. On main, the fifth card sat alone in a second row. - The "On this page" panel overlaps the quick-start card at 1440 wide. Main does the same.
jpr5
added a commit
that referenced
this pull request
Oct 21, 2026
> **DO NOT MERGE until Jordan says ship — merging publishes to npm.** > > `publish-release.yml` runs on every push to `main`. Merging this PR publishes npm > `@copilotkit/[email protected]`, the `v1.46.0` tag, the `v1` major-tag move, the GitHub Release, > the Docker images and the Slack announcement. Minor release npm/plugin **1.46.0** from `main` at 02c72c8 (#568 merged). Rebuilt on top of #563–#568. aimock-pytest keeps its own version (`pyproject.toml` unchanged); only its default aimock pin moves to 1.46.0, because this release adds server routes the pytest client can call. Every new behavior is additive or opt-in. The CHANGELOG has no `Changed` section. Defaults match v1.45.1: inbound-auth 401 bodies stay legacy (#566), non-streaming replies stay instant (#567), and shared `GET /v1/models` returns the OpenAI-format list for every header set (#568). The only default output changes are the bug fixes under Fixed. ## CHANGELOG ## [1.46.0] - 2026-10-20 ### Added - Gemini model list/detail, Anthropic model detail, and token-count routes (#542, #551) - Opt-in policies: `requiredHeaders`, native `authErrors`, native `modelCatalog` (#542, #566, #568) - Opt-in fixture `nonStreamingTiming: true` delays non-streaming OpenAI chat replies (#545, #567) - Anthropic/Bedrock cache usage kept in replay and record; Responses `phase` override (#531, #542) ### Fixed - Ollama embed batches, AG-UI thread/run IDs, empty MCP reads, Anthropic aborts (#533, #553, #557) ## What the bullets cover The `[Unreleased]` section had 16 entries, grouped into the 5 Slack-bound bullets above: - **Model routes (#542, #551):** Gemini `GET /v1beta/models` list/detail and the new `GET /v1/models/{id}` detail route, with provider paging and synthetic metadata; `count_tokens` / `:countTokens` estimates that never proxy or record. Anthropic `after_id`/`before_id` cursor validation applies only to the opt-in Anthropic list. - **Opt-in policies (#542, #566, #568):** all are off by default. Set them with the `policy` option, `llm.policy`, `--policy`, or the `X-AIMock-Policy` header. - `requiredHeaders: "enforce"` rejects Anthropic requests without `anthropic-version`. - `authErrors: "native"` returns provider-native 401 bodies on Anthropic Messages/count and Gemini/Vertex HTTP paths. The default `"legacy"` keeps `error.code: "invalid_api_key"`. - `modelCatalog: "native"` returns the Anthropic-format paged list on shared `GET /v1/models` for `anthropic-version` or `x-api-key`-only requests. The default `"legacy"` returns the 1.45 OpenAI-format list for every request. Anthropic SDK `models.list()` users must opt in. - **Opt-in non-streaming timing (#545, #561, #567):** OpenAI chat completions with `stream: false` only. A fixture with `nonStreamingTiming: true` plus a `streamingProfile` or `recordedTimings` delays the JSON reply by about its streamed duration (text, tool-call, combined content+tool-call and `blocks`). Without the field, `stream: false` replies return immediately, as in 1.45.1. - **Cache usage, phase (#531, #542):** Anthropic Messages and Bedrock Claude preserve fixture cache usage (with the TTL breakdown) in replay and record; Responses `phase` override (`commentary` | `final_answer`) on HTTP, SSE and WebSocket. - **Fixes (#533, #553, #557):** these are the only default output changes. Each one corrects output that real clients mishandled before. - Ollama `/api/embed` returns `embeddings: [[...]]` with one vector per input, and its errors are plain strings. Recorded embedding fixtures get optional `match.embeddingRequest` criteria. `/api/embeddings` keeps its legacy single-vector response. - AG-UI convenience builders echo the request's thread/run IDs and mint fresh message/tool-call IDs. Explicit event fixtures keep their authored IDs. - MCP `resources/read` for a resource with no content returns `"text": ""` and falls back to the definition's `mimeType`, so the response passes the MCP schema. - Anthropic Messages streaming stops on client disconnect. The journal records `interrupted: true` / `interruptReason: "client aborted"`. Left out of the bullets: the Bedrock SDK `NodeHttpHandler` example fix (#553, docs only). Not in the CHANGELOG: drift-sync, drift diagnostics, competitor-scan, adoption-wall, dependency and docs PRs (#532, #534, #535, #536, #541, #543, #546, #554, #555, #556, #558, #559, #560, #563, #564, #565). They do not change the published package. ## Versions | Surface | Before | After | |---|---|---| | `package.json` `version` | 1.45.1 | 1.46.0 | | `.claude-plugin/plugin.json` `version` | 1.45.1 | 1.46.0 | | `.claude-plugin/marketplace.json` `plugins[0].source.version` | ^1.45.1 | ^1.46.0 | | `charts/aimock/Chart.yaml` `appVersion` (chart `version` unchanged) | 1.45.1 | 1.46.0 | | `docs/index.html` CLI banner | aimock v1.45.1 | aimock v1.46.0 | | `packages/aimock-pytest/src/aimock_pytest/_version.py` `AIMOCK_VERSION` | 1.45.1 | 1.46.0 | | `packages/aimock-pytest/README.md` `--aimock-version` default | 1.45.1 | 1.46.0 | Left at 1.45.1 on purpose: CHANGELOG history; `src/__tests__/package-types-compat.test.ts`, which compiles a consumer against the published 1.45.1 types; and the `server.test.ts` comment that names the 1.45.1 default timing. `packages/aimock-pytest/pyproject.toml` keeps its own version. `CHANGELOG.md`: `[Unreleased]` became `[1.46.0] - 2026-10-20` with an empty `[Unreleased]` kept above it, as in prior releases. `package.json` `description` matches the README subtitle exactly (`publish-release.yml` re-syncs it on merge anyway). ## Local gates Run on the release commit tree (origin/main 02c72c8 + this commit): - `pnpm install --frozen-lockfile`: pass - `pnpm format:check`: pass - `pnpm lint`: pass - `pnpm typecheck`: pass - `pnpm build`: pass - `pnpm test`: pass (432 files; 17605 passed, 11 skipped), including `npm-publish-verify-workflow`, `unreleased-check-workflow`, `release-workflows`, `publish-pin-workflow`, `version` and `package-types-compat` - `pnpm test:exports` (publint + attw): pass - `pnpm api:report`: pass, 14 entries, `etc/` unchanged - `commitlint` on the release commit: pass - `unreleased-check.yml`: no `v1.46.0` tag exists, so the release push skips the check (by design)
AmaoLearning
pushed a commit
to AmaoLearning/aimock
that referenced
this pull request
Oct 21, 2026
CopilotKit#542 made the shared GET /v1/models list return the Anthropic catalog when a request sends anthropic-version, or x-api-key without Authorization. v1.45.1 returned the OpenAI list for every header set and ignored list query parameters. Anthropic SDK clients, and any client that authenticates with x-api-key alone, got a different body shape, and Anthropic cursor/limit validation could return 400. The list route now returns the 1.45 OpenAI list by default. The Anthropic list is opt-in with the new policy key modelCatalog=legacy|native (programmatic policy, llm.policy, --policy on both CLIs, or the X-AIMock-Policy header), with the same parser and precedence as authErrors. The new GET /v1/models/{id} detail route and the Gemini catalog routes keep their request-based selection. The legacy anthropic-signal-* goldens return to their pre-CopilotKit#542 bytes, and anthropic-native-* goldens keep the opted-in bytes. The models drift servers opt in to native, so the drift receipts do not change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Centralizes duplicated response construction in shared usage/policy/error owners; allocated bytes/journals/transports/native exceptions stay intact. Preserves Anthropic cache usage through serving/recording conversions, completes native model/count/auth routes, and adds opt-in required-header policy.
Required-header policy defaults off. Config/JS/CLI
--policy requiredHeaders=enforce/request policy header share resolver; local policy headers stay local. Native error serialization and four enforced missing-version envelopes’ correlated IDs are preserved. Owners cover allocated usage/common body/policy; provider envelopes, fixture/raw bytes and state-machine errors retain their contracts.Local proof and what it establishes
Literal outputs use real servers/installed SDKs/recording-loaders/local upstreams/built binaries. Adoption RED lacks import-bound ownership while behavior/captures pass; GREEN closes ownership. Skips/additions disclosed. Multicell claims retain pre/post values for≥3affected cells, not just matched errors. No vendor/dashboard-cell counts.
matched:falseremains for distinct IDs. No fresh vendor call or published-candidate parity claim.Tracked proofs are in
src/__tests__: response cache/model/count/auth/header/CLI/egress/adoption and drift tests. Public artifact links require actual final refs; workstation evidence is not a public link.Retained safety-foundation corrections
Historical golden/real-HTTP/API foundation:178snapshots/14export conditions. Excerpts qualify unchanged inputs only, including intended rejection GREEN and ordinary pass GREEN.
Freshness bypass: export an interface and regenerate reports without committing them; run the workflow's comparison step as a labeled pull request.
Committed-change authorization: export an interface, build, regenerate and commit the changed reports; run the workflow comparison against the same recorded PR base with no label.
Controls passed: fresh unchanged unlabeled PR, fresh labeled report changes, and fresh push; label removal, missing/invalid base, stale labeled reports and stale push reject. Comment-only report changes pass. Retained independent workflow verification repeated the relevant event/label matrix.
Late handler rejection: the real mounted handler returned HTTP 200 while its invocation remained pending, then rejected 100 ms after capture. Both runs used the identical temporary reproduction and this command:
The diagnostic failure is expected GREEN for error detection; its completed-handler control passes. The foundation proof recorded the permanent direct-call suite passing 65/65, including real HTTP completion, late rejection and bounded unfinished-handler cleanup cases.
Feature and consumer proof excerpts
1. Cache serving and recording. Original 43-case pre-edit run; expanded final 49-case suite retains the original requests and adds delta/no-cache controls.
2. Bedrock cache deltas, same expanded repro. Actual AWS event-stream delta requests; six missing-cache failures before the private delta correction.
3. Cache sanitizer. Retained cache-value correction proof; controls remain passing.
4. Own-key cache values. Retained own-key contract correction; complements actual serving/recording proof.
5. Native model catalogs, final same-suite repro. Actual source HTTP and installed SDK consumers; exact final suite rerun on baseline/candidate sources.
6. Catalog colon IDs. Focused pre-edit ID repro is retained inside the broader final suite; counts and filtered skips differ.
7. Token counts and native auth, same 42-case repro. Actual HTTP/SDK requests; count routes returned 404 and native auth used the legacy body before correction.
8. Actual drift artifact transport. Same collector/request/case values; final suite adds transport/parser controls.
9. Native drift workflow coverage. Real collector artifacts; outer exit1 retains the deliberately unavailable AG-UI leg.
10. Public policy warnings. Real LLMock/createServer surfaces; filtered real-entry-point repro, not fake handlers.
11. Required-header enforcement. Real source/direct-route requests; thirteen failing checks and seven passing controls before enforcement.
12. Config and built CLI policy. Same filtered config/actual rebuilt-bin repro; separate full 48-case policy suite is retained.
13. Actual upstream policy-header exclusion. Record-mode HTTP against a controlled real local upstream; ordinary forwarding and strict exclusion preserved.
14. Packed ESM/CJS policy compatibility. Actual npm pack/tar and tsc consumers; old-contract compiler passes in both phases, policy compiler changes exit2 to exit0.
15. API-report optional policy contract. Same artifact assertions on actual generated API reports; generator freshness and compatibility remain separate.
16. CI native activation. Authenticated receipts activated; comparisons still failed on request_id before the separately measured correction. This is activation GREEN, not parity/CI GREEN.
17. Required-header request-ID correlation. Same four fresh source HTTP cases replay the same frozen authenticated receipts, with zero vendor calls; exact matched=false retained.
18. Chat/Anthropic/Bedrock usage ownership. 150 actual baseline comparisons pass in both phases; two owner gaps close.
19. Responses usage/finish ownership. Same final 195-case suite; 192 actual capture/value cases remain unchanged.
20. Gemini/Interactions usage ownership. 366 actual HTTP/SSE cases and saved captures remain byte-identical.
21. Other HTTP/event-stream usage ownership. 288 real-surface preservation cases remain passing.
22. Recorder usage collapse ownership. Real recording/collapse preservation plus import-bound ownership.
23. Realtime WS usage ownership. 44 actual GA WebSocket cases remain passing; retired beta-shape behavior remains unchanged.
24. Common chat policy/error ownership. 192 real-surface checks remain passing; two owner gaps close.
25. Messages policy/error ownership. 60 actual runtime checks remain passing.
26. Responses HTTP/WS policy/error ownership. 24 actual runtime cases and 63 saved captures remain identical.
27. Converse/Cohere/Ollama policy/error ownership. The accepted original pre-edit RED has three bound-owner failures and128 actual runtime passes. Five additional pre-edit native501 cases form133 runtime cases/141 retained captures. The final same136-case command closes the remaining serializer-owner counts. Journal Host is replaced with a placeholder under a bounded accepted transport-evidence exception: these captures do not prove Host value/presence preservation. Actual response status/headers/body/frames, strict overrides and other target journal fields remain qualified. The fixed-Host experiment is rejected and contributes no accepted proof.
28. Media/video policy/error ownership. One actual HTTP matrix plus nine structural owner obligations; ownership failures are not nine vendor-cell failures.
29. Audio policy/error ownership. 125 actual runtime controls remain passing; six owner gaps close after the shared error prerequisite.
30. Additional common error ownership. Six owner assertions cover twenty allocated sites; real baseline was already passing.
31. Optional error metadata owner, real HTTP. Focused actual server proof; filtered skips are explicit.
32. Typed shared error owner, real HTTP. Focused actual server proof; typed pure-contract and capability confirmations are additional proof, not vendor cells.
33. Nine common-body consumer adoptions. Same unfiltered test and eighteen actual source HTTP captures; nine owner assertions close.
34. Veo/OpenRouter video body ownership. Seven actual cases in one equivalence test plus five owner checks; journal Host/source and proxy/native controls preserved.
35. Fal body ownership. Final typed same-suite counterfactual supplements genuine original pre-edit RED; thirteen actual cases pass in both phases.
36. Video wrapper body ownership. Final typed same-suite counterfactual supplements original pre-edit RED; actual journal/body controls preserved.
37. Chaos body ownership. Three real cells retain values; two exact owner gaps close. Unwritable behavior uses retained source/existing-suite proof.
38. Vector body ownership, final same-input test. Two owner assertions close; five actual/control tests pass before and after. Ten actual matrix cells and existing controls are separately retained.
39. Vector test cleanup preserves primary failure. Controlled actual null400 with injected teardown failure: GREEN deliberately still exits1 while preserving the primary failure and awaiting both closes.
40. WS drift routing destinations. Same three actual exported-collector inputs; only builderFile/functions change, all other serialized fields identical. Ordinary usage mappings preserved.
41. Final registry metadata ownership. Three metadata assertions change RED to GREEN; 260 passing controls include 119 actual HTTP controls. No three-API-cell improvement claim.
Observation-completeness sensitivity
Before adding the maintained check, removing either new producer emit call left its real native cohort passing but persisted only fifteen records. On the changed test, the same effective omission is rejected, and restoration passes. These literal changed-test result lines are sensitivity evidence; deliberately faulty mutants are expected failures, not release failures:
Checkpoint validation and remaining holds
Feature-one checkpoint
cc37b030ec09db87004114ea382c38150f5e8ba4passed the full local suite: 399 files, 15,122 passing tests and three disclosed skips. Build/types/exports/API/LSP gates are retained. Its six corpus suites/298 cases are bound to that same full run, with all 178 capture files unchanged; no duplicate runtime is claimed.Historical feature2 a7cbb835/tree0ab0d3d includes accepted discovery correction.403files/15,340PASS/9skip; API/3types/exports/configuredLSP29PASS. Inferred ES2020 vs actual ES2022 LSP mismatch resolved, no product change.
Observation discovery correction. The ordinary producer uses real createServer/fetch instead of the golden import, preserving native404 and matched/mismatch observations. Intentional filters no longer narrow golden discovery. Scanner/guard/harness/observation gates are unchanged; this accepted one-file leaf is folded.
Own pre-edit RED on signed feature-two parent
293b03635b3f40c68e4bf009549ab9d674c6c0a6; SAME actual two-test command GREEN on signed one-file candidate1711488dea982a1cb64edb916b27963442cc5df6(tree0ab0d3d0cef068033e2c92af35ee05058a20b082). Only output destinations differ:All180 capture hashes/files stay unchanged; read-only corpus21files/1,025checks passes. Seven persisted HTTP observations match pre/post except generatedAt; the unchanged oracle is404 /
{error:{message:"Not found",type:"not_found"}}. No route change, vendor call, provider-cell improvement or strict-guard relaxation is claimed. Independent zero-mandatory local proof was accepted and folded into passing feature two, without aggregate/final readiness.Locally accepted test corrections on the third feature checkpoint
CLI envelope correction. Five config/fresh-built CLI checks retain complete policy400 status/body/message and require correlated body
request_idand responsex-request-id. Requests/precedence/default-off/strict/production/four binary hashes are unchanged. Own RED5db728ab→same real GREENfd53de2a:Five real cases preserve status/body/request headers and add correlation without stripping fields;49 raw-ID controls pass. Test-only local source/probe zero; no serving fix/provider-cell claim. Aggregate qualification separate.
Executable samples. Six policy snippets join the prior nine registry entries without changing the universal guard. Four real cases execute all six via exported API/config/both built CLIs, checking enforce/off/precedence/full errors/ID correlation. Localized imports/ports/fixtures retain displayed policy arguments. Same-parent guard RED→af88c5b4 GREEN:
One registry/guard defect closed; six snippets exercised, not six failed cells.17→21 adds4 real cases. Production/docs/old registry/guard unchanged; test-only local source/probe zero. Aggregate gate separate.
Two-leaf RED6/59→GREEN69 adds4 docs tests. e8c95301/tree2697471b preserves1,111inputs/180captures/787outputs/JS-CJS-maps/4CLI hashes; declaration/setup faults excluded.68733c72 left idle failure:406filesPASS/1FAIL;15456PASS/1FAIL/9skip. Unchanged case twice/file43; identical full retry407files/15457PASS/9skip. Failed run retained; no causal/timing/concurrency fix. Tree104aaaf7 is historical, not final CI.
Bounded DRY preparation
The scoped DRY sweep classifies44message envelopes/158nonobject error flows/8message-free objects, zero unclassified; all130frozen hashes,33registry rows/import-reference obligations match. Compatibility wrappers forward to owners; native/protocol and raw/data flows retain their obligations. No exact callable-body duplicate touches an owner. This narrow fingerprint is not semantic equivalence or full P0.
Historical tree104aaaf7 DRY: production diff empty vs accepted freeze;130/130 production hashes/33-row registry unchanged. Five whole-tree deltas:2 inherited workflows+3 accepted test fixes. Pre-adoption limitation retained; not aggregate/final P0 proof.
Title-only019091c5→73758c8c retains tree104aaaf7/authorship/tests/runtime; featurescc37b030/a7cbb835/68733c72 unchanged. No final R2 code credit.
Historical full checkpoints: cache399files/15,122PASS/3skip; catalog403/15,340/9; headers407/15,457/9 on disclosed unchanged retry. Guard/observer/collector396PASS/6opt-in skips;3types/build/exports/LSP140PASS. API reports unchanged. Corpus coverage reuses those full-suite logs.
Pre-review packed consumers report zero findings and 3/3 PASS over 823 unchanged emitted files and 530 capture hashes. Nine inherited runtime grants retain their limits. Later isolated proof acceptance is separate from final combined code confirmation and quality.
Recorded review corrections
Tier3 Round1 is fully received: 101 packets across seven roles. Its seven corrections were composed in the immutable review candidate. Round2 retains unchanged valid reviews and identifies four mandatory groups: filesystem identity, retry ordering, required native strings and array coverage.
Messages correction — composed, final confirmation pending. Signed950f265d/two files stores the chosen ID in request/response headers before journaling. Five real controls cover supplied/trimmed/absent/invalid/empty input; native status/body/error/default paths stay unchanged.
The own real public-handler Node HTTP proof precedes production edits and uses the same eight actual inputs/assertions after the change (only the artifact directory relocates):
Actual absent/invalid/empty cases gain correlated body/response/journal IDs; supplied input gains its response header. Minted IDs may differ while native core values and input IDs stay preserved. Four server controls and 237 scoped checks, three types, fresh build/LSP/format/lint/hooks qualify the isolated proof. It is composed in the review candidate; final serving and hosted CI remain separate.
R1 corrections composed in the review candidate
Historical isolated candidates descend from immutable review HEAD; independent HTTP/API/collector/native audits accepted seven evidence packets. Later composition/review/CI are separate.
46. Malformed count text. Actual source-CLI HTTP original16+supplemental10: five malformed500→native400,21controls preserved. Same55-case suite5FAIL/50PASS→55PASS; header49/530capture hashes retained. Numeric/coercible primitives/tool-history formula unchanged; no broad schema claim. Two files; types/build/LSP/hooks qualify the candidate, not final composition.
47. Historical output-alias candidate. Same frozen collector writes: default/explicit/normalized aliases overwrite/delete critical report;3RED→3GREEN,338PASS/0skip. Reject before either leg/stale cleanup; report bytes conserved. Collector+test only; no vendor/provider-cell claim.
48. Historical stale-sidecar candidate. Same control/startup-failure driver creates real prior sidecar; remove it before early failure, retaining primary exit1, ShapeDiff bytes/both invocation receipts. Maintained3RED→3GREEN;336PASS. Alias validation precedes cleanup;2files/no broader hardening/conformance.
49. API deletion freshness. Real build/API Extractor removes two stale Jest reports after the same temporary export removal. One-line HEAD operand changes false0→expected1/existing diagnostic. Clean14pass; changed/new reports reject. Package/index/report/dist mutations restore; label/compatibility policy unchanged. One workflow file; hostedCI unmeasured.
The registry correction attributes parsed nonusage differences while preserving raw values. Numeric/coercible primitives and tool-history counts keep their approved contract. Internal wording and legacy own-key retention remain separate debt. Alternate Google count versions and inherited conversion limitations do not expand this implementation scope.
50. Remediation routing. Signed1a0f9eb9/two files: actual collector parses the standing SDK refusal (
choices[0].message.refusal, null versus absent) and routes to completion/message owners rather than usage codec. Full input/scenario/provider/count/quarantine/timeout/other fields stay conserved. Own RED→same frozen-selector GREEN:335skips are selection only. Isolated collector535/remediation119/types/hooksPASS; strict-private replay retains56records. Metadata/report value, not provider cells/vendor acquisition. Historical review HEAD; later joint gates separate.
Composed review candidate and current boundary
All seven R1 proofs are accepted and composed at signed
5c64063b106a27e8fcdb81349384d8a6c5d5cdb1, tree4ead6290b08a73c257286c5e3124c739d3b88b39. Bounded P0 measured 767 tests plus three packed consumers, three types/build/API14/exports/navigation. Collector order retains resolved output paths → collision rejection → stale sidecar cleanup → test legs. These pre-R2 gates do not qualify the later union or establish convergence.Isolated R1 estimated767 was not combinedPASS; sealed native identity/controls/evidence and joint8-file source/control/types/build/API/exports/output qualification remained separate from hostedCI/convergence.
The routing proof uses a retained historical reporter-format input through the actual exported collector. Original acquisition files are unavailable, so it does not independently authenticate vendor acquisition/current parity. Its other55 cases are generated supplementary controls, not real provider discrepancies; mixed entries may legitimately name functions across files. These limits survive proof acceptance and composition preparation.
51.Native CIed2a02d3/workflow032aea36:test-drift.yml only. Schedule/freshBASE/cacheactivation checked; strict receipts allow only approved default missing-version divergence. Raw reports/observations, enforced warnings and unexpected critical/infra failures retained. Current confirmation below.
Actual original RED precedes the workflow edit, using unchanged producers and frozen authenticated receipts through real local aimock/TLS replay, with zero vendor calls:
A later frozen job-isolated wrapper restages the ORIGINAL pre-edit packets and only their own HEAD invocation. The exact original workflow is rerun RED; final workflow GREEN uses the SAME four input hashes and wrapper. Actual consumer exits1→0; the verifier wrapper exits0 in BOTH phases because it checks each expected disposition. Its exit0 alone is not delivery GREEN.
Six keys are not cells. All24final controls retain intentional raw2/effective0 and blocking unexpected critical/enforced-warning/quarantine/timeout/AG-UI/raw1/5/6. Missing/duplicate/extra-field/wrong-body/status receipts reject. Cache Node/named-step guards run locally; numeric run-ID sensitivity is not authenticated remote-run/cache success. Packets without selected-run ID reject; raw hashes unchanged.
Historical formatter/Bash19/DELTA types/actionlint(no shellcheck/pyflakes)PASS; full SC2086 retained. Hooks keep tested bytes; superseded commits excluded. Processes/listeners/configs/TLS/aliases removed; inert configs archived. Cleanup/YAML/mixed-invocation/cache-loader/heredoc faults nonqualifying. Current AG-UI16assertions, not historical pin. No freshvendor/completepreflight/authenticatedremote-cache/whole-shellfallback/wholeworkflow/pairedCI proof.
PR542/APIlabel present;27commits at43bdb/161881 retain original19prefix/3features and citation20th a0abb. At9a72:P0/audit/177harnessPASS/0skip each20/26;3types81PASS reused(676TS unchanged); historical1f2fourfile388 retained. Public/3consumers/models unchanged;workflow/docs policy changed; generic literals strict. Historical UNIT_PENDING_CI/notCLEAN/noA9GREEN and48FAIL/17,171PASS/220SKIP retained. Historical9a72CI:33SUCCESS/1FAIL/2SKIP; Node20/22/24/26 units each427files/17,430PASS/15SKIP. Drift38655633414 blocked:4passed contexts unavailable, observations absent;4enforced comparisons passed but rawHTTP/nativeidentity/conformance UNVERIFIABLE. 43P0/prepush/8roles0mandatory;CI34SUCCESS/2expectedSKIP. Units427files/17430PASS/15skip each:20/22attempt2,24/26carried1. Attempt1:20cancelled/22failed after same totals+unhandledonTaskUpdateRPC;ONE --failed rerun,same source. No merge.
API manualPASS(base68;148inputs unchanged);labelpresent.43DriftPASS:4native400/strings;29advisory/0block.
Historical unavailableAG-UI outer1/native proof differs from current realAG-UI. Frozen authenticated replay checks local shape/correlation, not freshconformance; vendorIDs differ despite accepted policy shape. Non-native auth drift retained. Unwritablevector:source/existing-suite, not newwire. Deferred
[object Object]cleanup diagnostic:both closes awaited, primary rethrown, cleanupfailure stillfails; no leak/falseGREEN observed. No blanket zero findings.Historical joint:5files/783PASS/0skip;5retained-packet consumer cases pass raw/effective/shell oracles. Shipping holds above.
R2 corrections — accepted isolated evidence, final composition held
All four mandatory groups have accepted isolated evidence. The new proofs below do not establish final combined code acceptance or CI.
52. Count array rejection coverage. Unchanged production already rejects arrays. The old suite survived the exact mutant; new cases kill it and pass against restored production. The old109 totals below are literal reporter JSON fields, not invented stdout. Four actual200/400 witness pairs cover both direct routes and strict modes; ten named failures cover all five inner paths in both modes. This is coverage value, not ten production cells flipped.
53.Physical artifact aliases resolved before cleanup/tests.3frozen real cases:output symlink,parent symlink/startup,absent outputs under parent aliases. One artifact-channel defect,not provider cells. Contiguous result fields omit private argv/cwd without output rewrite; original navigation-retention limits remain.
54. Physical parent alias. Same-basename casefolded parents are compared without listing. Original3GREEN and real0300 nonlisting/distinct-hardlink controls are retained. Maintained1FAIL+2PASS→3PASS; full401/zero skips, three types/fresh navigation/format/lint/signed hooks qualify the leaf. No general basename/race/security claim.
55. Required native strings. Enforced receipts require message and applicable request-ID strings; differing valid strings retain matched:false. Classifier0 maps invalid fields to effective1/unchanged consumer1. Frozen packets/fresh same-inputHTTP/legitimate positives qualify. No production handler was observed returning null; this is latent consumer validation, not a production-cell flip.
56. Native retry. Disposition precedes retry within each actual attempt. Conditional offline C1 replay uses retained authenticated receipts/unchanged producers/currentAG-UI; freshvendor0, no wholeCI/hostedcache/finalpairedCI. Only930b5refrozen calibration qualifies; earlier locale/filter/UTF8setup failures remain excluded. REDwaits45.522/45.521s; unexpected-critical45.351/45.352s. Verifier/collector/consumer exits differ; attempts/requests are not cells/parity.
Shipping holds above; no merge.
R3 permission-premise correction — accepted evidence, code confirmation held
57. Permission capability. Only the existing test row changes. Own UID0 RED precedes edits; the identical Docker image/argv/environment returns an explicit unsupported-premise SKIP after the fix. SKIP is not permissionPASS;400other name-filtered tests remain excluded. Selected verbatim output lines:
UID0 hardlinks stay active; UID501 retains EACCES/known-name/schema/separate-inode checks, hardlinks and zero-skip401. Linux22/native26 are local, notCI.359f/tree078f keeps tested bytes;fb51 gets no hookcredit, recovered359f normalhooks. Evidence is not source/R4/HEAD/P0/CI acceptance; no futureleafproof was invented.
Description/evidence validation, before → after (same local document check; serving evidence reused):
Accepted leaf-alias evidence — code/CI confirmation held
59. Case-variant leaves. One artifact defect/four existing-absent short/255-byte states, not provider cells. Own4RED preceded edits;4regressionRED preceded production fix. Same frozenCLI/fixture/seed/environment and measured physicalparents:
Actual RED, aliasdiagnostic GREEN and preserved existing-report summary:
Regression RED/GREEN/full405 (401filtered exclusions; full zero skips):
Actual same-parent UID501 nonlisting values (mode192=0300):
Seeds/absent pairs unchanged; no startup/probe residue.5controls keep collector2/schemas/criticaldetail:ordinary,case-sensitive short/255byte,hardlinks,UID501/0300/EACCES. Absent Slack0:not-found/empty,not detailPASS. Prior source/symlink/parent proofs reused.3types/scopedquality/LSP/hooks/chronology/cleanup qualify bce51/69b/e355 bytes; no wholeCI/newvendor. Current gates above.
Both real consumers exit0:
Same frozen CLI/physical parents; critical schemas. Symlink row: shorter TMPDIR, same volume. UUID row: reporter-only change;405PASS+1capabilitySKIP+separate rowPASS. R4/R5 qualified above; shipping holds remain.
RED main output was overwritten by observations; Slack lost detail:
Same held CLI/parent GREEN rejects before collection:
Shared non-ASCII prefix/ASCII-case alias; ordinary/case-sensitive schema and critical-detail controls conserved. Offline; Bounded R6/P3 zero; finalquality/pre-push/history/HEAD/CI pending.
64.Required-header snapshots — local confirmation accepted.
Only2 snapshots add correlated response-header IDs; production unchanged. Same real HTTP compare before/after supported2-file native capture:
192 are name-filtered, not executed. Preservation248PASS/0skip. No behavior-cell, combined-quality or CI claim.
65.Workflow checkout fixtures — local confirmation accepted.
One test file stages real workflow bytes and expects the observations upload. Same real Ruby/Bash command, existing non-LLM external-command fixtures:
GREEN25PASS/0skip; no production-cell, vendor or whole-CI claim.
Own Ruby encoding RED1:
Same preserved campaign GREEN0:
19 purposes; messages/authors/dates/normal hooks retained,14valid commits preserved. Final CI must pass at the eventual pushed HEAD, including the actual citation commit.
Actual #542; unchanged technical wording/1491other files/original19SHAs. FinalHEADCI pending.
Sentinel local RED exit1:
Total: 1 findings (0 critical, 1 high); same-action GREEN exit0:Total: 0 findings (0 critical, 0 high). Real producer→gate: four enforced pass; old-title packet rejected; raw2/effective0.Joint3typesPASS; final-HEADCI pending.
Node20, local:
385PASS/0skip each on Node20/26;201/171 name-filtered. FinalCI pending.
Artifact selection RED1:
actual_invocation_metadata_selected=false→same GREEN0:actual_invocation_metadata_selected=true; frozen real JSONs. Selection only, not hosted/native/producer success.Fixture literal repair, local:
Same realHTTP RED→GREEN; native3wire values unchanged, no serving flip. Finalsource/CI pending.
No serving flip.
AG-UI unavailable/collector1 both; no fullcollector/vendorGREEN.
Four retained HTTP policies:22 new keys qualify;6 prior keys remain. Raw gate output:
Local1→0;5rawentries/12critical unchanged;13controlsPASS. Not hosted/final43CI.