Skip to content

feat(phase4): terminal formatter — ranked review path for wild diff - #19

Open
avikalpg wants to merge 8 commits into
mainfrom
nia/v2-terminal-formatter
Open

feat(phase4): terminal formatter — ranked review path for wild diff#19
avikalpg wants to merge 8 commits into
mainfrom
nia/v2-terminal-formatter

Conversation

@avikalpg

@avikalpg avikalpg commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Phase 4 — Terminal Formatter

Status: 14 tests passing · Standalone — no dependency on Phases 1–3
Spec: docs/DiffGraph-CLI/design/TERMINAL-FORMATTER.md
Roadmap: docs/DiffGraph-CLI/design/V2-IMPLEMENTATION-ROADMAP.md Phase 4


What this does

Adds TerminalFormatter in diffgraph/formatters/terminal.py.

When wired as wild diff --format terminal, instead of opening diffgraph.html in a browser, the tool prints a priority-ranked review path to the terminal:

wild diff — 7 files changed  ·  3 symbols modified  ·  2 added  ·  1 deleted

▶ REVIEW FIRST
  auth/validator.py  validate_token [modified]
    ↳ imported by: api/routes.py, middleware/auth.py
    ↳ 29 lines changed

▶ REVIEW NEXT
  auth/validator.py  RateLimiter [added]  · 28 lines
  tests/test_validator.py  test_rate_limit_basic [added]  · 12 lines

────────────────────────────────────────────────────────────────────────
Analysis: structural · Python · tree-sitter · 840ms

Files changed

File Purpose
diffgraph/formatters/__init__.py New formatters package
diffgraph/formatters/terminal.py TerminalFormatter class (430 lines)
tests/test_terminal_formatter.py 14 unit tests, all pure functions

How the ranking works

Three-bucket ranking, fully evidence-based (no LLM required):

  1. REVIEW FIRST — symbols imported by other changed files. Cross-file changes carry ripple risk.
  2. REVIEW NEXT — isolated changes (not imported by anything else in the diff).
  3. CONTEXT — unchanged symbols in touched files (background, not urgently actionable).

Score formula: importers × 3 + lines_changed — importers weighted heavier than lines.


Acceptance criteria (all met)

  • diffgraph/formatters/terminal.py created with TerminalFormatter
  • _rank_symbols() is a pure function (14 tests pass; no stdout capture needed)
  • --compact omits CONTEXT section
  • --all disables 10-symbol truncation cap
  • NO_COLOR=1 and piped stdout suppress ANSI
  • File-level fallback when symbol extraction unavailable
  • Footer shows analysis tier, languages, duration, diff context
  • 14 unit tests pass; zero network/git calls in tests

B1 decision point

The formatter ships as wild diff --format terminal (opt-in). Whether this becomes the default output depends on B1:

  • B1 = yes → change cli.py default from html to terminal (1-line change)
  • B1 = no/browser → this PR ships as-is; browser remains default

This PR is mergeable regardless of B1. The B1 change is a trivial 1-line follow-up.


Phase context

This is Phase 4 of the V2 implementation roadmap. It is standalone — it does not depend on Phases 1, 2, or 3 merging first. The formatter is a pure consumer of any schema v2 dict and can be reviewed and merged independently.

The critical unblocked path:

Summary by CodeRabbit

  • New Features

    • Added terminal output for change reviews through the --format option.
    • Highlights symbols in Review First, Review Next, and Context sections.
    • Displays file and symbol counts, change details, importer hints, warnings, and analysis metadata.
    • Supports compact output, item limits, full-list output, and automatic color handling.
    • Provides fallback output when symbol details are unavailable.
    • Retains HTML output as the default when no changes are present.
  • Bug Fixes

    • Improved readability for piped output and environments without color support.
    • Added clear validation for unsupported or malformed DiffGraph versions.

TerminalFormatter renders a schema v2 DiffGraph dict as a priority-ranked
terminal output. This is the main user-facing change in DiffGraph v2:
'wild diff' stops opening a browser and instead prints a ranked review path
to the terminal.

Key features:
- Three-bucket ranking: REVIEW FIRST (imported by changed files), REVIEW NEXT
  (isolated changes), CONTEXT (unchanged symbols in touched files)
- Score = importer_count * 3 + lines_changed; evidence-based, LLM-free
- Symbol truncation cap (default 10) with --all override
- ANSI color with NO_COLOR and TTY auto-detection
- --compact flag omits CONTEXT section
- File-level fallback when symbol extraction unavailable
- Footer shows analysis tier, languages, duration, diff context
- 14 unit tests; all pass; pure functions, no git/network

Wires as 'wild diff --format terminal'. Default swap (browser → terminal)
pending B1 answer from Avikalp. Can ship as --format terminal opt-in today.

Spec: docs/DiffGraph-CLI/design/TERMINAL-FORMATTER.md
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b2e43338-cf11-4c8e-9c9a-f9dd10a9e544

📥 Commits

Reviewing files that changed from the base of the PR and between 93564e5 and 8527282.

📒 Files selected for processing (4)
  • diffgraph/cli.py
  • diffgraph/formatters/terminal.py
  • tests/test_structural.py
  • tests/test_terminal_formatter.py
🚧 Files skipped from review as they are similar to previous changes (4)
  • tests/test_structural.py
  • diffgraph/cli.py
  • tests/test_terminal_formatter.py
  • diffgraph/formatters/terminal.py

Walkthrough

Adds a schema v2 terminal formatter that validates DiffGraph data, ranks symbols by review priority, renders colored or plain terminal output, supports compact and truncation options, and integrates terminal output with the CLI.

Changes

Terminal formatter

Layer / File(s) Summary
Formatter package and options
diffgraph/formatters/__init__.py, diffgraph/formatters/terminal.py, tests/test_terminal_formatter.py
Creates the formatter package, exports TerminalFormatter, validates schema versions, adds color controls and formatter configuration, and defines DiffGraph test fixtures.
Rank DiffGraph symbols
diffgraph/formatters/terminal.py, tests/test_terminal_formatter.py
Ranks symbols into review buckets using change kinds, importer relationships, and estimated changed lines. Tests cover bucket allocation and score ordering.
Render terminal review output
diffgraph/formatters/terminal.py, tests/test_terminal_formatter.py
Renders headers, warnings, sections, symbol details, fallbacks, metadata, truncation, compact mode, color handling, importer collapsing, and full-output mode. Tests cover these behaviors.
Wire terminal output into the CLI
diffgraph/cli.py, tests/test_structural.py
Adds terminal format controls, validates allowed combinations, enables structural analysis for terminal output, and preserves existing JSON and default diff paths.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant StructuralAnalysis
  participant TerminalFormatter
  participant TerminalOutput
  CLI->>StructuralAnalysis: request analysis for terminal format
  StructuralAnalysis->>TerminalFormatter: provide DiffGraph artifact
  TerminalFormatter->>TerminalOutput: render terminal review output
Loading

Possibly related PRs

  • WildestAI/DiffGraph-CLI#11: Adds the schema v2 JSON export and related CLI format-routing changes used by this terminal formatter.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the new terminal formatter and its ranked review path, which matches the primary changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nia/v2-terminal-formatter

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
tests/test_terminal_formatter.py (2)

369-374: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer unpacking over list concatenation (Ruff RUF005).

🔧 Proposed fix
-    files = importer_files + [target_file]
+    files = [*importer_files, target_file]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_terminal_formatter.py` around lines 369 - 374, Update the files
construction near importer_files and target_file to use iterable unpacking
rather than list concatenation, preserving the existing order and resulting list
contents.

Source: Linters/SAST tools


71-77: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Implicit Optional on _make_diffgraph params (Ruff RUF013).

files, symbols, relationships, metadata, and diff_ref are typed as bare list/dict with None defaults, which PEP 484 prohibits implicitly.

🔧 Proposed fix
+from typing import Optional
+
 def _make_diffgraph(
-    files: list = None,
-    symbols: list = None,
-    relationships: list = None,
-    metadata: dict = None,
-    diff_ref: dict = None,
+    files: Optional[list] = None,
+    symbols: Optional[list] = None,
+    relationships: Optional[list] = None,
+    metadata: Optional[dict] = None,
+    diff_ref: Optional[dict] = None,
 ) -> dict:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_terminal_formatter.py` around lines 71 - 77, Update the
`_make_diffgraph` parameters `files`, `symbols`, `relationships`, `metadata`,
and `diff_ref` to explicitly use nullable `Optional` type annotations while
retaining their existing `None` defaults and return type.

Source: Linters/SAST tools

diffgraph/formatters/terminal.py (1)

307-337: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

section_style parameter is accepted but never used.

_write_section hardcodes header styling via if title == "REVIEW FIRST" / elif title == "CONTEXT" branches, ignoring the section_style argument passed by every caller (Line 155-158). This currently renders correctly only because the branches happen to match the caller-supplied styles — any future call with a different section_style would be silently ignored.

♻️ Use the passed style instead of re-deriving it from title
+_STYLE_FNS = {"bold_yellow": bold_yellow, "bold": bold, "dim": dim}
+
 def _write_section(
     self,
     title: str,
     items: list[_RankedSymbol],
     out,
     color: bool,
     section_style: str = "bold",
 ) -> None:
     ...
     prefix = "▶ " if not _is_dumb_terminal() else "> "
     header_text = f"{prefix}{title}"
-    if title == "REVIEW FIRST":
-        header = bold_yellow(header_text, color)
-    elif title == "CONTEXT":
-        header = dim(header_text, color)
-    else:
-        header = bold(header_text, color)
+    header = _STYLE_FNS.get(section_style, bold)(header_text, color)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@diffgraph/formatters/terminal.py` around lines 307 - 337, Update
_write_section to derive the header styling from its section_style parameter
instead of matching title values. Preserve the existing bold-yellow, dim, and
bold behavior by mapping the caller-provided styles accordingly, and ensure all
callers’ current rendering remains unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@diffgraph/formatters/terminal.py`:
- Around line 307-337: Update _write_section to derive the header styling from
its section_style parameter instead of matching title values. Preserve the
existing bold-yellow, dim, and bold behavior by mapping the caller-provided
styles accordingly, and ensure all callers’ current rendering remains unchanged.

In `@tests/test_terminal_formatter.py`:
- Around line 369-374: Update the files construction near importer_files and
target_file to use iterable unpacking rather than list concatenation, preserving
the existing order and resulting list contents.
- Around line 71-77: Update the `_make_diffgraph` parameters `files`, `symbols`,
`relationships`, `metadata`, and `diff_ref` to explicitly use nullable
`Optional` type annotations while retaining their existing `None` defaults and
return type.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f9c5dc8d-8d25-4b84-ab00-8df54579687c

📥 Commits

Reviewing files that changed from the base of the PR and between 846cb9e and 12971bf.

📒 Files selected for processing (3)
  • diffgraph/formatters/__init__.py
  • diffgraph/formatters/terminal.py
  • tests/test_terminal_formatter.py

@nia-sg-bot nia-sg-bot added priority:P1 High-priority product work direction:revise Valuable intent, but scope or implementation must be revised roadmap Tracked on the public WildestAI roadmap labels Aug 1, 2026
@nia-sg-bot

Copy link
Copy Markdown
Contributor

Product-direction review — 2026-08-01

Verdict: REVISE · P1

The terminal formatter is a good schema consumer and should survive. Before merge: wire it into the CLI, use actual changed-line/hunk evidence rather than symbol span, reconcile relationship endpoint semantics with the producer, report mixed provenance honestly, reject unsupported schema majors, and test against shared golden fixtures after the canonical producer stabilizes.

This is a scope/alignment review, not an automatic closure decision. Items marked DISCUSS CLOSE should be resolved with maintainer context before closing.

@nia-sg-bot nia-sg-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Direction gate on current head 32c8150d856ee35cba9b74106b7589536fda85b2: the formatter itself is healthy (python3 -m pytest -q: 45 passed; git diff --check: clean), but this PR is not yet merge-ready.

Please address these contained contract/integration gaps before merge:

  • Wire TerminalFormatter into a real CLI output path; the current CLI contains no formatter reference, so users cannot exercise it.
  • Rank modified symbols from actual diff/hunk changed-line evidence. _rank_symbols() currently computes lines_changed as the full symbol span (line_end - line_start + 1), which overstates tiny edits in large symbols.
  • Validate schema_version and reject unsupported major versions before rendering; tests currently only construct "2.0", while the formatter accepts arbitrary/missing versions.
  • Confirm imports relationship endpoint semantics against the canonical producer and cover them with a shared/golden schema-v2 fixture rather than formatter-only synthetic fixtures.

This preserves the useful formatter while keeping the CLI artifact canonical, versioned, deterministic, and honestly ranked.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
diffgraph/formatters/terminal.py (3)

337-340: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not cap CONTEXT under the current option contract.

max_items is documented for REVIEW FIRST and REVIEW NEXT, but this code truncates CONTEXT too. Apply the cap only to review sections, or update the public option contract and tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@diffgraph/formatters/terminal.py` around lines 337 - 340, Update the
item-capping logic near total, capped, and hidden so max_items is applied only
to REVIEW FIRST and REVIEW NEXT sections, not CONTEXT. Preserve the existing
uncapped CONTEXT output and hidden-count behavior, unless you explicitly revise
the public option contract and corresponding tests.

233-245: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Use changed-line or hunk data for ranking.

Line 237 uses the complete symbol span, not the changed lines. A one-line edit in a large symbol can rank above a larger real change. Added and deleted symbols also have lines_changed == 0 during scoring because their line count is calculated only while rendering.

Populate line counts from canonical changed-line or hunk evidence before Line 239. Apply the same value to ranking and display for every change kind.

Also applies to: 384-388

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@diffgraph/formatters/terminal.py` around lines 233 - 245, Update the ranking
preparation before score calculation to derive lines_changed from canonical
changed-line or hunk data rather than the complete symbol span, including added
and deleted symbols. Reuse this single computed value for both
_RankedSymbol.score and the later display path so every change kind reports and
ranks by actual changed lines.

165-178: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Wire --format terminal into the CLI dispatch.

TerminalFormatter exists and has unit coverage, but diffgraph/cli.py does not define or select it for wild diff --format terminal, and there is no integration test for the CLI output routes. Add the parser option dispatch to diffgraph.formatters.terminal.TerminalFormatter, keep diffgraph.html+browser as the default, and add CLI integration tests for both paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@diffgraph/formatters/terminal.py` around lines 165 - 178, Update the CLI
parser and format dispatch in diffgraph/cli.py so --format terminal constructs
and uses diffgraph.formatters.terminal.TerminalFormatter, while preserving
diffgraph.html plus browser behavior as the default route. Add CLI integration
coverage for both explicit terminal output and the existing default HTML/browser
path.
tests/test_terminal_formatter.py (2)

1-90: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Use a production-backed fixture for relationship provenance tests.

The importer ranking still builds _make_import_rel fixtures instead of using golden DiffGraph v2 fixtures. Add producer-backed cases, including mixed analysis_source values, and assert the resulting warning/footer output.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_terminal_formatter.py` around lines 1 - 90, Replace synthetic
_make_import_rel-based importer ranking cases with production-backed golden
DiffGraph v2 fixtures. Include cases containing mixed relationship
analysis_source values, then assert the resulting ranking warnings and footer
output from TerminalFormatter. Keep the existing fixture helpers for unrelated
formatter tests.

316-345: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Assert changed-line evidence, not symbol location spans.

_make_symbol() stores location only, and _rank_symbols() scores lines_changed from location.line_end - location.line_start + 1. This test locks in a span-derived ranking contract. Store hunk/diff evidence with the symbol span, include a case where span lines differ from changed-line evidence, and assert that actual changed-line evidence controls REVIEW FIRST ordering.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_terminal_formatter.py` around lines 316 - 345, Update
test_rank_symbols_score_ordering and its symbol fixtures to provide hunk/diff
changed-line evidence separately from each symbol’s location span. Include
symbols whose span lengths differ from their changed-line counts, then assert
REVIEW FIRST ordering follows the actual changed-line evidence rather than
location.line_start/line_end calculations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/test_terminal_formatter.py`:
- Around line 98-99: Update the pytest.raises assertion for TerminalFormatter to
use a regex pattern that escapes the literal dots in “MAJOR.MINOR”, ensuring
only the exact error-text format matches.

---

Outside diff comments:
In `@diffgraph/formatters/terminal.py`:
- Around line 337-340: Update the item-capping logic near total, capped, and
hidden so max_items is applied only to REVIEW FIRST and REVIEW NEXT sections,
not CONTEXT. Preserve the existing uncapped CONTEXT output and hidden-count
behavior, unless you explicitly revise the public option contract and
corresponding tests.
- Around line 233-245: Update the ranking preparation before score calculation
to derive lines_changed from canonical changed-line or hunk data rather than the
complete symbol span, including added and deleted symbols. Reuse this single
computed value for both _RankedSymbol.score and the later display path so every
change kind reports and ranks by actual changed lines.
- Around line 165-178: Update the CLI parser and format dispatch in
diffgraph/cli.py so --format terminal constructs and uses
diffgraph.formatters.terminal.TerminalFormatter, while preserving diffgraph.html
plus browser behavior as the default route. Add CLI integration coverage for
both explicit terminal output and the existing default HTML/browser path.

In `@tests/test_terminal_formatter.py`:
- Around line 1-90: Replace synthetic _make_import_rel-based importer ranking
cases with production-backed golden DiffGraph v2 fixtures. Include cases
containing mixed relationship analysis_source values, then assert the resulting
ranking warnings and footer output from TerminalFormatter. Keep the existing
fixture helpers for unrelated formatter tests.
- Around line 316-345: Update test_rank_symbols_score_ordering and its symbol
fixtures to provide hunk/diff changed-line evidence separately from each
symbol’s location span. Include symbols whose span lengths differ from their
changed-line counts, then assert REVIEW FIRST ordering follows the actual
changed-line evidence rather than location.line_start/line_end calculations.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b6f98847-327c-4707-9158-6391ce76f47e

📥 Commits

Reviewing files that changed from the base of the PR and between 12971bf and 40ebc95.

📒 Files selected for processing (2)
  • diffgraph/formatters/terminal.py
  • tests/test_terminal_formatter.py

Comment thread tests/test_terminal_formatter.py Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@diffgraph/cli.py`:
- Around line 212-219: Add `--compact` and `--all` click options alongside the
existing `output_format` option, then update the terminal-rendering path and its
`_structural_scope` invocation to pass the compact value and use
`max_items=None` when all items are requested. Add CLI coverage verifying both
options are accepted and affect terminal rendering.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f03149e-0220-410b-a73f-62e5e31bfe80

📥 Commits

Reviewing files that changed from the base of the PR and between d0cdf87 and 93564e5.

📒 Files selected for processing (2)
  • diffgraph/cli.py
  • tests/test_structural.py

Comment thread diffgraph/cli.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@diffgraph/cli.py`:
- Around line 220-221: Update the Click option handling for --compact and --all
so they are parsed only for terminal diff invocations, or rename them to avoid
consuming Git pass-through flags. Ensure main’s Git pass-through path forwards
these arguments unchanged, including commands such as wild branch --all, while
retaining the terminal diff behavior.

In `@tests/test_structural.py`:
- Around line 235-236: Update the symbol names generated in the structural
test’s before and after fixtures so lexical sorting matches numeric order, or
add a sentinel symbol that sorts beyond the default cap; then assert that this
sentinel is included when exercising the --all behavior, ensuring the test
verifies selection beyond the default limit.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 162f0b21-73a2-429a-acce-a3190868e174

📥 Commits

Reviewing files that changed from the base of the PR and between 93564e5 and dbfafea.

📒 Files selected for processing (2)
  • diffgraph/cli.py
  • tests/test_structural.py

Comment thread diffgraph/cli.py Outdated
Comment thread tests/test_structural.py Outdated
@nia-sg-bot

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nia-sg-bot nia-sg-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Direction gate cleared on current head 85272827ac4ff031f63ebec3fccfb899d15114e8.

Evidence: python3 -m pytest (57 passed), focused formatter/structural suite (47 passed), compileall, and git diff --check origin/main...HEAD all pass. Unstaged and staged wild diff --format terminal smoke runs both produced deterministic local structural output. Canonical v2 schema production/validation remains covered by the structural suite; the topology fixture is intentionally a partial ranking fixture, not a standalone v2 artifact. No unresolved review threads; CodeRabbit current-head check passes and its incremental re-review reports no unreviewed changes. No extension contract or website released-product claim is changed by this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

direction:revise Valuable intent, but scope or implementation must be revised priority:P1 High-priority product work roadmap Tracked on the public WildestAI roadmap

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants