test(mobile): carry a SAFETY rationale on every recorder cast

main added a changed-code casting gate after this branch was cut, so 45 `as`
sites in the recorder read as new findings. Each now states why the assertion
holds; they cluster into five reasons — recorded observations are RecordedValue
by construction, parsed manifests and goldens are validated on the next lines,
interned pools resolve their own hashes, a VM-evaluated module has no static
type, and the mount adapters supply only the members each hook reads.

Re-records the goldens: the comments move recorderSha256.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
This commit is contained in:
Jinwoo-H
2026-09-13 18:50:55 -04:00
parent 26acd4b315
commit d932dab753
85 changed files with 123 additions and 80 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
+1 -1
View File
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
+1 -1
View File
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -5,7 +5,7 @@
"runnerVersion": 1,
"baseline": "aba77d5babfeb3988a8ad39a16a1bc5af86ebf80",
"lockfileSha256": "788c1234b38a61fc882fca292341fce6690deee9cc6695673b0575cf2c4cf571",
"recorderSha256": "3c40df0b10abad43b00643b48bfb6d112ba9da00cb35dc7c646f2ee48d1bd9b0",
"recorderSha256": "79b605cdc27d560fc8d76ec0ad124271c05ac4133eb63b8e8799a01e38e8bdf5",
"platform": "darwin",
"scenarioVersion": 1,
"projectionVersion": 2,
@@ -63,6 +63,7 @@ function rawReply(): Promise<unknown> {
if (plain === null) {
return
}
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: a thrown value is not an Error by type; only its constructor name and message are printed.
const frame = JSON.parse(plain) as { type?: string; id?: string }
if (frame.type === 'e2ee_authenticated') {
ws.send(
@@ -86,11 +87,14 @@ function describe(label: string, run: () => unknown): string {
const value = run()
return `${label}=${JSON.stringify(value)}`
} catch (error) {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the probe prints whatever the host sent, so the frame is read as a bag of fields.
return `${label}=THREW ${(error as Error).constructor.name}: ${(error as Error).message}`
}
}
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the probe substitutes one recorded reply for the whole client surface.
const reply = (await rawReply()) as Record<string, unknown>
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the probe substitutes one recorded reply for the whole client surface.
const client = {
sendRequest: async () => reply
} as unknown as Parameters<typeof settingsRead.request>[0]
@@ -109,6 +113,7 @@ if (reply.__outcome) {
const response = await op.request(client)
lines.push(
describe(name, () => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: each operation is driven through its own declared reply type in turn.
const outcome = op.interpret(response as never) as
| (() => unknown)
| { accepted?: boolean; value?: unknown }
@@ -66,6 +66,7 @@ export function goldenBytes(golden: GoldenRecording): string {
return `${JSON.stringify({ ...header, values: interned.values, recording: interned.recording }, null, 2)}\n`
}
export function readGolden(directory: string, id: string): GoldenRecording {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the file is validated against GoldenFile on the next lines.
const file = JSON.parse(readFileSync(goldenPath(directory, id), 'utf8')) as Partial<GoldenFile>
if (file.goldenFormatVersion !== GOLDEN_FORMAT_VERSION) {
throw new Error(
@@ -75,6 +76,7 @@ export function readGolden(directory: string, id: string): GoldenRecording {
if (!file.values || !file.recording) {
throw new Error(`Golden ${id} is missing its value pool or recording`)
}
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: goldenFormatVersion was just checked, so the pool is present.
const { values: _pool, ...header } = file as GoldenFile
return { ...header, recording: resolveRecording(file.values, file.recording) }
}
@@ -108,6 +110,7 @@ export function compareGolden(expected: GoldenRecording, actual: GoldenRecording
const { recording: _expectedRecording, ...expectedHeader } = pinned
const { recording: _actualRecording, ...actualHeader } = actual
for (const [key, value] of Object.entries(expectedHeader)) {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: header keys are compared as data, not consumed as fields.
const found = (actualHeader as Record<string, unknown>)[key]
if (JSON.stringify(found) !== JSON.stringify(value)) {
throw new Error(
@@ -158,27 +161,32 @@ function firstDifference(
}
if (Array.isArray(expected) && Array.isArray(actual)) {
const index = expected.findIndex(
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: both sides are recorded observations, so every member is a RecordedValue.
(entry, at) => canonicalJson(entry) !== canonicalJson(actual[at] as RecordedValue)
)
return index === -1 || index >= actual.length
? here
: firstDifference(
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: both sides are recorded observations, so every member is a RecordedValue.
expected[index] as RecordedValue,
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: both sides are recorded observations, so every member is a RecordedValue.
actual[index] as RecordedValue,
`${path}[${index}]`
)
}
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the array branch above already rejected a non-object pair.
const left = expected as Record<string, RecordedValue>
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the array branch above already rejected a non-object pair.
const right = actual as Record<string, RecordedValue>
const key = [...new Set([...Object.keys(left), ...Object.keys(right)])]
.sort()
.find(
(name) =>
canonicalJson(left[name] as RecordedValue) !== canonicalJson(right[name] as RecordedValue)
)
const key = [...new Set([...Object.keys(left), ...Object.keys(right)])].sort().find(
(name) =>
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: both sides are recorded observations, so every member is a RecordedValue.
canonicalJson(left[name] as RecordedValue) !== canonicalJson(right[name] as RecordedValue)
)
return key === undefined || !(key in left) || !(key in right)
? here
: firstDifference(left[key] as RecordedValue, right[key] as RecordedValue, `${path}.${key}`)
: // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: both sides are recorded observations, so every member is a RecordedValue.
firstDifference(left[key] as RecordedValue, right[key] as RecordedValue, `${path}.${key}`)
}
function excerpt(value: RecordedValue): string {
const json = JSON.stringify(value)
@@ -24,9 +24,11 @@ export function canonicalJson(value: RecordedValue): string {
if (Array.isArray(value)) {
return `[${value.map(canonicalJson).join(',')}]`
}
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: canonicalJson only reaches here for a plain object observation.
const record = value as Record<string, RecordedValue>
return `{${Object.keys(record)
.sort()
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: a recorded object holds recorded values.
.map((key) => `${JSON.stringify(key)}:${canonicalJson(record[key] as RecordedValue)}`)
.join(',')}}`
}
@@ -42,6 +44,7 @@ export function internRecording(recording: Recording): {
const pool: ValuePool = {}
const canonical = new Map<string, string>()
const checkpoints = recording.checkpoints.map((checkpoint) => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: every observation field is assigned below before the value is read.
const observation = {} as InternedObservation
for (const field of OBSERVATION_FIELDS) {
const value = checkpoint.observation[field]
@@ -61,6 +64,7 @@ export function internRecording(recording: Recording): {
const values = Object.fromEntries(
Object.keys(pool)
.sort()
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: pool entries are the recorded values that were interned into it.
.map((hash) => [hash, pool[hash] as RecordedValue])
)
return { values, recording: { scenario: recording.scenario, checkpoints } }
@@ -70,6 +74,7 @@ export function resolveRecording(values: ValuePool, recording: InternedRecording
return {
scenario: recording.scenario,
checkpoints: recording.checkpoints.map((checkpoint) => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: every observation field is assigned below before the value is read.
const observation = {} as Observation
for (const field of OBSERVATION_FIELDS) {
const hash = checkpoint.observation[field]
@@ -78,6 +83,7 @@ export function resolveRecording(values: ValuePool, recording: InternedRecording
`Golden value ${hash} is missing from the pool (${checkpoint.id}.${field})`
)
}
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the hash was resolved against the same pool that interned it.
observation[field] = values[hash] as RecordedValue
}
return { id: checkpoint.id, observation }
@@ -61,6 +61,7 @@ export function operationModuleLoader(root: string, mutation?: Mutation) {
(item) => item.name.text === key && !item.isTypeOnly
)
if (binding) {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the barrel target is a module this loader evaluated.
return (imported(file, name) as OperationModule)[
binding.propertyName?.text ?? String(key)
]
@@ -119,6 +120,7 @@ export function operationModuleLoader(root: string, mutation?: Mutation) {
}
return {
load: <T = OperationModule>(path: string): T =>
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: a VM-evaluated module has no static type; the caller names the shape it mounts.
load(pathFor(resolve(root, path))) as unknown as T,
assertMutationApplied: () => {
if (mutation && mutationCount !== 1) {
@@ -25,6 +25,7 @@ export function pilotMountAdapters(
let workspace = 'A'
let state: ReturnType<typeof useSearch>
const hook = hookMount(() => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the recorder supplies only the members the hook reads.
state = useSearch({ client, operations, worktreeId: workspace } as Parameters<
typeof useSearch
>[0])
@@ -92,6 +93,7 @@ export function pilotMountAdapters(
}
let actions: ReturnType<typeof useMetadata>
const hook = hookMount(() => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the recorder supplies only the members the hook reads.
actions = useMetadata(model as unknown as Parameters<typeof useMetadata>[0])
})
return {
@@ -101,6 +103,7 @@ export function pilotMountAdapters(
}
if (name === 'submit') {
return actions.mutateProjectRowMetadata(
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the scenario supplies the row as JSON, not as a typed model.
row as unknown as Parameters<typeof actions.mutateProjectRowMetadata>[0],
{ addLabels: ['recorded'] }
)
@@ -138,6 +141,7 @@ export function pilotMountAdapters(
}
}
const hook = hookMount(() => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the recorder supplies only the members the hook reads.
useDetail(model as unknown as Parameters<typeof useDetail>[0])
})
return {
@@ -198,6 +202,7 @@ export function pilotMountAdapters(
})
let actions: ReturnType<typeof usePreferences>
const hook = hookMount(() => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the recorder supplies only the members the hook reads.
actions = usePreferences(model as unknown as Parameters<typeof usePreferences>[0])
})
return {
@@ -207,6 +212,7 @@ export function pilotMountAdapters(
}
if (name === 'write') {
return actions.persistDefaultGitHubPreset(
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the preset arrives from the scenario JSON as a string.
args.preset as Parameters<typeof actions.persistDefaultGitHubPreset>[0]
)
}
@@ -150,6 +150,7 @@ describe('recording boundaries', () => {
it('pools repeated observation values and still resolves them for comparison', () => {
const golden = sampleGolden('pooled')
golden.recording.checkpoints.push({ id: 'again', observation: observation('idle') })
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the bytes were just produced by goldenBytes, so the pool is present.
const file = JSON.parse(goldenBytes(golden)) as {
values: Record<string, unknown>
recording: { checkpoints: { observation: Observation }[] }
@@ -158,6 +159,7 @@ describe('recording boundaries', () => {
expect(second!.observation).toEqual(first!.observation)
// [] is shared by three fields; {} and the state object are the other two pool entries.
expect(Object.keys(file.values)).toHaveLength(3)
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: an interned observation field is a pool hash at rest.
expect(file.values[first!.observation.state as unknown as string]).toEqual({ phase: 'idle' })
})
@@ -26,6 +26,7 @@ export function captureValue(value: unknown): RecordedValue {
}
const entries = Object.keys(value)
.sort()
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the plain-object branch above already narrowed the container.
.map((key) => [key, captureValue((value as Record<string, unknown>)[key])] as const)
return '$rpc' in value
? { $rpc: 'object', entries: entries.map(([key, entry]) => [key, entry]) }
@@ -49,6 +50,7 @@ export function captureArguments(args: readonly unknown[]): RecordedValue {
/** `code` and `cause` are recorded only when present, so an error without them keeps three fields. */
export function captureError(error: unknown, depth = 0): RecordedValue {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: code and cause are read defensively; a thrown value carries neither by type.
const detail = error as { code?: unknown; cause?: unknown }
const code = error instanceof Error ? detail.code : undefined
const cause = error instanceof Error && depth < 4 ? detail.cause : undefined
@@ -73,8 +73,10 @@ export async function runRecording(
recording.checkpoints.push({
id: step.checkpoint,
observation: {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: a structured clone of recorded requests is recorded data.
sender: structuredClone(transport.requests) as unknown as RecordedValue,
payloads: structuredClone(transport.payloads),
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: a structured clone of recorded settlements is recorded data.
settlements: structuredClone(settlements) as unknown as RecordedValue,
state: captureValue(mounted.state()),
effects: structuredClone(effects)
@@ -14,6 +14,7 @@ function decode(value: unknown): unknown {
return value
}
export function readScenarios(path: string): { baseline: string; scenarios: RecordingScenario[] } {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the manifest shape is validated on the next lines.
const input = decode(JSON.parse(readFileSync(path, 'utf8'))) as {
baseline: string
scenarios: RecordingScenario[]
@@ -38,6 +38,7 @@ export class ScriptedRpcTransport {
},
deviceToken: 'recording-device',
sendEncrypted: (value) => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the physical client publishes the frame this transport just serialized.
const payload = value as { id: string; method: string; params: unknown }
const name = this.wireNames.shift()
if (!name) {
@@ -64,6 +65,7 @@ export class ScriptedRpcTransport {
const request = {
name,
args: captureArguments(args),
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: a pending settlement has no settledAt yet.
settlement: { status: 'pending', startedAt: this.now() } as Settlement
}
this.requests.push(request)
@@ -148,8 +150,10 @@ export class ScriptedRpcTransport {
}
// Resolve the physical tracker to cancel its deadline before injecting the scripted rejection.
this.rejects.get(name)?.(error)
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the scenario asked for a null result, which is a reply shape a host can send.
this.tracker.resolve({ id: binding.id, ok: true, result: null } as RpcResponse)
} else {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the scenario supplies the reply as JSON; the wire id is the transport’s.
this.tracker.resolve({ ...(reply as object), id: binding.id } as RpcResponse)
}
}
@@ -122,6 +122,7 @@ export function settingsMountAdapters(
client: context.client,
connState: 'connected',
hostId: 'host-1',
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the recorder supplies only the members the hook reads.
state: state as unknown as Parameters<typeof useMetadata>[0]['state']
})
})
@@ -161,6 +162,7 @@ export function settingsMountAdapters(
visibleProviders: ['github']
})
const hook = hookMount(() => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the recorder supplies only the members the hook reads.
useHydration(model as unknown as Parameters<typeof useHydration>[0])
})
return {
@@ -34,6 +34,7 @@ export function workspaceSettingsMounts(
})
let state: ReturnType<typeof useSubmit>
const hook = hookMount(() => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the recorder supplies only the members the hook reads.
state = useSubmit(model as unknown as Parameters<typeof useSubmit>[0])
})
return {
@@ -85,6 +86,7 @@ export function workspaceSettingsMounts(
})
let actions: ReturnType<typeof useCreate>
const hook = hookMount(() => {
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the recorder supplies only the members the hook reads.
actions = useCreate(model as unknown as Parameters<typeof useCreate>[0])
})
return {
@@ -94,6 +96,7 @@ export function workspaceSettingsMounts(
}
if (name === 'submit') {
return actions.createWorkspace(
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the scenario supplies the action item as JSON, not as a typed model.
{ key: 'linear:1', provider: 'linear', source: { id: 'issue-1' } } as Parameters<
typeof actions.createWorkspace
>[0],