You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8ab0aa8
Browse filesBrowse the repository at this point in the historyBrowse files
fix(tests): tie the write, harden and publish effects to one temp path
Review was right that `startsWith("harden:")` only claims something was
hardened, not that it was this file: three unrelated effects would satisfy it.
The suggested `toContain(\`harden:${path}\`)` cannot work, though — hardening
never lands on the destination. Both writers harden the temp and then publish it
(`io.write(tmp) -> io.harden(tmp) -> io.rename(tmp, target)`), because the point
of the sequence is to put an already-restricted file in place. Asserting the
destination turns all four cases red.
So the temp path is read back out of the recorded `temp:` effect and used to
anchor the other two, which is what makes the assertion a claim about this
file's bytes reaching this destination hardened.
0 commit comments