fix(pet): one whale body — reconcile the cores and make conformance pass

`portable` (Pet conformance) has never passed. It did not regress at
`a06d2296`; that is only when the workflow started running. The failure goes
back to `334c720057`, whose message claims "380 matching checkpoints across
v1/v2, with pinned v1 digests unchanged" — a gate that was not true of the
content it committed. `pet_sim.rs` is byte-identical at that commit and at
HEAD, the v1 fixtures were created there and never changed, and Rust has never
matched them.

The cause is not the simulation. `field_target` is line-for-line identical
between `pet_sim.rs` and `pet/src/core/pet-sim.ts` — every channel, every
constant — and both mulberry32 implementations agree (Rust's `u32`
`wrapping_*` is exactly `Math.imul`/`>>>`). The tape's label sequence matched
byte-for-byte all along: the two cores agreed on what the pet was doing and
disagreed on where its particles were, from frame 0.

The authored body is checked in **five** times:

    pet/whale-points.tsv                            f54c19a76021
    pet/dist/whale-points.tsv                       f54c19a76021
    pet/rs/whale-points.tsv                         f54c19a76021
    pet/public/whale-points.tsv                     f54c19a76021
    crates/tui/src/tui/ambient_life/whale-points.tsv   9e56d5280d9b

Four agree; the Rust product core — the one the TUI actually renders — was the
lone dissenter, with a different derivation of the same 980-point shape. No
sync step produces these files, so the existing `git diff --exit-code` guard on
embedded sources could never see the drift.

Rust is canonical (founder's call), so the four pet copies are synced to it and
the v1 fixtures are regenerated from the Rust binary. That makes verify.sh's
fixture check an assertion that TypeScript matches the Rust-derived contract,
rather than TypeScript agreeing with itself.

A CI step now compares the copies directly, because nothing else can: this is
five hand-maintained copies of one fact, and the drift was invisible for days.
Folding them into one generated artifact is the real fix and is left as
follow-up.

Checks: `./pet/verify.sh --no-swift` exits 0 — 380 checkpoints across 2
expression versions and 4 tapes/modes, all eight combinations PASS, up from a
hard failure on the first v1 diff. `npm --prefix pet run check` — 68 pass, 0
fail. `npm --prefix pet run sync` leaves `git diff --exit-code` on the embedded
sources clean.

Refs #6227

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01NWzjx9Q7Mw2G7K8rpiJy9p
This commit is contained in:
CodeWhale BotandClaude Opus 5 committed 2026-09-15 08:03:03 -07:00
1 parent be6b7fe8dc
commit a300b52f44
8 files changed
+3143 -3130

No files matched your search

+13
View File
@@ -35,6 +35,19 @@ jobs:
- run: npm --prefix pet run sync
- name: Embedded sources match canonical core
run: git diff --exit-code -- crates/tui/src/tui/pet_watch/pet-native.js pet/ios/Resources
# The authored body is checked in five times and nothing kept the copies
# in step, so the Rust core silently carried a different whale from every
# other surface and conformance never passed. Compare them directly: no
# sync step produces these, so `git diff` cannot catch the drift.
- name: One whale body across every surface
run: |
canonical=crates/tui/src/tui/ambient_life/whale-points.tsv
for copy in pet/whale-points.tsv pet/public/whale-points.tsv pet/rs/whale-points.tsv; do
diff -q "$canonical" "$copy" || {
echo "::error file=$copy::diverged from $canonical; the Rust core is canonical"
exit 1
}
done
- run: cargo fetch --locked --manifest-path pet/tui/Cargo.toml
- name: TypeScript and Rust parity, including reduced motion
run: ./pet/verify.sh --no-swift
File diff suppressed because it is too large. Load diff
+980 -980
View File
File diff suppressed because it is too large. Load diff
+68 -68
View File
@@ -1,68 +1,68 @@
f0000 b54565acde6f90ee reasoning
f0030 04097e8f4f3b7850 reasoning
f0060 53216929ab3e39e0 reasoning
f0090 8de1c3c8f6e9e556 reasoning
f0120 2aab642b75261762 reasoning
f0150 10b5beb9710a0112 reasoning
f0180 76f1a4304fab8584 tool
f0210 dccca5f96e29b42b tool
f0240 84bed8ee29430b4e tool
f0270 3e607046a3cc8a93 tool
f0300 a629f166568495d0 tool
f0330 3c1a5133d7d31265 code
f0360 0128538ac97346cf code
f0390 8676baf7c055851f code
f0420 abde5c9b691ed20f code
f0450 84415567b619e68d code
f0480 fb8e3299b83aa8b1 code
f0510 825e84e9376ca0e9 code
f0540 9c5a8fda1c1b8b6b filesystem
f0570 614095716670b3a9 filesystem
f0600 405fc28d590d4cba filesystem
f0630 98e8b8c53d62d482 filesystem
f0660 86ad11108c80bdd2 filesystem
f0690 da0939f2594cac5a network
f0720 d413d82bb6aeddda network
f0750 f6d9dee147d6a883 network
f0780 fcc62e09d8d15acd network
f0810 286232fe3660f857 network
f0840 9448123e3ae8c2bd error
f0870 6a97c5e2edbc20bf error
f0900 7f0a98f177c51e02 error
f0930 c734b1651946a08e code
f0960 1ec14fbcb8182843 code
f0990 9e240999650f207e code
f1020 173b06d1b8e032ac code
f1050 c53ec3708f5b2018 code
f1080 05649cde179b25b9 agent
f1110 eb05a75b6d0e4741 agent
f1140 2cc7b342c95e2a98 agent
f1170 1e21ec171abcdcf0 agent
f1200 af2fdc95bd93994e agent
f1230 a6d23dac48ed8044 agent
f1260 b52c92dbcb900aaf agent
f1290 4cabb143248f6915 agent
f1320 c778a6fe8fe9163f agent
f1350 43c52a0c208fce9d agent
f1380 47bd7db954024ba3 human
f1410 8f3cdc160565a048 human
f1440 2ac4526a6408648d human
f1470 c25afcea2fb301ea human
f1500 befa66216c6e5cd0 human
f1530 805a3ac50fe989ca human
f1560 1e4e9fc47b05eb58 human
f1590 e694d964d72a2847 reasoning
f1620 fc9e1713bc88408d reasoning
f1650 8dfbfc4742afdb7c reasoning
f1680 d715953e45589860 reasoning
f1710 2267d03497f30e60 reasoning
f1740 9dbffd6187983ad8 reasoning
f1770 33b9d68c73534448 reasoning
f1800 c0a9221671042998 reasoning
f1830 5f3ac2fbfff0ca58 reasoning
f1860 764abfe768d1c162 reasoning
f1890 d224749b8745a520 reasoning
f1920 9bd2c847023df1d6 reasoning
f1950 526143d1991d542c reasoning
f1980 c59fb3a0edef9f82 reasoning
final 33302698cb0115e6
f0000 5a99ae43a0d4bd08 reasoning
f0030 ab81f6647d8e5356 reasoning
f0060 b5982c30b7ac81bc reasoning
f0090 e063d58cc1efad72 reasoning
f0120 083f74239273cb1e reasoning
f0150 0a8640f6bdcca46e reasoning
f0180 e9d6fd5e3d19c060 tool
f0210 d4a23669ffbf601f tool
f0240 8851281536555c00 tool
f0270 7701380dfbabee74 tool
f0300 846bb33ba01fc362 tool
f0330 bcf6518ce3943479 code
f0360 9bcd80e60f09f8fd code
f0390 c329b00d409f3f75 code
f0420 3b90088ec6c4a38f code
f0450 43a6f062d0ed664f code
f0480 b2cff0e70858b47d code
f0510 19b56b6b23ca6b67 code
f0540 3c10aa2d7993832b filesystem
f0570 9373f2e49454606f filesystem
f0600 d4b19608317e5062 filesystem
f0630 38c8bd769d0d2222 filesystem
f0660 571f82787b346114 filesystem
f0690 44cd1d627ed0a450 network
f0720 780ffd17380b0eb8 network
f0750 4d8a74435f3c8d55 network
f0780 7d8f27dd92f5150b network
f0810 52b4a70905c7ab0d network
f0840 804187aa1824afe3 error
f0870 b512daf18e46bc13 error
f0900 14da08fd6d1b0df6 error
f0930 ff60f044f306c5fd code
f0960 649f34e73de5ede0 code
f0990 ff1b05a216e57947 code
f1020 8d3d9720f6ea46a2 code
f1050 a716c920aa286264 code
f1080 56b5914a0d7f7fd7 agent
f1110 8515710a2ae8be43 agent
f1140 e6101cfed5e9968a agent
f1170 eec2869b7a1e4b68 agent
f1200 52fe4800a52861e0 agent
f1230 32b28020c032fd98 agent
f1260 06d2012338eb5f25 agent
f1290 2e0e5e2dd4994bb1 agent
f1320 58106e5ef3cb9113 agent
f1350 17bcb84101a74ebd agent
f1380 6387ad7b540df965 human
f1410 9da0f1e12a12ee04 human
f1440 8139b714f6fd146b human
f1470 9b5e7917c53c7bae human
f1500 6958dee566236582 human
f1530 a0315da65afc8136 human
f1560 da97cf66be8e21fe human
f1590 114d5fc01a8ca077 reasoning
f1620 46242a8433dc327d reasoning
f1650 0b0f252ff128ba0c reasoning
f1680 9dc27d1987b1499c reasoning
f1710 d26d699cd8972f7c reasoning
f1740 2ee966f73638d2e2 reasoning
f1770 215f85df96e771ea reasoning
f1800 d68501ef84048b3c reasoning
f1830 106db8facaa065bc reasoning
f1860 748c12f75ab3054c reasoning
f1890 c0405d85512c8b64 reasoning
f1920 00b18ac814595b18 reasoning
f1950 eb20c0193f21935e reasoning
f1980 0f8969500529647e reasoning
final 1f54456417179cb2
+68 -68
View File
@@ -1,68 +1,68 @@
f0000 780037df81765cce reasoning
f0030 780037df81765cce reasoning
f0060 780037df81765cce reasoning
f0090 780037df81765cce reasoning
f0120 780037df81765cce reasoning
f0150 780037df81765cce reasoning
f0180 ae7544dfca462318 tool
f0210 be0e38d3b2987400 tool
f0240 76fa3f49d2949c80 tool
f0270 76fa3f49d2949c80 tool
f0300 76fa3f49d2949c80 tool
f0330 29e5ed2ae279e39d code
f0360 efc9334befd38ed8 code
f0390 0096ef279c3e8c25 code
f0420 0096ef279c3e8c25 code
f0450 0096ef279c3e8c25 code
f0480 0096ef279c3e8c25 code
f0510 0096ef279c3e8c25 code
f0540 405d51bf5ebdb2b7 filesystem
f0570 7658b74f068bcf7f filesystem
f0600 4c199e7ecf4125e4 filesystem
f0630 4c199e7ecf4125e4 filesystem
f0660 4c199e7ecf4125e4 filesystem
f0690 88910cf0a252c959 network
f0720 7daa3710667a333d network
f0750 5d038edcb7b1639d network
f0780 5d038edcb7b1639d network
f0810 5d038edcb7b1639d network
f0840 8f98a37a9ddd8dfa error
f0870 3741092fabbc62d8 error
f0900 271175fa5925331b error
f0930 46e7c39af7106e88 code
f0960 2b19f38e638fdf89 code
f0990 480fa756fb268092 code
f1020 480fa756fb268092 code
f1050 480fa756fb268092 code
f1080 a2d0fc42598d81bd agent
f1110 8ab70763be5c6f78 agent
f1140 953abdb84c4e9c02 agent
f1170 953abdb84c4e9c02 agent
f1200 953abdb84c4e9c02 agent
f1230 953abdb84c4e9c02 agent
f1260 b7f5c7f07a2c0d9a agent
f1290 c0cc8b6fb75c7699 agent
f1320 c0cc8b6fb75c7699 agent
f1350 c0cc8b6fb75c7699 agent
f1380 26af5ee465a8bbb4 human
f1410 1ebfceb2169ee3b9 human
f1440 c2983731662991be human
f1470 c2983731662991be human
f1500 c2983731662991be human
f1530 c2983731662991be human
f1560 c2983731662991be human
f1590 6bcaee9fdcb6a113 reasoning
f1620 e251cc1794266a1f reasoning
f1650 786cf7df81d2c1ee reasoning
f1680 786cf7df81d2c1ee reasoning
f1710 786cf7df81d2c1ee reasoning
f1740 786cf7df81d2c1ee reasoning
f1770 786cf7df81d2c1ee reasoning
f1800 786cf7df81d2c1ee reasoning
f1830 786cf7df81d2c1ee reasoning
f1860 77d0a3df814df090 reasoning
f1890 780037df81765cce reasoning
f1920 780037df81765cce reasoning
f1950 780037df81765cce reasoning
f1980 780037df81765cce reasoning
final 780037df81765cce
f0000 63ffabae642cc7ee reasoning
f0030 63ffabae642cc7ee reasoning
f0060 63ffabae642cc7ee reasoning
f0090 63ffabae642cc7ee reasoning
f0120 63ffabae642cc7ee reasoning
f0150 63ffabae642cc7ee reasoning
f0180 e0ac83dbf9ac7ef6 tool
f0210 f215b739ab284f8d tool
f0240 86ac0baac6ce5f31 tool
f0270 86ac0baac6ce5f31 tool
f0300 86ac0baac6ce5f31 tool
f0330 cdacdd0cfe55fc43 code
f0360 bddfbae0ef5ba074 code
f0390 b33ebc860e1085b5 code
f0420 b33ebc860e1085b5 code
f0450 b33ebc860e1085b5 code
f0480 b33ebc860e1085b5 code
f0510 b33ebc860e1085b5 code
f0540 33e349d57567f613 filesystem
f0570 7a3fee63b414e441 filesystem
f0600 b66d5afd5d12d61c filesystem
f0630 b66d5afd5d12d61c filesystem
f0660 b66d5afd5d12d61c filesystem
f0690 d5c17e990dbd600c network
f0720 4ab1f63bccb7c558 network
f0750 6c94fe758774b137 network
f0780 6c94fe758774b137 network
f0810 6c94fe758774b137 network
f0840 2227fdf1cbfb1300 error
f0870 7e64b0d4092aea3a error
f0900 0548391fb6774ea7 error
f0930 d9a69cd8f548d613 code
f0960 8b84ddfcac09d2fc code
f0990 d7736ba124ae137e code
f1020 d7736ba124ae137e code
f1050 d7736ba124ae137e code
f1080 f1255f733f032f51 agent
f1110 af052fa00e018254 agent
f1140 745071643f22e176 agent
f1170 745071643f22e176 agent
f1200 745071643f22e176 agent
f1230 745071643f22e176 agent
f1260 9a69cc61edf7de10 agent
f1290 ebaa5600136b9145 agent
f1320 ebaa5600136b9145 agent
f1350 ebaa5600136b9145 agent
f1380 5a1126df0d2a701c human
f1410 c1732a6fce1d2f13 human
f1440 98fcaf5ef378026e human
f1470 98fcaf5ef378026e human
f1500 98fcaf5ef378026e human
f1530 98fcaf5ef378026e human
f1560 98fcaf5ef378026e human
f1590 3c6b24429f891289 reasoning
f1620 c5cee011f9589a49 reasoning
f1650 6392ebae63d062ce reasoning
f1680 6392ebae63d062ce reasoning
f1710 6392ebae63d062ce reasoning
f1740 6392ebae63d062ce reasoning
f1770 6392ebae63d062ce reasoning
f1800 6392ebae63d062ce reasoning
f1830 6392ebae63d062ce reasoning
f1860 63d017ae64045bb0 reasoning
f1890 63ffabae642cc7ee reasoning
f1920 63ffabae642cc7ee reasoning
f1950 63ffabae642cc7ee reasoning
f1980 63ffabae642cc7ee reasoning
final 63ffabae642cc7ee
+27 -27
View File
@@ -1,27 +1,27 @@
f0000 eae73abf53557423 reasoning
f0030 d534bfd1dbc8786f tool
f0060 629ac9b36c36b618 memory
f0090 60172bca4d28371d code
f0120 da166008444f09da filesystem
f0150 fb7b03b5266a15ec network
f0180 308e0dab384b31f7 browser
f0210 d93eabab7147b4e0 communication
f0240 4a53c481622865f5 agent
f0270 c3f06b6f7caa2ffc orchestration
f0300 3e498b7d83829a1a error
f0330 20b461a6568178cd human
f0360 b99f2e55b73b7be7 other
f0390 41b1d7231005fb22 error
f0420 16c81664f485dfe8 error
f0450 f86e802dfe49c2da error
f0480 0ba904513e0880e6 error
f0510 fd7cf62e80514015 other
f0540 6697b9234ac01e7c other
f0570 bb178cad0830a369 other
f0600 2ddfda450370e340 other
f0630 6b962f31f39e00ca other
f0660 bcaf5cff3c7e7498 human
f0690 7bc0a09e8c510244 human
f0720 955129fd569cfde5 reasoning
f0750 57a0e20c82b25c0c reasoning
final 7638a24c22454490
f0000 b72012ca000f5185 reasoning
f0030 032a8fb46cf73aeb tool
f0060 e64a4f189cf81305 memory
f0090 f09683809c437a19 code
f0120 22e5b1daa103d23e filesystem
f0150 70a327a46c4cdb8c network
f0180 d2b7320fd8c04b69 browser
f0210 c68ceb1994f62094 communication
f0240 89d6bd6873632e03 agent
f0270 06ab195f760d7bee orchestration
f0300 113a7388e3252844 error
f0330 0c9ee91a67759093 human
f0360 29ef6f1287a2a257 other
f0390 7fec500c84981fd4 error
f0420 a5a3fad0072422e2 error
f0450 5d53c9c6c8696381 error
f0480 685608005260f9ae error
f0510 6ec5bdf1742638ff other
f0540 50eeed52fa7a11e2 other
f0570 15227d9451d7daab other
f0600 7386f4be62176cb6 other
f0630 9238c6aff8e7027c other
f0660 fb1c78d40aaf98a6 human
f0690 b050e4f36383dd3a human
f0720 dbfca21a94c18045 reasoning
f0750 c06f71915c61456a reasoning
final b985a82d855114bc
+27 -27
View File
@@ -1,27 +1,27 @@
f0000 dc1506da5ad8eb2f reasoning
f0030 70f06ff4ee5d7dab tool
f0060 343ac9b11a9bf8d6 memory
f0090 d7c3b70b2c896690 code
f0120 6ed23d4a28ef5bba filesystem
f0150 ba1d4ebd22134354 network
f0180 33427cddaa62f36c browser
f0210 4213bfb2d1e9a423 communication
f0240 3b723d3f0789e6e5 agent
f0270 0a83d6f1b5c72719 orchestration
f0300 48b163bf0bee6d27 error
f0330 5528cac6a9b30352 human
f0360 391642cb96c3c935 other
f0390 93ab6be31f19c075 error
f0420 93ab6be31f19c075 error
f0450 93ab6be31f19c075 error
f0480 93ab6be31f19c075 error
f0510 5d646490fcb0531d other
f0540 5d646490fcb0531d other
f0570 5d646490fcb0531d other
f0600 9a5981e38231cfc9 other
f0630 9a5981e38231cfc9 other
f0660 552564c6a9b02029 human
f0690 552564c6a9b02029 human
f0720 780037df81765cce reasoning
f0750 780037df81765cce reasoning
final 780037df81765cce
f0000 d3c1d46eca00cd5d reasoning
f0030 07b875ceb8fda6dc tool
f0060 a98155b60941363e memory
f0090 55f7910302b304d8 code
f0120 751e793ac851f15e filesystem
f0150 495c1a44be965047 network
f0180 d053cc5e99a98d1e browser
f0210 09d85d2dacae1a24 communication
f0240 2d32993f291be69d agent
f0270 3a521eb994a462b9 orchestration
f0300 dd727efb37ae3729 error
f0330 d5459527ccf733e0 human
f0360 aef8fea05b900af1 other
f0390 66dac42e583cd314 error
f0420 66dac42e583cd314 error
f0450 66dac42e583cd314 error
f0480 66dac42e583cd314 error
f0510 4f10054da7bd4fcd other
f0540 4f10054da7bd4fcd other
f0570 4f10054da7bd4fcd other
f0600 5240b62461460e39 other
f0630 5240b62461460e39 other
f0660 d54fc727ccffdd5b human
f0690 d54fc727ccffdd5b human
f0720 63ffabae642cc7ee reasoning
f0750 63ffabae642cc7ee reasoning
final 63ffabae642cc7ee
+980 -980
View File
File diff suppressed because it is too large. Load diff