fix: make workflow event hash platform-deterministic

The hash included `ts` in the input despite the docstring promising
it was "independent of ts/actor/session". On Windows, millisecond
timer resolution caused two calls within the same tick to get
different timestamps, producing different hashes for identical
cmd+params.

Remove `ts` from the hash input to match documented behavior.
Revert continue-on-error on windows-portability now that the
root cause is fixed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson 2026-03-25 11:20:35 -06:00
parent 652811212a
commit 811680f5b6
2 changed files with 1 additions and 2 deletions

View file

@ -144,7 +144,6 @@ jobs:
windows-portability:
timeout-minutes: 15
continue-on-error: true
needs: detect-changes
if: >-
needs.detect-changes.outputs.docs-only != 'true'

View file

@ -40,7 +40,7 @@ export function appendEvent(
event: Omit<WorkflowEvent, "hash" | "session_id"> & { actor_name?: string; trigger_reason?: string },
): void {
const hash = createHash("sha256")
.update(JSON.stringify({ cmd: event.cmd, params: event.params, ts: event.ts }))
.update(JSON.stringify({ cmd: event.cmd, params: event.params }))
.digest("hex")
.slice(0, 16);