Skip to content

The Siri test stops claiming determinism the design never promised - #43

Merged
ninjudd merged 1 commit into
mainfrom
fix/siri-determinism-claim
Aug 7, 2026
Merged

ninjudd merged 1 commit into
mainfrom
fix/siri-determinism-claim

Conversation

@ninjudd

@ninjudd ninjudd commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

The recurring CI flake, fixed by deleting the assertion that was wrong
rather than retrying it.

What was happening

voice: Siri renders with the system voice asserted two consecutive
renders were byte-identical. It failed on #31 and again on #41 — two
days apart, both on changes that cannot touch audio rendering (a layout
migration and a label rename), with genuinely different hashes, while
passing on demand locally.

Why it is a false assertion, not a flake

Siri omits -v and takes the machine's Spoken Content voice. The
design already accepts that those bytes follow a Settings toggle — the
recorded price of making the best voices reachable from a recipe. A
system voice that may be fetched or warmed on first use is precisely
what we said we would not promise bytes for. So the assertion took a
true statement about Samantha and made a false one about Siri.

The determinism contract is covered where it actually holds: the
nameable-voice test immediately above, which has never flaked. This test
keeps what the escape hatch guarantees — no -v, audio out of both
renders.

Why not retry or skip

A retry annotation keeps a wrong claim in the suite and pays a rerun for
it every few days; a CI-only skip keeps the claim while hiding the
evidence against it. Both treat the symptom of a test asserting more
than the system does.

build-graph.md now records the weaker guarantee, so the next person to
wonder why Siri is exempt finds the reason rather than the flake.


Note

Low Risk
Test and documentation only; no change to the say generator or caching behavior.

Overview
Removes the byte-identical assertion from the voice: Siri integration test and documents why Siri is outside the nameable-voice determinism contract.

The test still runs two renders and checks both produce non-trivial audio (the escape hatch: no -v, speech out). Determinism stays covered by the Samantha case above, which has not flaked on CI.

build-graph.md now states explicitly that Siri is weaker than same-machine reproducibility: back-to-back renders can differ when the system voice is not already warmed or fetched—observed twice on CI—while nameable voices remain the determinism claim.

Reviewed by Cursor Bugbot for commit 485bc5f. Configure here.

ninjudd added a commit that referenced this pull request Aug 7, 2026
The two repositories swap names. This one — the CLI, build graph, and
engine — becomes `field`. The sibling songs repository that exercises it
becomes `bloom`.

## Mechanical

Package `name` and `bin`, the `field` CLI, `FIELD_*` environment
variables, `bloom_aced` → `field_aced` (directory and `pyproject.toml`),
the native audiod strings, and `.gitignore`.

## Two format changes travel with the name

A tool called `field` looking for `bloom.yaml` would now name a
*different repository*, so:

- the project manifest is `field.yaml`, and its version key is `field:
1`
- the build cache moves from `.bloom/out/` to `.field/out/`

The songs repository migrates in the same flag-day: okamnesiac/bloom#1.

## The docs needed judgment, not a find-replace

"field" was already the common noun throughout these docs — "the
recipe's `model:` field", "no second field to disagree with", "a bytes
field" — *and* the name of the sibling project — "field's creek", "field
migrated the same day".

Only the **29 project-meaning uses** became "bloom". Every schema-field
use is untouched, and `src/` had no project references at all (all 66 of
its "field" hits are the noun).

Some lines carried both meanings at once. `docs/projects/all/effects.md`
§66 was:

> `input:` field to the same shape (breaking; field is the only project

and now reads:

> `input:` field to the same shape (breaking; bloom is the only project

## Verification

`pnpm typecheck` clean; `pnpm test` — 278 passed, 23 skipped, 25 files.

## Sequencing

This lands against current `main`. Open PR #43 and the unmerged local
branches will conflict with it and rebase afterward, one at a time.

The GitHub repository renames are a separate 3-step shuffle (no two
repos can hold the name `field` at once) and happen outside this PR.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Large cross-cutting rename touches every CLI path, manifest discovery,
cache layout, and IPC/socket paths—existing Bloom projects and branches
must migrate in sync with the songs repo flag-day; mis-sequenced deploys
would break `field check`/`field build` until manifests and cache dirs
are updated.
> 
> **Overview**
> This PR **renames the engine and CLI from Bloom to Field** across the
repo: package/bin `field`, docs prose, native `field-audiod`, Python
`field-aced` / `field_aced`, and `FIELD_*` env vars (including
SuperCollider `FIELD_OUTPUT`, `FIELD_SEED`, etc.). The sibling songs
exercise repo is referred to as **bloom** in docs where it used to say
"field" as the project name.
> 
> **On-disk contract changes** (flag-day with the songs repo): project
manifest **`field.yaml`** with version key `field: 1` (replacing
`bloom.yaml` / `bloom:`), and unversioned state under **`.field/`**
(cache, `out/`, recording transactions, daemon sockets, logs) instead of
`.bloom/`. `.gitignore` tracks `.field/`.
> 
> User-facing strings and examples now use `field` commands (`field
init`, `field build`, `field play`, `field generate`, …). No new
features—behavior is the same aside from names and paths.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
e64c3fe. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---

The GitHub repository renames are done: `okamnesiac/field` is this tool,
`okamnesiac/bloom` is the songs project.
ninjudd added a commit that referenced this pull request Aug 7, 2026
Written after measuring rather than guessing. The whole suite was run on
Linux in a container at 3e03322: 9 tests of 301 failed, all of them
shelling out to a macOS binary — `say` (6) and `afconvert` (3). Typecheck
and build pass unchanged. Two things that looked platform-bound are not:
the SuperCollider tests skip on missing sclang and have never run on
macOS CI either, and the daemon tests skip on a missing binary.

The decisions worth arguing about, all recorded with what lost:

`normalize` stops shelling out and does the conversion in TypeScript,
where the mixer and the DSP already live. Swapping in ffmpeg or sox
would port in an afternoon and keep the defect: afconvert is an
OS-versioned binary inside the meaning of a cache key, so a macOS update
could change a resampler under a stable key — the hazard accepted
narrowly for `voice: Siri` in #43, here load-bearing for every rate
conversion in the graph. In-house means bit-identical across machines
and platforms, which is a stronger claim than Bloom can make today.
Priced: rule_version bumps and normalized outputs re-render once.

The daemon ports behind `#if JUCE_MAC` rather than an abstraction —
exactly two CoreAudio listeners are macOS-only, and fourteen lines do
not earn a HardwareWatcher interface.

`say` does not port and is not made to; it retires when a real voice
library arrives.

CI splits by what a test needs, and can split before any of this lands,
which is what makes the rest affordable.

Two open questions I would not decide unilaterally: the filter quality
target (and what a test asserts about it), and whether bit-depth
reduction dithers — TPDF dither is random, which collides with the
determinism this plan exists for, so it is either no dither or a seeded
one with the seed in the action key.
The `voice: Siri` test asserted two consecutive renders were
byte-identical. That failed twice on CI in two days (#31, #41), both
times on changes that cannot touch audio, with genuinely different
hashes — and passes every time on a machine where the voice is long
installed.

That is not flakiness to retry around; it is a false assertion. `Siri`
selects the machine's Spoken Content voice, which the design already
accepts may be fetched, warmed, or changed by a Settings toggle — the
recorded price of reaching the best voices from a recipe. A system voice
that can be materialized on first use is exactly the thing we said we
would not promise bytes for, so asserting stability made a true
statement about Samantha into a false one about Siri.

The test keeps what the escape hatch actually guarantees: no `-v`, and
audio out of both renders. The determinism contract stays covered where
it holds — the nameable-voice test directly above, which has never
flaked. build-graph.md records the weaker guarantee and why.

Retrying or CI-skipping would have kept a wrong claim in the suite and
spent a rerun on it every few days.
@ninjudd
ninjudd force-pushed the fix/siri-determinism-claim branch from 485bc5f to 6f92a56 Compare August 7, 2026 06:55
@ninjudd
ninjudd merged commit d3615db into main Aug 7, 2026
1 check passed
@ninjudd
ninjudd deleted the fix/siri-determinism-claim branch September 28, 2026 04:11
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