Skip to content

Consolidate CLI review, policy and PR tests - #1898

Merged
mergify[bot] merged 3 commits into
mainfrom
lean178/575-cli-dedupe-r57
Nov 26, 2026
Merged

mergify[bot] merged 3 commits into
mainfrom
lean178/575-cli-dedupe-r57

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Consolidate CLI review, policy and PR tests

Context and goal

Refs #575.

Acceptance

  • Preserve each workflow source and checkout history scenario, including tagged and shallow histories.
  • Keep the PR preflight no-write assertions, review-response token and status checks, error diagnostics, saved receipts and prior review summaries. Parameterize the scenarios and reuse setup.
  • Compare full-suite covered package source lines and branch arcs before and after. Preserve collected cases.
  • Pass the full slotted check, primary review and readiness before merge.

Notes

Base ac55b16. Hunk ownership was checked against open GitHub PR file diffs. The base line intervals for all edits fall within lines 1–2,440.

Validation

Recorded for bc18e87a099a

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

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

Coverage proof

Identical slotted coverage.py 7.17.5 full-suite runs compared main 417fa92 with merge candidate 83b34a3. Both executed exactly the same 6,033 package source lines and 1,744 executable branch arcs. No executed line or arc was added or lost. Both collected 2,060 cases, with 2,051 passing and the same nine opt-in IntelFlo replay cases skipped.

The delta review uses linear PR head bc18e87 because the review shim rejects a merge commit after the reviewed head. Git merge-tree confirms that merging bc18e87 into 417fa92 produces the exact tree tested at 83b34a3.

Against main 417fa92, this PR changes only tests/test_cli.py (155 added, 215 removed).

Review

  • primary, claude, 9b940fa, request_changes
  • delta, claude, bc18e87, approve

Assertion inventory

I listed and mapped the distinct assertions in every removed or merged test before requesting delta review. The surviving cases keep these checks.

  • Workflow selection checks the exit status, the exact refs and commits reported for pinned main and release, selected commands, and exclusion of superseded commands. Both config override cases require the opening unpinned notice, the override command, and no README output.
  • Review merge-base cases check success with upstream-only changes absent from the prompt, and shallow-checkout refusal with both hints, no reviewer input file, and no write API calls.
  • Review PR lookup failures check exit status, HTTP status, repository, app-installation hint presence or absence, token order, and recovery command. Detail failures also check empty stdout, PR number, endpoint, branch, and exact REST request order.
  • PR state cases check that a never-merged closed PR can be replaced, the returned URL and empty stderr, and dirty or incomplete state fails before GitHub calls. Ancestry failures retain the error and absence-of-push checks.
  • Review summary cases check that the posted review is readable JSON, the body is reread after posting, an edited body receives the exact summary, a failed reread warns without a patch, and an existing review keeps its prior entry before the new entry and the Notes heading.
  • Repost and interrupted save cases retain the original and repost body checks independently, including the model, byte limit, absence of raw output and private metadata, inline comment, receipt contents, reuse without model launch, and preservation of the prior receipt.
  • Reviewer fallback cases retain success with the independent reviewer, fallback and auth diagnostics, privacy redaction, and the invalid-effort error with neither the fallback nor Codex-unavailable diagnostic and no Claude launch.

Co-Authored-By: Codex <noreply@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopzero primary review by claude on 9b940fad483b47fee6e114a267285a74f316c7d5, 34.4s: request_changes (0 critical, 1 important, 0 suggestion)

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)

Native Claude output is retained in the restricted local review receipt.

Comment thread tests/test_cli.py Resolved
eowca and others added 2 commits November 26, 2026 14:23
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <codex@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopzero delta review by claude on bc18e87a099a5676a4fec091f876c87cd42d5860, 15.9s: approve (0 critical, 0 important, 1 suggestion)

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)

Native Claude output is retained in the restricted local review receipt.

Comment thread tests/test_cli.py
older_base = head_of(repo)
advance_checks(repo, ["echo current-base"])
git(wt, "tag", "origin/main", older_base)
expected, absent = (f"checks pinned to origin/main@{head_of(repo)}", "running: echo current-base"), "running: echo ok"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Tuple-packed assignment for line savings makes the line harder to read

Packing expected, absent = (...), ... onto one line makes it about 127 characters, well over the configured line-length = 100. Ruff doesn't enforce this because E501 isn't selected, and the file already has about 38 lines this long, so nothing breaks. Still, this saves one line by mixing the nested tuple with the absent value, and the boundary between them is easy to misread. Optional fix: split it after the inner tuple's closing paren. Separately, the bare posted_review(gh) at line 1504 discards its return value and works only as a JSON-parse check. A short comment, or assert posted_review(gh), would make that intent clear.

@eowca
eowca marked this pull request as ready for review November 26, 2026 14:09
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as 4dd4559 at 14:14 UTC

5 min in the queue, 5 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 14:09 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1925
  • ✅ Merged 14:14 · 4dd4559 · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit 4dd4559 into main Nov 26, 2026
23 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/575-cli-dedupe-r57 branch November 26, 2026 14:15
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