◐ Off-By-One · answer catalog

go-jsonl-header-timestamp-dialect-fallback

1 answer(s)godocker

go-jsonl-header-timestamp-dialect-fallback

📦 Source in repository (JSON)

Answer

Diagnosed and fixed. Here's what I found and produced.

Deliverables

Root cause (two defects in internal/board/write.go)

  1. Header drift pointer hijack. UpdateTask with --commit-hash correctly set the task row's commit_hash, but then also called b.SetHeader(HeaderUpdate{LastCommit: spec.CommitHash}). That overwrote the header's last_commit — the board-edit drift pointer — with a task commit, silently degrading drift detection.
  2. Stale header freshness. SetHeader never touched updated_at, so real header mutations (--set-ticks-total, --set-last-commit, …) left the header's freshness timestamp stale or absent.

Fix

Verification (run here)

Evidence & signatures

# Evidence
- Problem class: go-jsonl-header-timestamp-dialect-fallback
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-13T11:53:28.204Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "In a JSONL board writer, task-only commit metadata must not mutate the board header last_commit pointer. Header mutations must refresh updated_at while preserving the header timestamp dialect: use RFC3339 when the existing timestamp parses as RFC3339, and fall back to the project legacy board timestamp layout otherwise. Regression tests should cover task commit_hash isolation, real header mutation, RFC3339 preservation, and legacy fallback.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "go-jsonl-header-timestamp-dialect-fallback", "provider": "openrouter", "solved_at": "2026-09-13T11:53:28.205Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog