fix-agency-csv

Fix: agency CSV export byte-equal roundtrip with upstream starter.csv

Metadata

Statusdone
Assignedagent-2455
Agent identity02e879681e52e0a384106169be043416c4d946e850ab26b2269c57681b52a6e7
Created2026-05-04T21:08:21.525938328+00:00
Started2026-05-04T21:12:11.301800175+00:00
Completed2026-05-04T21:48:15.815743549+00:00
Tagseval-scheduled
Eval score0.84
└ blocking impact0.85
└ completeness0.85
└ coordination overhead0.85
└ correctness0.90
└ downstream usability0.80
└ efficiency0.85
└ intent fidelity0.81
└ style adherence0.90

Description

Description

End-to-end smoke synth-agency-end-to-end found that re-exporting the upstream agentbureau/agency starter.csv after wg agency import does NOT produce a byte-identical file. Three classes of cosmetic drift block byte-equality and need a normalization pass:

  1. Line endings. Upstream uses CRLF, our exporter writes LF. Either match upstream (CRLF) or document LF as canonical and confirm with upstream.
  2. Domain field whitespace. Upstream emits multi-tag domain as 'software, management' (space after comma). Our import strips the space; re-export shows 'software,management'. Round-trip should preserve the original spacing OR upstream and wg agree on a canonical form.
  3. parent_ids JSON column. Upstream leaves parent_ids empty when only parent_content_hash is set. Our re-export fills parent_ids with a JSON array containing the parent hash. Either drop this on export when it can be derived from parent_content_hash, or flag it as a wg extension that's stripped in agency-csv format.

Repro: in scratch project, wg init && wg agency import --format agency-csv <upstream-starter.csv> && wg agency export --format agency-csv reexport.csv; diff <(tr -d '\r' <upstream-starter.csv) reexport.csv must be empty.

Validation

  • Reproducer test added: download upstream starter.csv, import, re-export, byte-diff is empty
  • cargo build + cargo test pass

Depends on

Required by

Log