Problem
canon/digest.go has zero test coverage. Digest() and PipelineDigest() are critical for deterministic command fingerprinting — if these produce non-deterministic hashes, doom-loop detection and event deduplication break silently.
Acceptance Criteria
Hints
- File:
canon/digest.go
- Functions:
Digest(cmd Command) string, PipelineDigest(p Pipeline) string
- Types in
canon/types.go: Command, Pipeline, Segment, ChainOp
- Digest uses SHA-256, truncated to 16 hex chars
- Create test file:
canon/digest_test.go
Generated by /forge fill
Problem
canon/digest.gohas zero test coverage.Digest()andPipelineDigest()are critical for deterministic command fingerprinting — if these produce non-deterministic hashes, doom-loop detection and event deduplication break silently.Acceptance Criteria
Digest()produces identical hashes for semantically equivalent commands (same tool/action/flags/args in different order)Digest()produces different hashes for different commandsPipelineDigest()produces identical hashes for equivalent pipelinesPipelineDigest()produces different hashes for pipelines with different operators or segmentsgo test ./canon/...Hints
canon/digest.goDigest(cmd Command) string,PipelineDigest(p Pipeline) stringcanon/types.go:Command,Pipeline,Segment,ChainOpcanon/digest_test.goGenerated by /forge fill