Skip to content

feat(fleet-gh): ledger all pr review submit shapes (#2227 slice) - #16379

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
oc-code-01/2227-ledger-pr-review-submit
Nov 28, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
oc-code-01/2227-ledger-pr-review-submit

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

fleet gh pr review <n> (--comment | --approve | --request-changes)
  reserve shared content-ledger row (kind "review")
  run gh (capture stdout)
  finalize as created or failed

Part of #2227. Prior slices routed fleet gh issue/PR/comment creates,
pr review --comment, release create, gist create, and POST-class
api calls through the shared content ledger. This slice removes the
last deferred pr review gap: --approve/--request-changes (and the
-a/-r/-c short flags) now reserve before the call and finalize
after it, under the existing kind string review.

Why all three: gh requires exactly one of --comment/--approve/
--request-changes for any non-interactive review (cli/cli
pkg/cmd/pr/review/review.go, BoolVarP long+short pairs), so every
non-interactive pr review files a review object. A bare
pr review <n> with no submit flag is interactive-only, files nothing,
and stays unledgered.

Lane: oc-code-01.

Evidence

Before: classify(&["pr", "review", "12", "--approve"]) returned None
(the old test asserted is_none()), so approval/request-changes reviews
filed with no ledger row — invisible to the shared creation counts #2227
exists to keep.

After: cargo test --bin fleet -- gh_content_ledger — 6 passed / 0
failed; cargo test --bin fleet -- create_reserves_before_gh — 1 passed
/ 0 failed (rustfmt clean, no new warnings; the one warning is
pre-existing in gh_guard.rs). Covers all six flag spellings
classifying as kind review, bare-review passthrough, and the
reserve/finalise roundtrip.

Merge Danger

Low. One-file change, additive: one new private helper
(is_review_submit), one widened match guard, test-only changes
otherwise. Reads and non-submit shapes take the exact same path as
before. Still unledgered after this slice: non-POST api, bare
pr review. Pacing budgets / circuit breaker / verify-by-search stay
with hatch#13.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-28T00:59:41Z",
    "session_id": "ses_e5de0dcf232ffeYmWUqupkVxpT",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code/.worktrees/oc-code-01-2227-slice",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code/.worktrees/oc-code-01-2227-slice",
      "repo": "developing-today/code",
      "branch": "oc-code-01/2227-ledger-pr-review-submit",
      "sha": "101cb78ddbc3ef52b07f5fe047055270bae7d1db"
    },
    "auth_subject": "oc-code-07",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

fleet gh classified only --comment reviews, leaving --approve /
--request-changes (and short flags -a/-r/-c) invisible to the shared
content-creation ledger. gh requires one of the three submit flags
outside interactive mode (cli/cli pkg/cmd/pr/review/review.go), so
every non-interactive pr review files a review object and must
reserve a row. A bare pr review with no flag stays unledgered
(interactive-only, files nothing).

Tests: classify asserts all six flag spellings ledger as kind
review; bare review still passes through.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d0fdf11e-8f13-4a21-a3a8-8f5b7acf2222

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Lane 1907-J (charlie ADVANCE landings discovery) — verify-then-merge evidence:

Merging under standing merge authority.

@developing-today-fleet
developing-today-fleet Bot merged commit aa00565 into main Nov 28, 2026
3 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the oc-code-01/2227-ledger-pr-review-submit branch November 28, 2026 01:39
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.

0 participants