Skip to content

Delete dead code and unify CSV escaping - #14

Merged
ivanvyd merged 2 commits into
mainfrom
chore/deslop-and-deadcode
Aug 1, 2026
Merged

Delete dead code and unify CSV escaping#14
ivanvyd merged 2 commits into
mainfrom
chore/deslop-and-deadcode

Conversation

@ivanvyd

@ivanvyd ivanvyd commented Aug 1, 2026

Copy link
Copy Markdown
Owner

agents list --format csv reimplemented the CSV quoting rule and dropped two things the canonical writer has: null handling, and the guard against a leading =, +, - or @ being executed as a spreadsheet formula. One CSV path was defused against formula injection and the other was not — the predictable result of a second copy. Both now go through CsvWriter.EscapeField, and a test asserts the two paths agree field for field so they cannot drift again.

Removed as genuinely unreferenced (verified by grep across src/ and tests/):

  • DownloadHandleWire — the full-result download endpoints it belongs to are not implemented at all, so it modelled a response nothing can receive.
  • DatabricksProfiles.Find — public API of a shipped library that nothing calls, replaced in one line by Load().FirstOrDefault. Unused public surface is surface supported forever without ever learning whether its shape is right.

135 tests green.

ivanvyd added 2 commits August 1, 2026 10:57
agents list --format csv reimplemented the CSV quoting rule and dropped two things
the canonical writer has: null handling, and the guard against a leading =, +, -
or @ being executed as a spreadsheet formula. One CSV path was defused and the
other was not, which is the predictable result of a second copy. Both now go
through CsvWriter.EscapeField, and a test asserts the two paths agree field for
field so they cannot drift again.

Removed as genuinely unreferenced:
- DownloadHandleWire, whose full-result download endpoints are not implemented at
  all, so it modelled a response nothing can receive.
- DatabricksProfiles.Find, public API of a shipped library that nothing calls and
  that Load().FirstOrDefault replaces in one line. Unused public surface is surface
  supported forever without ever learning whether its shape is right.

135 tests green.
Both comments were mine, and both asserted a property the code does not have —
the same class of defect this project has now hit three times, which is why the
review brief targets it specifically.

GenieAuthenticationHandler claimed 'no call site handles a raw token'. AuthCommand
does exactly that, at line 47, to report the token's length. The real invariant is
narrower: this handler is the only place in the HTTP pipeline that touches a raw
token, so no request-building code can put one in a URL or a log by accident.

ExitCode.From claimed an unmapped failure kind is 'a bug to catch at compile time'.
The switch has a discard arm, which makes it exhaustive to the compiler, so a new
enum member compiles silently and CS8509 never fires. The gap is caught by
ExitCodeTests.Every_failure_kind_is_mapped in CI — the comment now says so.

Docs: CHANGELOG still said nothing had been verified live, contradicting both the
README and compatibility.md; two ROADMAP boxes described finished work; a blank
line inside compatibility.md's table would have rendered three rows as literal
pipes on GitHub; and commands.md called itself the complete reference while
omitting export and feedback — two of the eight registered commands, and two the
compatibility matrix cites as live-tested.

The pack-run row now records that one of its two answers came back as a Genie
clarifying question rather than a clean answer, which is what the evidence shows.
@ivanvyd
ivanvyd merged commit dcdfa5c into main Aug 1, 2026
10 checks passed
@ivanvyd
ivanvyd deleted the chore/deslop-and-deadcode branch August 1, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant