go-cli-create-schema-inherits-board-drift
Diagnosed and verified. Full solution written to /workspace/boardctl-bt059-solution.md.
(*Board).Create in internal/board/write.go built the new row by mirroring the last tasks.jsonl row's key set verbatim:
row.Keys = append(row.Keys, last.Keys...)
for _, k := range last.Keys {
row.Vals[k] = neutral(k)
}
Meanwhile validate reports against a declared canon (IsSanctionedTaskKey in keys.go). The writer used a measured set and the reporter a declared set, so any legacy drift (repo, reviewer, typos) was copied onto every new row and immediately flagged — a self-perpetuating census.
Filter the mirror source through the declared canon, keeping the row's own order. No canon widening, guarantee step untouched, census untouched:
for _, k := range last.Keys {
if !IsSanctionedTaskKey(k) {
continue
}
row.Keys = append(row.Keys, k)
row.Vals[k] = neutral(k)
}
Sanctioned extras (labels, perpetual, type, created_by, *_note) still flow; deliberate extras must be added to keys.go, not copied in.
3363874): 3 BT-059 tests fail — new row inherits repo/reviewer, census reports 2 drifted rows repo(2), reviewer(2).e50aea4/74c71d9): all 4 BT-059 tests pass; full go test ./... passes.| new-row keys | census | |
|---|---|---|
| pre-fix | id,title,status,priority,repo,reviewer,complexity,created_at,updated_at,detail |
drift 2 row(s): repo(2), reviewer(2), warns TEST-1, exit 0 |
| fixed | id,title,status,priority,complexity,created_at,updated_at,detail |
drift 1 row(s): repo(1), reviewer(1), warns LEG-1 only, exit 0 |
priority, complexity, reasoning, depends_on, capability_tags, worktree, branch, sessions) all land on the canon-clean row.# Evidence - Problem class: go-cli-create-schema-inherits-board-drift - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-24T12:25:26.925Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "PROBLEM: a CLI whose create path computes the new-row key set as (canonical create defaults UNION extras measured from the board's existing rows) inherits any legacy key drift on the very rows the tool writes - observed: create on a board whose rows carry repo:null emitted repo:null on a brand-new row, and validate then warned the new row for drift the tool itself copied in. The census becomes self-perpetuating: repairing old rows cannot reach zero drift while any legacy row exists, because new writes keep re-importing the extras. FIX: separate the two sets explicitly - intersect the mirror source (last row's key set) with the DECLARED canon (IsSanctionedTaskKey) instead of copying verbatim, keeping sanctioned keys in the row's own order (deliberate board extras like labels/perpetual stay sanctioned and still flow); keep the guarantee step that enforces required core keys; leave the census/reporting path untouched (legacy rows keep warning, exit 0). RED tests: drifted-board create emits no drift keys; clean-board create is byte-shape unchanged (pin it); census still reports exactly the legacy row; explicit fields all land.", "environment": "boardctl Go board writer (create path mirrors the last row's key set onto new rows)", "language": "go", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "go-cli-create-schema-inherits-board-drift", "provider": "openrouter", "solved_at": "2026-09-24T12:25:26.925Z", "version": "main e50aea4"}Diagnosed and verified. Full solution written to /workspace/boardctl-bt059-solution.md.
(*Board).Create in internal/board/write.go built the new row by mirroring the last tasks.jsonl row's key set verbatim:
row.Keys = append(row.Keys, last.Keys...)
for _, k := range last.Keys {
row.Vals[k] = neutral(k)
}
Meanwhile validate reports against a declared canon (IsSanctionedTaskKey in keys.go). The writer used a measured set and the reporter a declared set, so any legacy drift (repo, reviewer, typos) was copied onto every new row and immediately flagged — a self-perpetuating census.
Filter the mirror source through the declared canon, keeping the row's own order. No canon widening, guarantee step untouched, census untouched:
for _, k := range last.Keys {
if !IsSanctionedTaskKey(k) {
continue
}
row.Keys = append(row.Keys, k)
row.Vals[k] = neutral(k)
}
Sanctioned extras (labels, perpetual, type, created_by, *_note) still flow; deliberate extras must be added to keys.go, not copied in.
3363874): 3 BT-059 tests fail — new row inherits repo/reviewer, census reports 2 drifted rows repo(2), reviewer(2).e50aea4/74c71d9): all 4 BT-059 tests pass; full go test ./... passes.| new-row keys | census | |
|---|---|---|
| pre-fix | id,title,status,priority,repo,reviewer,complexity,created_at,updated_at,detail |
drift 2 row(s): repo(2), reviewer(2), warns TEST-1, exit 0 |
| fixed | id,title,status,priority,complexity,created_at,updated_at,detail |
drift 1 row(s): repo(1), reviewer(1), warns LEG-1 only, exit 0 |
priority, complexity, reasoning, depends_on, capability_tags, worktree, branch, sessions) all land on the canon-clean row.# Evidence - Problem class: go-cli-create-schema-inherits-board-drift - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-24T12:25:26.925Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "PROBLEM: a CLI whose create path computes the new-row key set as (canonical create defaults UNION extras measured from the board's existing rows) inherits any legacy key drift on the very rows the tool writes - observed: create on a board whose rows carry repo:null emitted repo:null on a brand-new row, and validate then warned the new row for drift the tool itself copied in. The census becomes self-perpetuating: repairing old rows cannot reach zero drift while any legacy row exists, because new writes keep re-importing the extras. FIX: separate the two sets explicitly - intersect the mirror source (last row's key set) with the DECLARED canon (IsSanctionedTaskKey) instead of copying verbatim, keeping sanctioned keys in the row's own order (deliberate board extras like labels/perpetual stay sanctioned and still flow); keep the guarantee step that enforces required core keys; leave the census/reporting path untouched (legacy rows keep warning, exit 0). RED tests: drifted-board create emits no drift keys; clean-board create is byte-shape unchanged (pin it); census still reports exactly the legacy row; explicit fields all land.", "environment": "boardctl Go board writer (create path mirrors the last row's key set onto new rows)", "language": "go", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "go-cli-create-schema-inherits-board-drift", "provider": "openrouter", "solved_at": "2026-09-24T12:25:26.925Z", "version": "main e50aea4"}