Skip to content

feat(drift-sync): close the classification loop — re-pin on apply, and add the exclude path - #423

Merged
jpr5 merged 1 commit into
mainfrom
drift/sync-repin-and-exclude-path
Sep 10, 2026
Merged

jpr5 merged 1 commit into
mainfrom
drift/sync-repin-and-exclude-path

Conversation

@jpr5

@jpr5 jpr5 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #422. While applying that decision by hand I hit the two reasons it had to be by hand.

The two defects

1. An approved include was never applied end-to-end. includeFamilies is membership-checksum-pinned in logic-pin.test.ts, but that file was not on drift-sync-check's gate-1 allowlist — so the sync could edit the registry and then had no way to move the pin. The edit landed, gate-2 went red on the stale pin, and the run reported gate-failed instead of ok-applied. The affordance the note advertises ("set Decision: include and the next run applies it") never worked.

2. There was no exclude path at all. parseProposalDecision recognised only include, and the only new-family writer targets includeFamilies. Decision: exclude parsed as pending, so a rejected family got re-routed to a human every run, forever. Worse, the note template offered Decision: include as the marker — following it for a rejection would file the family as one aimock mocks on the chat surface.

What this does not change

The sync still never invents a classification. The verdict is the human's hand-written Decision: line. Once that exists, applying it — and moving the pin to match — is bookkeeping, not judgement. The review the pin exists to force still happens; it just happens earlier, in the note.

Keeping the pin file narrow

Admitting logic-pin.test.ts to the allowlist would otherwise hand the sync the frozen logic too. Two independent guards prevent that:

  • updateDataFrozenPin rewrites exactly one named key's pin, and refuses (locatorMiss) on an absent, duplicated, or unrecognisable entry.
  • onlyPinsChanged re-reads the result and refuses the write unless every byte outside a pin: literal is identical.

Anything unexpected is a refusal, not a best effort: the registry is not written at all, so the half-applied state that motivated this change is unreachable. On gate failure both files revert together — reverting only the registry would leave the pin describing a membership that no longer exists, which is a lying canary rather than a rollback.

excluded joins the outcome union, counts as applied work in the commit message, and is gate-3-observable (classifying a family is precisely what stops the canary reporting it), so the live re-collect runs for it as it does for added.

Red-green

Every test was observed failing first.

  • Decision: exclude → pending, and the allowlist rejected the pin file (the two headline reds).
  • An exclude lands in excludeFamilies and not includeFamilies — asserted by section, because a bare toContain('"gpt-live"') passes either way and would not have caught a misfiled entry.
  • An approved classification re-pins in the same run, and onlyPinsChanged confirms the rewrite stayed inside pin literals.
  • A run that cannot re-pin refuses and writes no registry edit (writeRegistrySource never called).
  • Both files revert together on gate failure.
  • onlyPinsChanged mutation-proofed: move one byte outside a pin literal and the guard fails.
  • computeMembershipPin reproduces the real logic-pin.test.ts pins against the real registry, so the writer and the verifier cannot silently diverge. Mutation-proofed by dropping the sort, which reds it — otherwise every auto-re-pin would write a value that instantly reds gate-2, and the failure would read as a spurious membership change rather than an algorithm mismatch.

Three pre-existing tests changed behaviour and were updated deliberately rather than relaxed: two harnesses had to model the pin file (a harness that omits it now gets the correct refusal), and the revert assertions were strengthened to require both files.

Full suite: 183 files, 5721 tests passing. format / lint / typecheck / build clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AvkmhXVLqSSEW6FvPQHSu5

…d add the exclude path

Two defects meant a human verdict on a new model family could never be
applied mechanically, despite the note file advertising exactly that.

1. An APPROVED include was never applied end-to-end. `includeFamilies` is
   membership-checksum-pinned in logic-pin.test.ts, but that file was not on
   drift-sync-check's gate-1 allowlist, so the sync could edit the registry
   and then had no way to move the pin. The edit landed, gate-2 went red on
   the now-stale pin, and the run reported gate-failed instead of ok-applied.
   Every approval needed a human to finish it by hand.

2. There was no exclude path at all. `parseProposalDecision` recognised only
   `include`, and the sole new-family writer targets `includeFamilies`. A
   `Decision: exclude` parsed as `pending`, so a rejected family was re-routed
   to a human every single run, forever. Worse, the note template offered
   `Decision: include` as THE approval marker, so following it for a rejection
   would have filed the family as one aimock mocks on the chat surface.

The sync still never invents a classification: the verdict is the human's
hand-written `Decision:` line. Once it exists, applying it — and moving the
pin to match — is bookkeeping, not judgement.

Re-pinning is kept narrow by two independent guards, because admitting
logic-pin.test.ts to the allowlist would otherwise hand the sync the frozen
logic as well:

  - `updateDataFrozenPin` rewrites exactly ONE named key's pin and refuses
    (locatorMiss) on an absent, duplicated, or unrecognisable entry.
  - `onlyPinsChanged` re-reads the result and refuses the write unless every
    byte outside a `pin:` literal is unchanged.

Anything unexpected is a refusal, not a best effort: the registry is not
written at all, so the half-applied state (edit landed, pin stale) that
motivated this change is unreachable. On a gate failure both files revert
together — reverting one would leave the pin describing a membership that no
longer exists, which is a lying canary rather than a safe rollback.

`excluded` joins the outcome union, counts as applied work in the commit
message, and is gate-3-observable (classifying a family is exactly what stops
the canary reporting it), so the live re-collect runs for it as it does for
`added`.

Tests, all observed red first:
  - `Decision: exclude` parsed as pending; allowlist rejected the pin file.
  - exclude lands in excludeFamilies and NOT includeFamilies (asserted by
    section, since a bare substring check passes either way).
  - an approved classification re-pins in the same run, pin-only.
  - a run that cannot re-pin refuses and writes no registry edit.
  - `onlyPinsChanged` mutation-proofed: move one byte outside a pin, guard fails.
  - `computeMembershipPin` reproduces the REAL logic-pin.test.ts pins, so the
    writer and the verifier cannot silently diverge. Mutation-proofed by
    dropping the sort, which reds it.

Full suite: 183 files, 5721 tests passing.
@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@423

commit: c23c4f9

@jpr5
jpr5 merged commit 8b0485b into main Sep 10, 2026
34 checks passed
@jpr5
jpr5 deleted the drift/sync-repin-and-exclude-path branch September 10, 2026 19:19
jpr5 added a commit that referenced this pull request Sep 10, 2026
…check (#425)

## The defect

`.github/workflows/unreleased-check.yml` warns when there are commits on
`main`
since the last release tag that changed "source", counted as
`git log v<ver>..HEAD -- 'src/'`.

`src/__tests__/` lives under `src/`, so test-only and drift-harness-only
work
counted as unreleased source changes. On `main` @ `8b0485b` it warned
about 2
"source commits" (from #422 and #423) that touch only
`src/__tests__/drift/*`,
`drift-proposals/*` and `scripts/drift-sync*.ts` — none of which is in
the
published tarball (`files` is
`["dist","fixtures",".claude-plugin","skills","CHANGELOG.md"]`,
and `tsconfig.json` excludes `src/__tests__`).

It is `::warning::` with no `exit 1`, so it blocked nothing — but a
check that
fires for work that cannot be released is a check people learn to
ignore.

## The approach

The pathspec is now **derived from `package.json` "files"** rather than
hard-coded, so it cannot drift again when the published set changes:

- `dist` is a build artifact and is not in git, so it is substituted
with its
git preimage — `tsconfig.json`'s `include` roots minus its `exclude`
entries.
That is what drops `src/__tests__/`, and it follows the tsconfig rather
than
  restating it.
- every other `files` entry is a real tracked path and is used as-is.

Deriving from `files` alone was not possible (`dist` is not in git);
deriving
`src/` alone would have re-encoded the same thing that drifted. The pair
—
`files` for the literal paths, tsconfig for `dist`'s preimage — is the
only
formulation where both halves are read from the declarations that
actually
govern the tarball.

This also **widens** the check: `fixtures/`, `skills/`,
`.claude-plugin/` and
`CHANGELOG.md` all ship and were invisible to the old `src/`-only
pathspec.

An empty derived pathspec is now a hard `::error::` + `exit 1`, because
`git log -- ` with no paths silently matches *every* path.

## Red / green

**RED** — old command, current tree:

```
::warning::2 source commits on main since v1.40.0 — version has not been bumped.

Unreleased commits:
c23c4f9 feat(drift-sync): close the classification loop — re-pin on apply, and add the exclude path
68e9253 fix(drift): classify gpt-image-2.5-flare/sunburst as excludeFamilies (image modality)
```

**GREEN** — new step body, same tree:

```
Published-file pathspec:
  src/
  :(exclude)node_modules/
  :(exclude)dist/
  :(exclude)src/__tests__/
  fixtures
  .claude-plugin
  skills
  CHANGELOG.md

No unreleased published-file changes since v1.40.0.
```

**POSITIVE CONTROL** — three throwaway commits on top of the fix (a real
`src/logger.ts` change, a `skills/write-fixtures/SKILL.md` change, and
one
touching only `scripts/drift-sync.ts` +
`src/__tests__/drift/model-registry.ts`):

```
::warning::2 published-file commits on main since v1.40.0 — version has not been bumped.

Unreleased commits:
1902279 test(control): skills change
f6f310a test(control): real src change
```

It still barks at the two real ones and ignores the tests+scripts one.
Run
again with *only* the tests+scripts commit present, it reports clean.

## What would still trip it

Any commit since the tag touching `src/**` other than `src/__tests__/`,
`fixtures/`, `skills/`, `.claude-plugin/`, or `CHANGELOG.md`.

**Deliberately still does not trip it:** `package.json` itself. A
runtime
dependency bump does change the published package, but git cannot
distinguish
it from a devDependency bump, and including `package.json` would fire on
every
Renovate PR. This is unchanged from the old behaviour, not a new blind
spot.

## Tests

`src/__tests__/unreleased-check-workflow.test.ts` executes the step's
own
`run:` body under bash against synthetic git repos — 11 guards,
including the
positive controls above and the empty-pathspec refusal. Mutation-tested:
reverting the workflow to `-- 'src/'` turns 7 of the 11 red.

## Gates

`actionlint` (this file) 0 · `prettier --check .` 0 · `eslint .` 0 ·
`pnpm typecheck` 0 · `vitest run` 0 (183 files, 5686 tests) ·
`commitlint --from origin/main --to HEAD` 0.

Repo-wide `actionlint` exits 1 on 8 pre-existing info-level SC2086
findings in
other workflows — byte-identical at `8b0485b`, none in this file.
jpr5 added a commit that referenced this pull request Sep 10, 2026
…are disjoint)

Corrects a HALF-CLASSIFICATION in the previous commit. `gpt-live-1` went into
`excludeFamilies.openai` only, which silences the /models check in
models.drift.ts but NOT the realtime canary in ws-realtime.drift.ts.

936b59c settled this for the gpt-transcribe / gpt-live-transcribe pair: "the
two sets are deliberately disjoint surfaces, so both need the entry." A voice
family — and `isVoiceModelId("gpt-live-1")` is true — needs both or the half it
is missing from stays red. Observed directly: with the entry in
excludeFamilies only, detectVoiceModelDrift(["gpt-realtime","gpt-live-1"])
returned unknown = ["gpt-live-1"], the exact value ws-realtime.drift.ts asserts
is empty. With both, it returns []. A repo-wide audit now shows zero of the 21
voice families in excludeFamilies.openai missing from knownVoiceModelFamilies.

This also makes the decision note's marker a hazard rather than bookkeeping.
#423 mechanized `Decision: exclude`, but its apply half writes only
`excludeFamilies` — never `knownVoiceModelFamilies` — and ws-realtime.drift.ts
sits in the gate-3 re-collect, so a voice family marked that way applies, reds
gate-3, and reverts, every run. The marker is removed; the note now records
EXCLUDE in prose and explains why, and parseProposalDecision reads it as
`pending`. Fixing #423's apply half is noted as follow-up, not attempted here.

`gpt-live-1-mini` stays deliberately unclassified: it has not been observed,
and it is what keeps the canary's new-family negative control live — proving
the matcher reaches a voice id with no "realtime" substring, and that the new
`gpt-live-1` key does not swallow families that merely EXTEND it. The controls
in ws-realtime-canary.test.ts and logic-pin.test.ts were re-pointed at it
rather than deleted.

- voice-models.ts — `gpt-live-1` added, with the disjoint-surfaces rationale
- logic-pin.test.ts — knownVoiceModelFamilies pin re-pinned (22 -> 23, delta is
  exactly this addition); hash recomputed from the module, not pasted
- ws-realtime-canary.test.ts / logic-pin.test.ts — negative controls re-pointed
- model-registry.ts, voice-models.ts, model-family.ts — docblocks corrected
jpr5 added a commit that referenced this pull request Sep 10, 2026
#426)

## Decision: EXCLUDE

OpenAI shipped **GPT-Live-1**, a full-duplex voice model on the NEW
`v1/live/sessions` endpoint. Its model page marks Realtime as "Not
supported", so it is a **sibling** of the Realtime API, not a successor.

It never answers on `/v1/chat/completions`, and aimock implements no
`/v1/live` surface, so it can never be text-generation drift. Every
other voice/audio/realtime family in the registry is already excluded —
`gpt-realtime*`, `gpt-audio*`, `gpt-transcribe`, `gpt-live-transcribe`,
`tts-1`, `whisper-1` — and this gets the same treatment.

Classifying it now is the point: without it the nightly drift pipeline
flags `gpt-live-1` as an unclassified new family and opens a needs-human
PR, exactly as it did for the two OpenAI image families in #422.

**Mocking `/v1/live` is explicitly NOT proposed** — no demand (no open
issue; the only realtime ask closed in May), and a real mock needs a new
route, a sideband socket and full-duplex framing.

## Changes

- `model-registry.ts` — `gpt-live-1` added to `excludeFamilies.openai`'s
voice cluster, with a dated rationale comment naming the paired entry
- `voice-models.ts` — `gpt-live-1` added to `knownVoiceModelFamilies`
(the second, disjoint surface)
- `logic-pin.test.ts` — **both** membership pins re-pinned:
`excludeFamilies.openai` (46 -> 47) and `knownVoiceModelFamilies` (22 ->
23)
- `models.drift.ts` — id added to the static OpenAI `/models` wave so
the offline coverage test grades it
- `models.drift.ts` / `text-drift.test.ts` — the two assertions that
used `gpt-live-1` as the "single-digit tail stays unknown" exemplar now
use the still-unclassified `gpt-live-9`, plus `gpt-live-1-mini` to prove
the new exclude key does not swallow families that merely EXTEND it
- `ws-realtime-canary.test.ts` / `logic-pin.test.ts` / `model-family.ts`
— canary negative controls and docblocks re-pointed at `gpt-live-1-mini`
- `drift-proposals/openai-gpt-live-1-new-family.md` — decision recorded
in prose (no `Decision:` marker), status RESOLVED

The pin was reviewed, not chased: each sorted-membership delta printed
by the red freeze test is exactly this one addition, and each new hash
was recomputed from the module rather than pasted out of the failure
message.

## The automated `Decision: exclude` path (#423) is INCOMPLETE for voice
families — not used

#423 mechanized the `exclude` verdict (before it, `exclude` fail-closed
to `pending`). It is **not** usable here, and the reason is a real
defect worth recording:

- Its apply half writes `excludeFamilies[provider]` and re-pins that
set. It **never writes `knownVoiceModelFamilies`**.
- `isVoiceModelId("gpt-live-1")` is `true`, and `ws-realtime.drift.ts`
sits in drift-sync's **gate-3 re-collect**. A voice family present in
one set but not the other still reports `UNKNOWN_REALTIME_MODELS=` and
emits a **critical**.
- Gate-3 red reverts both edited files → `gate-failed`. The automated
path would **apply and revert, every run, forever** — while looking like
it worked.

Verified directly, against the real registry, with the entry in
`excludeFamilies` only:

```
excludeFamilies.openai has gpt-live-1  : true
knownVoiceModelFamilies has gpt-live-1 : false
UNKNOWN_REALTIME_MODELS=gpt-live-1
gate3 (ws-realtime.drift.ts re-collect): RED (critical)
```

So the decision is recorded **in prose** and applied **by hand to both
sets**, the way `936b59c` did. The note carries **no `Decision:` marker
at all** — `parseProposalDecision` on the committed note returns
`pending`, confirmed. A literal `Decision: exclude` line would be a live
hazard, not inert bookkeeping: if the exclude entry were ever removed,
the next run would re-add it to `excludeFamilies` only and wedge the job
on gate-3.

**Follow-up (not attempted here):** #423's apply half should also write
and re-pin `knownVoiceModelFamilies` when `isVoiceModelId(family)` is
true. Any future voice family marked `Decision: exclude` hits this same
wall.

## `knownVoiceModelFamilies`: ADDED — mandatory, not optional

`936b59c` — the direct precedent, and a **voice** family — settled this:

> Add both families to excludeFamilies.openai's transcribe cluster [...]
**and to knownVoiceModelFamilies' transcription group. The two sets are
deliberately disjoint surfaces, so both need the entry.**

`c4582e5` did not touch `knownVoiceModelFamilies` only because image
families are not voice. `gpt-live-1` is. The two sets silence two
different canaries — `excludeFamilies` → the `/models` check in
`models.drift.ts`; `knownVoiceModelFamilies` → the realtime canary in
`ws-realtime.drift.ts` — so a voice family needs both.

**Gate-3 proof after the fix**, plus a repo-wide half-classification
audit:

```
excludeFamilies.openai has gpt-live-1  : true
knownVoiceModelFamilies has gpt-live-1 : true
UNKNOWN_REALTIME_MODELS=
gate3 (ws-realtime.drift.ts re-collect): GREEN — no critical for gpt-live-1
voice families in excludeFamilies.openai: 21
HALF-CLASSIFIED (exclude but not known-voice): []
```

## `gpt-live-1-mini` stays deliberately unclassified

Only `gpt-live-1` was decided. `gpt-live-1-mini` has not been observed
in a live listing; it exists in this repo solely as the realtime
canary's **new-family negative control**. Leaving it unclassified keeps
that control live — it is what still proves the matcher reaches a voice
id carrying no `realtime` substring, and that the new `gpt-live-1` key
does not swallow families that merely EXTEND it. The controls in
`ws-realtime-canary.test.ts` and `logic-pin.test.ts` were **re-pointed
at it, not deleted**.

## Red-green

**1. Offline classification coverage** (`models.drift.ts`) — id added to
the wave, not yet classified:

```
FAIL  src/__tests__/drift/models.drift.ts > full live /models wave is fully classified (2026-07-16 drift) > OpenAI: every live family is classified (zero unclassified)
AssertionError: expected [ 'gpt-live-1' ] to deeply equal []
- []
+ [
+   "gpt-live-1",
+ ]
 Test Files  1 failed (1)
      Tests  1 failed | 24 skipped (25)
```

Green after the `excludeFamilies` entry: `Test Files 1 passed (1) /
Tests 22 passed | 3 skipped (25)`.

**2. Membership freeze** (`logic-pin.test.ts`) — red on the registry
edit:

```
FAIL  freezes excludeFamilies.openai membership
Frozen data set "excludeFamilies.openai" membership changed (now: [... "gpt-image-2.5-sunburst","gpt-live-1","gpt-live-transcribe" ...])
Expected: "f54fe5d9552e4149cb7178fce6316c702fb5f0b00293c2299dfc9f7c64e02baa"
Received: "ccf086b3e7f07b6698f0c875088bd59f1250833d4248e0d624e87c6f592e4021"
```

Green after the re-pin: `Tests 33 passed (33)`.

## Mutation

**A — delete the `excludeFamilies.openai` entry**, everything else left
in place:

```
AssertionError: expected [ 'gpt-live-1' ] to deeply equal []
      Tests  1 failed | 24 skipped (25)
```

**B — delete the `knownVoiceModelFamilies` entry** instead:

```
→ expected [ 'gpt-live-1', 'gpt-live-1-mini' ] to not include 'gpt-live-1'
→ expected false to be true
→ expected [ 'gpt-live-1', 'gpt-live-1-mini' ] to deeply equal [ 'gpt-live-1-mini' ]
⎯⎯⎯ Failed Tests 3 ⎯⎯⎯
```

Both halves go red and name `gpt-live-1` — neither guard is vacuous, and
neither set alone is sufficient. Restored: full suite green.

## Gates (raw exit codes)

| gate | exit |
| --- | --- |
| `prettier --check .` | 0 |
| `npx eslint .` | 0 |
| `pnpm typecheck` | 0 |
| `npx vitest run` | 0 — 183 files passed, **5689 tests passed** / 46
skipped |
| `npx vitest run --config vitest.config.drift.ts` | 0 — 19 files
passed, 135 tests passed / 57 skipped |

---

**Correction note:** the first commit on this branch (`6962f07`) shipped
the `excludeFamilies`-only half-classification described above, and its
CI was green — because `ws-realtime.drift.ts` is a live-gated canary
that does not run as a required PR check. `388c0b6` pairs the entry into
`knownVoiceModelFamilies` and removes the `Decision:` marker. The end
state is what this description documents.
jpr5 added a commit that referenced this pull request Sep 10, 2026
…e writer (#428)

Follow-up to #423, from a four-reviewer retrospective review (all four
NOT-APPROVED, keep merged, fix forward). Every finding below was
reproduced
against the real `model-registry.ts` / `logic-pin.test.ts` before the
fix, and
every guard was mutation-proven after it.

## 1. The gate boundary is back in the checker

Admitting `logic-pin.test.ts` to `ALLOWED_EXACT_FILES` moved the only
constraint
on the pin file out of the external gate and into the writer.
`model-registry.ts`
is allowlisted too, so the pair was sufficient to silence a frozen
surface.

**RED** — widen `isClassifiedFamily` to classify `gpt-zeta` by fiat,
then
re-paste that surface's FROZEN checksum:

```
STEP 1 — widened isClassifiedFamily, pin test exit: 1
  → Frozen classification surface "isClassifiedFamily" changed
STEP 2 — re-pasted FROZEN.isClassifiedFamily pin: 60d59a5c43f3 -> 562ab1768a80
STEP 3 — gate-2 (vitest logic-pin.test.ts) exit: 0 | Tests 33 passed (33)
VERDICT ok= true reason= ok
drift-sync-check passed: changed files are data-only, classification pins intact
```

**GREEN** — same tree, same command, after the fix:

```
VERDICT ok= false reason= pin-file-not-a-membership-repin
src/__tests__/drift/logic-pin.test.ts is on the allowlist ONLY for membership
re-pins of excludeFamilies.{openai,anthropic,gemini},
includeFamilies.{openai,anthropic,gemini}, and this diff is not one: the edit
changed something other than the membership pins it is entitled to move
```

`onlyPinsChanged` was NOT the fix — it masks every `pin:` literal,
FROZEN
checksums included, so the silenced tree reads as pin-only to it
(asserted in a
test). The predicate is a reconstruction: re-apply exactly the entitled
re-pins
to the pre-edit file and require byte equality with the post-edit file.
`drift-sync-check` gate-1b evaluates it over the git diff, keyed to
`SYNC_REPINNABLE_KEYS`; the writer evaluates it over what LANDED on
disk, keyed
to the run's own re-pins.

## 2. The wrong-key pin rewrite

`updateDataFrozenPin`'s adjacency check only matched QUOTED keys, and
three real
`DATA_FROZEN` keys are unquoted — one directly after
`"excludeFamilies.gemini"`.

**RED**, against the real pin file, target entry's own pin
unrecognisable:

```
knownVoiceModelFamilies pin BEFORE: 3897b6bd6fc370ef...
updateDataFrozenPin -> changed: true  locatorMiss: false
knownVoiceModelFamilies pin AFTER : eeeeeeeeeeeeeeee...
guard 2 onlyPinsChanged says safe: true
```

**GREEN** — entry located through the TypeScript AST, pin replaced
span-exactly
inside its own literal:

```
updateDataFrozenPin -> changed: false  locatorMiss: true
knownVoiceModelFamilies pin AFTER : 3897b6bd6fc370ef...  (unchanged)
```

The "two independent guards" claim is gone from the comments: for a
wrong-key
write it was one guard and a no-op. What is there now is one guard and
one
external gate that does not trust it.

## 3. Exclude is complete, or it does not run

`excludeFamilies` and `knownVoiceModelFamilies` are deliberately
disjoint and the
sync writes only the first.

**RED**, real files, gate-3 modelled on the real `ws-realtime.drift.ts`
computation:

```
reason= gate-failed
detail: [residual-critical-drift] UNKNOWN_REALTIME_MODELS=gpt-live — reverted
outcomes: [{"a":"excluded","f":"gpt-live"}]
revertFiles: [[model-registry.ts, logic-pin.test.ts]]
note still says Decision: exclude   -> repeats every night, forever
```

**GREEN**, both directions:

```
outcomes: [{"a":"needs-human-voice-seed-set","f":"gpt-live"}]  reverted: []
(registry untouched, gate never called, deduped note naming both surfaces)

# once a human has made the voice-models.ts half:
gate-3: ws-realtime UNKNOWN_REALTIME_MODELS=[]
reason= ok-applied | outcomes: ["excluded:gpt-live"] | reverted: []
```

The predicate keys on the voice SEED SET, not on the id's shape, and
covers
`include` as well — the canary reads the seed set, not the
classification. The
note template no longer advertises an auto-apply the sync will refuse.

## 4. Honest reporting

**RED**: `reason= needs-human | registry written? false` while
`outcomes: ["added:openai/gpt-zeta"]` and the commit body read
`- added openai/gpt-zeta`. **GREEN**: `outcomes:
["needs-human-repin:..."]`,
empty commit body, and a deduped `-pin-repin-failure.md` note.
`fix-drift.yml`'s "only ever edits `model-registry.ts`" comment is
corrected.

## Mutation proof (`if (false)` on every guard; baseline 152 passed)

| Guard | Mutated |
|---|---|
| checker gate-1b enforcement | 3 failed |
| writer post-write pin verification | 1 failed |
| `updateDataFrozenPin` entry/pin refusal | 2 failed |
| voice-seed-set routing | 1 failed |
| `verifyPinFileEdit` reconstruction | 3 failed |
| `verifyPinFileEdit` allowed-key scope | 3 failed |

A seventh branch — the `onlyPinsChanged` pre-cut — survived, so it was
demoted to
a message selector rather than kept: a guard that cannot change a
verdict is not
a guard.

## Gates

`prettier --check` 0 · `eslint .` 0 · `pnpm typecheck` 0 · `vitest run`
0
(5791 passed / 46 skipped) · `actionlint` 0 · `commitlint` 0.

Does not touch `model-registry.ts`'s family lists (owned concurrently by
the
`gpt-live-1` classification, now on main and rebased under this).
@jpr5 jpr5 mentioned this pull request Sep 11, 2026
jpr5 added a commit that referenced this pull request Sep 11, 2026
Cuts the accumulated `[Unreleased]` work. **MINOR** — a new provider
surface (BytePlus Ark video) and new endpoints, no breaking changes.

**Prepared, not merged.** `publish-release.yml` fires on push-to-main,
so merging this publishes to npm, tags `v1.41.0`, cuts the GitHub
Release, dispatches the Docker build, and posts to Slack. Merge when you
want it live.

## What ships

Only **#424** (plus its follow-up **#429**, which fixes the same
never-released BytePlus code) touches the published package. Verified
against `package.json` `files` + `tsconfig` include/exclude:

```
git log v1.40.0..origin/main --oneline -- src/ ':(exclude)src/__tests__/' fixtures/ .claude-plugin/ skills/ CHANGELOG.md
```

…returns byteplus commits only. #422, #423, #425, #426, #427, #428 touch
scripts/, .github/ and docs/ exclusively and are deliberately **not** in
the CHANGELOG.

### Added
- BytePlus Ark (Seedance) video record/replay — submit, poll and
retrieve, stored as the raw Ark task envelope
- `--provider-byteplus` flag

### Changed
- `/api/v3` chat and image requests are attributed to the `byteplus`
provider
- `aimock-pytest` pin moves to 1.41.0

### Fixed
- Startup error when a BytePlus provider base already ends in `/api/v3`

## Version surfaces — seven, all bumped

Found by grepping the tree for `1.40.0`, not from a checklist. **Zero
occurrences of the old string remain** (excluding `CHANGELOG.md`
history, `fixtures/` and `pnpm-lock.yaml`):

| File | Field | 1.40.0 → 1.41.0 |
| --- | --- | --- |
| `package.json` | `version` | ✔ |
| `charts/aimock/Chart.yaml` | `appVersion` (chart `version` stays
`0.1.0`) | ✔ |
| `.claude-plugin/plugin.json` | `version` | ✔ |
| `.claude-plugin/marketplace.json` | `plugins[0].source.version`
(`^1.41.0`) | ✔ |
| `docs/index.html` | demo banner `aimock v…` | ✔ |
| `packages/aimock-pytest/src/aimock_pytest/_version.py` |
`AIMOCK_VERSION` npm pin | ✔ |
| `packages/aimock-pytest/README.md` | `--aimock-version` default | ✔ |

`AIMOCK_VERSION` **must** move this release:
`/api/v3/contents/generations/tasks` is a new server route, so a
default-download pytest user on the 1.40.0 pin would run a server
without it. `packages/aimock-pytest/pyproject.toml` is deliberately
untouched — that package versions on its own PyPI cadence.

There is **no version constant in `src/cli.ts`** and **no
`metadata.version` in `marketplace.json`** in this tree; both surfaces
exist only in the release checklist, not in the repo.

## Drive-by: the npm description has been `<div align="center">` since
the README got a centered header

`npm view @copilotkit/[email protected] description` returns the literal
string `<div align="center">`.

Both README-subtitle extractors — the inline `node -e` in
`publish-release.yml` and `syncDescriptionFromReadme()` in
`scripts/drift-sync.ts` — skip `#`, `[`, `![` and `http` lines but not
raw HTML, so they latch onto the README's opening `<div>` wrapper
instead of the bold subtitle two lines below. Both now also skip `<`,
and `package.json.description` is synced to what the fixed extractor
yields:

> Mock infrastructure for AI application testing — point your SDK at one
local port and every provider, protocol, and service answers
deterministically.

Without this the v1.41.0 npm page ships the same broken description.

## Gates (raw exit codes, local)

| Gate | Exit |
| --- | --- |
| `prettier --check .` | 0 |
| `npx eslint .` | 0 |
| `pnpm typecheck` | 0 |
| `npx vitest run` (5794 passed, 46 skipped, 189 files) | 0 |
| `pnpm build` | 0 |
| `npx commitlint --from origin/main --to HEAD` | 0 |

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01AvkmhXVLqSSEW6FvPQHSu5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant