Skip to content

Make append the default write behavior; refresh hero/logo#5

Merged
mgiovani merged 3 commits into
mainfrom
append-by-default-writes
Jul 8, 2026
Merged

Make append the default write behavior; refresh hero/logo#5
mgiovani merged 3 commits into
mainfrom
append-by-default-writes

Conversation

@mgiovani

@mgiovani mgiovani commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • upload --edit-body and --update-comment used to fully replace (PATCH) the PR/issue body or comment, destroying existing content. Real content was lost this way.
  • Appending is now the default (no flag needed) and what --edit-body/--update-comment do. --overwrite opts back into the old full-replace behavior; it's rejected when combined with --print-only/--new-comment, which don't touch existing content.
  • upload now requires at least one file — with the new default write mode, zero files previously reached the GitHub write path and appended empty markdown to a real issue/PR body.
  • --overwrite's flag-conflict validation now runs before any file/auth I/O.
  • Docs (README.md, SKILL.md) updated for the new default and note that appending is a GET-then-PATCH, not an atomic merge — concurrent uploads to the same issue/PR/comment can still race.
  • Refreshed docs/hero.png and docs/logo.png with the new blue-accented design; the new logo is a wide lockup with the wordmark baked in, so it replaces the small icon + separate <h1> title in the README header.

Breaking change: bare upload now writes to GitHub (appends to the body) instead of only printing. Callers relying on the old print-only default must pass --print-only explicitly.

Review

Ran a 10-angle parallel code review against the diff; verified and fixed the two real correctness bugs it surfaced (empty-file-list mutation, validation-ordering) and tightened the "never overwrites" doc language to acknowledge the read-then-write race. A few cleanup/architecture suggestions (clap-native --overwrite conflict declaration, de-duplicating the per-endpoint GET/append helpers) were considered and intentionally left as-is — they'd be a larger change than this PR's scope and match the file's existing per-endpoint-method convention.

Test plan

  • cargo test — 63 passed, 2 ignored (hermetic; integration tests stay #[ignore])
  • cargo clippy --all-targets — clean
  • cargo fmt -- --check — clean
  • cargo build --release
  • Manual CLI smoke test: zero files rejected at parse time; --overwrite --print-only rejected before any file/auth I/O
  • End-to-end against a scratch repo (needs GH_TOKEN): confirm default append preserves existing PR body text, --overwrite replaces it, --print-only writes nothing

mgiovani added 3 commits July 8, 2026 15:16
upload --edit-body and --update-comment used to fully replace the PR/issue
body or comment, destroying existing content. Appending is now the default
(no flag needed) and what --edit-body/--update-comment do; --overwrite opts
back into the old full-replace behavior.

Also requires at least one file and validates flag conflicts before any
network I/O, since the new default write mode made an empty file list
silently mutate a real issue/PR body.
Replace the monochrome hero/icon with the new blue-accented hero and wide
logo lockup. The lockup already contains the wordmark, so it replaces the
small square icon + separate <h1> title with a single full-width image.
@mgiovani
mgiovani merged commit 3354df0 into main Jul 8, 2026
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