| name | crawl-verify |
| description | Verify determinism of a crawl by running it twice with the same seed and comparing artifacts. Use after implementing or modifying frontier, fetch, or artifact code. |
| version | 0.1.0 |
| user-invocable | true |
| allowed-tools | Bash(cargo *) Read Grep Glob |
| argument-hint | [seed] [url-list-file] |
Crawl Determinism Verification
Run a crawl twice with the same seed and verify byte-identical output.
Procedure
-
Parse arguments: seed from $0 (default: 42), URL list from $1 (default: use test fixtures).
-
Run A: Execute the crawl with the given seed. Store artifacts in a temp directory run_a/.
-
Run B: Execute the exact same crawl with the same seed. Store in run_b/.
-
Compare:
- Artifact count must match
- Every artifact hash in run_a must exist in run_b
- Frontier traversal order must be identical (compare ordering logs)
- Execution envelopes must be identical (except wall clock — logical clock must match)
-
Report:
Crawl Determinism Report
========================
Seed: {seed}
URLs: {count}
Run A artifacts: {count} ({total_bytes})
Run B artifacts: {count} ({total_bytes})
Hash match: {pass/fail}
Order match: {pass/fail}
Envelope match: {pass/fail}
Verdict: DETERMINISTIC / NON-DETERMINISTIC
If non-deterministic, diff the first divergence point and identify which Law was violated.