Skip to content

fix: align handoff/review behavior with refreshed docs - #279

Merged
Ruari-Phipps merged 2 commits into
mainfrom
ruari/docs/update_install_route
Aug 26, 2026
Merged

fix: align handoff/review behavior with refreshed docs#279
Ruari-Phipps merged 2 commits into
mainfrom
ruari/docs/update_install_route

Conversation

@Ruari-Phipps

@Ruari-Phipps Ruari-Phipps commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two small code fixes discovered while writing the resource and CLI reference docs, so behavior matches what's now documented. Stacked on #278 — this PR's diff is just the files below once that one merges.

Motivation

Auditing handoffs.md and reference/cli/review.md against source surfaced two spots where actual behavior didn't match what a reasonable reading of the docs (or the --json contract documented elsewhere in the CLI reference) would expect.

Changes

  • src/poly/resources/handoff.py: omit sip_headers from the serialized YAML when empty instead of always writing it out, matching its documented optional status
  • src/poly/cli_commands/review.py: poly review delete --json now returns a JSON error instead of falling through to an interactive checkbox prompt when no gist ID is given, consistent with the "--json requires explicit flags" pattern documented for other commands
  • src/poly/tests/github_api_test.py: updated the one test that encoded the old (interactive-fallback) behavior to assert the new error-and-return behavior instead; the existing "gist ID + --json" success-path test was unaffected

Test strategy

  • Added/updated unit tests
  • Manual CLI testing (poly <command>)
  • Tested against a live Agent Studio project
  • N/A (docs, config, or trivial change)

Checklist

  • ruff check . and ruff format --check . pass
  • pytest passes
  • No breaking changes to the poly CLI interface (or migration path documented)
  • Commit messages follow conventional commits

Screenshots / Logs

N/A

@Ruari-Phipps
Ruari-Phipps requested review from a team as code owners August 19, 2026 13:55
@Ruari-Phipps
Ruari-Phipps force-pushed the ruari/docs/update_install_route branch from 4960231 to 68e3102 Compare August 19, 2026 13:58
@github-actions

This comment has been minimized.

Base automatically changed from ruari/docs/refresh-docs to main August 19, 2026 17:19
- Omit sip_headers from serialized handoff YAML when empty, matching
  its documented optional status
- Return a JSON error from poly review delete --json when no gist ID
  is given, instead of falling through to an interactive prompt
@Ruari-Phipps
Ruari-Phipps force-pushed the ruari/docs/update_install_route branch from 68e3102 to f7c6a69 Compare August 19, 2026 17:19
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Base (main) PR Change
75.6% 75.6% +0.0% ✅

Changed file coverage

File Coverage Change
poly/cli_commands/review.py 67.0% -0.0% ⚠️
poly/resources/handoff.py 83.2% +0.4% ✅

@Ruari-Phipps
Ruari-Phipps merged commit 3940c12 into main Aug 26, 2026
6 checks passed
@Ruari-Phipps
Ruari-Phipps deleted the ruari/docs/update_install_route branch August 26, 2026 10:51
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.

2 participants