Check the content envelope against envelopes the iPhone emitted #147

Merged
paulhitt merged 1 commits from test/content-envelope-vectors into main 2026-09-11 11:51:29 +00:00
paulhitt commented 2026-09-11 11:46:53 +00:00 (Migrated from gitlab.com)

Closes the Android half of flamenet-e2e#4.

The content layer had no vectors. Everything from 6.6 onward was guarded by same-code round trips: this engine encodes and parses through its own codec and would pass unchanged if it and the iPhone disagreed about every key.

content-v1.json holds 15 envelopes generated by running the iPhone's encoders. This suite parses each and asserts field-by-field, because "it did not crash" is what the old tests already proved. One case pins something easy to get wrong twice: the iPhone writes fwd as the integer 1, not true, and optBoolean does not coerce a number, so a parser reading only the boolean answers false and the message quietly stops saying it was passed on.

Separately, and the reason any of this is trustworthy: the test task did not track the vector files at all. They arrive by environment variable, Gradle does not track one as an input, so a vector could change under a build directory that already had results and the task reported UP-TO-DATE without running. Not hypothetical - that is how twenty vector tests once passed in CI for weeks without executing, on this same runner, whose build directory survives between runs. All six vector files are now declared inputs.

Proven rather than asserted: with the inputs declared, flipping men to ment in one vector turns the suite red without --rerun-tasks. Before the fix the same change left it UP-TO-DATE and green.

Full suite: 1294 tests, 0 failures. ci/lint accepts the pipeline.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

Closes the Android half of flamenet-e2e#4. The content layer had no vectors. Everything from 6.6 onward was guarded by same-code round trips: this engine encodes and parses through its own codec and would pass unchanged if it and the iPhone disagreed about every key. `content-v1.json` holds 15 envelopes generated by **running** the iPhone's encoders. This suite parses each and asserts field-by-field, because "it did not crash" is what the old tests already proved. One case pins something easy to get wrong twice: the iPhone writes `fwd` as the integer `1`, not `true`, and `optBoolean` does not coerce a number, so a parser reading only the boolean answers false and the message quietly stops saying it was passed on. **Separately, and the reason any of this is trustworthy:** the test task did not track the vector files at all. They arrive by environment variable, Gradle does not track one as an input, so a vector could change under a build directory that already had results and the task reported `UP-TO-DATE` without running. Not hypothetical - that is how twenty vector tests once passed in CI for weeks without executing, on this same runner, whose build directory survives between runs. All six vector files are now declared inputs. **Proven rather than asserted:** with the inputs declared, flipping `men` to `ment` in one vector turns the suite red *without* `--rerun-tasks`. Before the fix the same change left it `UP-TO-DATE` and green. Full suite: **1294 tests, 0 failures.** `ci/lint` accepts the pipeline. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
paulhitt commented 2026-09-11 11:51:29 +00:00 (Migrated from gitlab.com)

mentioned in commit fcc81a678a

mentioned in commit fcc81a678a8523ba76c08d40db12f8a72856f748
paulhitt (Migrated from gitlab.com) merged commit fcc81a678a into main 2026-09-11 11:51:29 +00:00
Sign in to join this conversation.