Skip to content

P2: shared sync check helper + PR discovery hardening#24

Merged
brdv merged 1 commit intomainfrom
p2-sync-check-helper-and-pr-limit
Feb 11, 2026
Merged

P2: shared sync check helper + PR discovery hardening#24
brdv merged 1 commit intomainfrom
p2-sync-check-helper-and-pr-limit

Conversation

@brdv
Copy link
Owner

@brdv brdv commented Feb 11, 2026

Summary

Apply P2 polish across sync/status discovery and documentation:

  • remove duplicated first-open/default-root sync-check logic,
  • harden PR discovery against silent limit truncation,
  • align docs with new submit command surface.

Changelist

  • src/stack.rs
    • Added first_open_branch_rooted_on_default helper to centralize first-open/default-root detection.
    • Added unit tests for helper behavior.
  • src/cli.rs
    • Replaced duplicated first-open/default-root logic in both status and sync planning with shared helper.
  • src/github.rs
    • Increased PR list discovery limit from 500 to 1000.
    • Added explicit guard error when returned list hits limit, preventing silent truncation assumptions.
    • Added unit test for limit guard.
  • README.md
    • Added submit to command surface.
  • USAGE.md
    • Added submit usage section and behavior details.

Validation

  • cargo fmt --all --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --all-features

@brdv brdv force-pushed the push-summary-this-run branch from a6bfd79 to 2ffa94e Compare February 11, 2026 11:59
Base automatically changed from push-summary-this-run to main February 11, 2026 12:00
@brdv brdv force-pushed the p2-sync-check-helper-and-pr-limit branch from bdb791c to b6e05b3 Compare February 11, 2026 12:00
@brdv brdv merged commit d1f2c12 into main Feb 11, 2026
1 check passed
@brdv brdv deleted the p2-sync-check-helper-and-pr-limit branch February 11, 2026 12:01
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