Repository navigation
Commit 9dd614c
authored
fix(drift): classify Gemini Nano Banana 2.1 as an image family (#499)
Gemini Nano Banana 2.1 appeared as an unclassified family in drift-sync
run 37582645525. Add its exact family to the existing image-generation
exclusions, update only that membership checksum, and guard the recorded
Gemini wave against accidental inclusion. Supersedes the pending
proposal in #496. Close #496 after this resolution PR merges.
The [official model
card](https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1?hl=en)
identifies an image-generation and conversational-editing successor to
Gemini 3.1 Flash Image. It outputs **Image and Text**. The decision
follows existing image-family policy.
## Local red-green proof
Base: `7b40b2ae738c122d6da2377641779f9d1d1480ec`.
Functional proof commit: `b0653218cd6c5e96a32a8637c3b58848106183ae`.
Current candidate: `31cdcfc1e9092538d57baf19772f4d6fed68c358` (adds only
the changelog entry; functional proof reused).
Working directory:
`/Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude`.
Input is the isolated provider-reported candidate from [source run
37582645525](https://github.com/CopilotKit/aimock/actions/runs/37582645525),
not a fabricated fixture ID. This is a local replay through the real
drift-sync selector, not a fresh HTTP/full-catalog listing or generation
request. The selector imports actual `unclassifiedFamiliesForSync` and
asserts zero unknown candidates. The same command and input execute
before and after registry changes. Native wave assertions were added
before registry changes.
Command (both revisions):
```sh
pnpm exec tsx /Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/selector-proof.ts
```
Harness:
```ts
import { readFileSync } from "node:fs";
import { strict as assert } from "node:assert";
import { unclassifiedFamiliesForSync } from "/Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude/scripts/drift-sync.ts";
const input = JSON.parse(readFileSync(new URL("./provider-listing-input.json", import.meta.url), "utf8"));
const result = unclassifiedFamiliesForSync(input, "gemini");
console.log(JSON.stringify({ source: "provider-reported ID from run 37582645525; isolated candidate replay, not fresh HTTP listing", input, unclassified: result }));
assert.deepEqual(result, []);
console.log("PASS: recorded candidate is classified by the real drift-sync selector");
```
Input:
```json
["gemini-nano-banana-2.1"]
```
RED exit 1 (before classification):
```text
{"source":"provider-reported ID from run 37582645525; isolated candidate replay, not fresh HTTP listing","input":["gemini-nano-banana-2.1"],"unclassified":["gemini-nano-banana-2.1"]}
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
+ [
+ 'gemini-nano-banana-2.1'
+ ]
- []
at assert (/Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/selector-proof.ts:7:8)
at Object.<anonymous> (/Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/selector-proof.ts:8:85)
at Module._compile (node:internal/modules/cjs/loader:1934:14)
at Object.transformer (/Users/jpr5/proj/aimock/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/register-D46fvsV_.cjs:3:1104)
at Module.load (node:internal/modules/cjs/loader:1656:32)
at Module._load (node:internal/modules/cjs/loader:1448:12)
at wrapModuleLoad (node:internal/modules/cjs/loader:261:19)
at loadCJSModuleWithModuleLoad (node:internal/modules/esm/translators:376:15)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:248:9)
at ModuleJob.run (node:internal/modules/esm/module_job:569:25) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [ 'gemini-nano-banana-2.1' ],
expected: [],
operator: 'deepStrictEqual',
diff: 'simple'
}
Node.js v26.8.1
```
GREEN exit 0 (unchanged reproduction):
```text
{"source":"provider-reported ID from run 37582645525; isolated candidate replay, not fresh HTTP listing","input":["gemini-nano-banana-2.1"],"unclassified":[]}
PASS: recorded candidate is classified by the real drift-sync selector
(node:15693) [DEP0205] DeprecationWarning: `module.register()` is deprecated. Use `module.registerHooks()` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
```
Native wave command (both revisions):
```sh
pnpm exec vitest run --config vitest.config.drift.ts src/__tests__/drift/models.drift.ts -t 'Gemini: every recorded family' --maxWorkers=1 --minWorkers=1
```
RED exit 1:
```text
RUN v3.2.4 /Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude
❯ src/__tests__/drift/models.drift.ts (25 tests | 1 failed | 24 skipped) 4ms
↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > FAIL-CLOSED: an empty live listing never proposes removal
↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > FAIL-CLOSED: a short/truncated live listing never proposes removal
↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > a healthy listing omitting a classified family flags EXACTLY that family
↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > a still-referenced deprecated family routes to human (stillReferenced: true)
↓ C4: detectDeprecatedFamilies (classified − live, fail-closed) > a healthy listing missing nothing reports zero candidates
↓ C4: checkDeprecatedFamiliesLive (infra-error short-circuit via isInfraSkip) > an infra error (401/402/403/429/5xx) is an honest SKIP, never a removal signal
↓ C4: checkDeprecatedFamiliesLive (infra-error short-circuit via isInfraSkip) > a genuine non-infra error propagates (never silently swallowed as a skip)
↓ C4: checkDeprecatedFamiliesLive (infra-error short-circuit via isInfraSkip) > an InfraError with a non-skip status (e.g. 404) still propagates
↓ C4: checkDeprecatedFamiliesLive (infra-error short-circuit via isInfraSkip) > a healthy fetch flows through to the deterministic diff
↓ C4: isFamilyStillReferenced (real source-tree ref-scan, zero-LLM) > finds a real reference (gpt-4 and gpt-4o are both referenced in src/server.ts)
↓ C4: isFamilyStillReferenced (real source-tree ref-scan, zero-LLM) > reports zero-reference for a synthetic family that appears nowhere in src/
↓ C4: isFamilyStillReferenced (real source-tree ref-scan, zero-LLM) > does not false-positive from being a strict substring of a longer live id
↓ model-family pipeline (injected /models) > incident 2: dated snapshots of included families produce ZERO drift
↓ model-family pipeline (injected /models) > a prose provider-mode token can never enter as a candidate
↓ model-family pipeline (injected /models) > a genuinely new family IS flagged as unclassified drift
↓ preview families are excluded by rule > a brand-new -preview family auto-excludes with zero registry edits
↓ preview families are excluded by rule > matches a trailing short numeric preview build tag (-preview-NN)
↓ preview families are excluded by rule > does NOT match interior -preview-<word> suffixes (they stay enumerated)
↓ gemma families are excluded by rule > a future Gemma variant auto-excludes with zero registry edits
↓ recorded /models family waves are classified > OpenAI: every live family is classified (zero unclassified)
↓ recorded /models family waves are classified > Anthropic: every live family is classified (zero unclassified)
× recorded /models family waves are classified > Gemini: every recorded family is classified (zero unclassified) 3ms
→ expected [ 'gemini-nano-banana-2.1' ] to deeply equal []
↓ OpenAI Chat model-family availability > live /models contains no unclassified family
↓ Anthropic Claude model-family availability > live /models contains no unclassified family
↓ Google Gemini model-family availability > live /models contains no unclassified family
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
FAIL src/__tests__/drift/models.drift.ts > recorded /models family waves are classified > Gemini: every recorded family is classified (zero unclassified)
AssertionError: expected [ 'gemini-nano-banana-2.1' ] to deeply equal []
- Expected
+ Received
- []
+ [
+ "gemini-nano-banana-2.1",
+ ]
❯ src/__tests__/drift/models.drift.ts:464:56
462| "gemini-pro-latest",
463| ];
464| expect(unclassifiedFamilies(geminiLive, "gemini")).toEqual([]);
| ^
465| expect(excludeFamilies.gemini.has("gemini-nano-banana-2.1")).toBe(…
466| expect(includeFamilies.gemini.has("gemini-nano-banana-2.1")).toBe(…
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed (1)
Tests 1 failed | 24 skipped (25)
Start at 09:01:42
Duration 153ms (transform 41ms, setup 0ms, collect 49ms, tests 4ms, environment 0ms, prepare 31ms)
```
GREEN exit 0:
```text
RUN v3.2.4 /Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude
✓ src/__tests__/drift/models.drift.ts (25 tests | 24 skipped) 1ms
Test Files 1 passed (1)
Tests 1 passed | 24 skipped (25)
Start at 09:02:24
Duration 132ms (transform 37ms, setup 0ms, collect 45ms, tests 1ms, environment 0ms, prepare 23ms)
```
## Targeted validation
```sh
pnpm exec vitest run src/__tests__/drift/logic-pin.test.ts src/__tests__/drift/model-family.test.ts src/__tests__/drift/model-registry.test.ts src/__tests__/drift-sync-mirror-equivalence.test.ts src/__tests__/drift-sync-core.test.ts src/__tests__/drift-sync-check.test.ts src/__tests__/drift-sync-gate-determinism.test.ts --maxWorkers=1 --minWorkers=1
```
```text
RUN v3.2.4 /Users/jpr5/.local/state/worktrees/aimock/resolve-496-r1-exclude
✓ src/__tests__/drift-sync-core.test.ts (68 tests) 274ms
✓ src/__tests__/drift-sync-mirror-equivalence.test.ts (9 tests) 45ms
✓ src/__tests__/drift-sync-check.test.ts (39 tests) 28ms
✓ src/__tests__/drift-sync-gate-determinism.test.ts (12 tests) 20ms
✓ src/__tests__/drift/logic-pin.test.ts (33 tests) 3ms
✓ src/__tests__/drift/model-registry.test.ts (14 tests) 6ms
✓ src/__tests__/drift/model-family.test.ts (5 tests) 1ms
Test Files 7 passed (7)
Tests 180 passed (180)
Start at 09:02:38
Duration 1.58s (transform 85ms, setup 0ms, collect 596ms, tests 377ms, environment 0ms, prepare 154ms)
```
Changed-file Prettier, ESLint and `git diff --check` pass. No FROZEN
logic pins, runtime serving, voice seed, release/version or unrelated
family changed. One family only; no broader cell-flip claim. Typecheck
passes after an isolated frozen-lockfile dependency install. Independent
Tier 1 review is clean across code correctness, test coverage, and
documentation/policy evidence. Full local formatting, lint, explicit
source/test/script typechecks, build, export validation, commitlint, and
whitespace gates pass. The full suite passes: 294 files, 9622 tests
passed, 1 existing skipped. The initial test run lacked built CLI
artifacts; following repository CI order, building first and replaying
the same suite passed without source changes. CI remains pending until
this replacement PR is opened and checked.
Changelog omission proof: `python3
/Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/changelog-proof.py`
failed before the entry and passed unchanged afterward.
```text
Traceback (most recent call last):
File "/Users/jpr5/.local/share/copilotkit/cr/aimock-pr496-497-20261007/pr496/fix/changelog-proof.py", line 3, in <module>
assert "gemini-nano-banana-2.1" in s, "Missing Gemini Nano Banana 2.1 disposition in Unreleased changelog"
AssertionError: Missing Gemini Nano Banana 2.1 disposition in Unreleased changelog
PASS: Unreleased documents Gemini Nano Banana exclusion and Image and Text capability
```5 files changed
Lines changed: 35 additions & 3 deletions
File tree
- drift-proposals
- src/__tests__/drift
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
404 | 407 | | |
405 | 408 | | |
406 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| 438 | + | |
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
| 465 | + | |
| 466 | + | |
464 | 467 | | |
465 | 468 | | |
466 | 469 | | |
| |||
0 commit comments