Skip to content

docs(library-selection): apply CodeRabbit follow-ups from PR #208#209

Merged
zackees merged 1 commit intomainfrom
feat/205-coderabbit-followups
Apr 25, 2026
Merged

docs(library-selection): apply CodeRabbit follow-ups from PR #208#209
zackees merged 1 commit intomainfrom
feat/205-coderabbit-followups

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented Apr 25, 2026

Addresses the five inline CodeRabbit findings on PR #208 (now merged). No runtime changes.

Changes

  • `teensylc_acceptance.rs` — drop substring fallback for `setup` / `loop` symbol probes. Exact `has_symbol` is sufficient and avoids false positives on mangled C++ names like `_ZN6Stream8setupXxx`. (CR-1)
  • `crates/CLAUDE.md` — add "Diagnostic subcommand exception" pattern documenting that `clang-tidy` / `clang-query` / `iwyu` / `mcp` / `lnk` / `lib-select` intentionally bypass the daemon. (CR-3)
  • `docs/architecture/library-selection.md` — refresh the status block and "Future work" list now that feat(library-selection): #205 Phase 6 acceptance gates + Phase 8 CLI/docs #208 has merged; rewrite the Tests section to reference the real `tests/*_acceptance.rs` files instead of describing them as future work. (CR-4, CR-5)

CR-2 — false positive

CodeRabbit flagged `use fbuild_packages::Framework;` in `crates/fbuild-cli/src/lib_select.rs` as unused. Verified locally: the `Framework` trait is needed for `get_libraries_dir()` method-call dispatch on the 12 framework objects the file constructs. Removing it produces `E0599` errors. Kept.

Verification

  • `uv run soldr cargo clippy --workspace --all-targets -- -D warnings` — green.
  • Workspace check / fmt / doc all green (no Rust changes outside the test edit).

Refs: #205, #208

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated architectural documentation and project roadmap reflecting completion of recent phases and current development status.
  • Tests

    • Strengthened acceptance test assertions for improved validation rigor.

Five inline review findings from CodeRabbit on PR #208. All addressed.
None changes runtime behaviour.

## Changes

- `crates/fbuild-build/tests/teensylc_acceptance.rs` — drop substring
  fallback for `setup`/`loop` symbol probes. They're `extern "C"` from
  the sketch and exact `has_symbol(...)` is sufficient; the substring
  match was overly permissive (4-5-char tokens collide with mangled
  C++ names like `_ZN6Stream8setupXxx`).
- `crates/CLAUDE.md` — add "Diagnostic subcommand exception" pattern
  to clarify that `clang-tidy` / `clang-query` / `iwyu` / `mcp` /
  `lnk` / `lib-select` intentionally bypass the daemon. Prevents
  future readers from concluding `lib-select` violates the
  "thin HTTP client" rule.
- `docs/architecture/library-selection.md` — update top-of-doc status
  block and "Future work" list to reflect that PR #208 shipped Phase 6
  acceptance gates and Phase 8.a `lib-select` CLI; only Phase 4
  (zccache#130), Phase 7, and Phase 8.b cleanup remain. The "Tests"
  section now points at the actual `tests/*_acceptance.rs` files
  rather than describing them as future work.

## CodeRabbit comment 2 — false positive (no change)

CodeRabbit flagged `use fbuild_packages::Framework;` in
`crates/fbuild-cli/src/lib_select.rs:25` as unused. Verified: the
`Framework` trait is required for method-call dispatch on the 12+
framework objects the file constructs (`get_libraries_dir()` is a
trait method). Removing the import produces 12× E0599 errors. Kept.

Refs: #205, #208

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 25, 2026

📝 Walkthrough

Walkthrough

The changes consist of three documentation and test refinements: architectural documentation clarifying that fbuild-cli diagnostic subcommands execute in-process, a tightened symbol-match assertion in the Teensy acceptance test, and updated library-selection roadmap documentation with detailed test descriptions and phase status updates.

Changes

Cohort / File(s) Summary
Architectural & Roadmap Documentation
crates/CLAUDE.md, docs/architecture/library-selection.md
Added documentation clarifying in-process execution of fbuild-cli diagnostic subcommands. Updated library-selection roadmap to reflect Phase 6/8 completion status, CI execution model for acceptance tests (#[ignore] by default), and removed outdated future-work items.
Test Assertion Tightening
crates/fbuild-build/tests/teensylc_acceptance.rs
Changed symbol matching from substring containment (has_symbol_containing) to exact match (has_symbol) for "setup" and "loop" symbols in Teensy ELF acceptance check A-11.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Symbols must match with precision true,
In-process commands skip the queue,
Roadmaps update, phases land,
Architecture documented, all as planned! ✨

🚥 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 accurately describes the main change: applying CodeRabbit follow-ups from PR #208 to the library-selection documentation, which is the primary focus of the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feat/205-coderabbit-followups

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@crates/CLAUDE.md`:
- Line 51: Update the diagnostic-bypass exception list in CLAUDE.md by removing
the `mcp` entry so the list only contains `clang-tidy`, `clang-query`, `iwyu`,
`lnk`, `lib-select`; `mcp` should not be listed because it is a thin HTTP client
that uses `DaemonClient` rather than an in-process diagnostic. Locate the
sentence containing "clang-tidy, clang-query, iwyu, mcp, lnk, lib-select" and
edit it to drop `mcp`, preserving punctuation and wording consistency with the
surrounding paragraph.
🪄 Autofix (Beta)

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9a83c84b-9a87-44f8-b70e-a3087bca9ed1

📥 Commits

Reviewing files that changed from the base of the PR and between 42b732b and ce8b92d.

📒 Files selected for processing (3)
  • crates/CLAUDE.md
  • crates/fbuild-build/tests/teensylc_acceptance.rs
  • docs/architecture/library-selection.md

Comment thread crates/CLAUDE.md

**HTTP API boundary:** CLI sends JSON requests to daemon over HTTP. Build output streams via WebSocket. Serial monitor data streams via `/ws/serial-monitor`. All endpoints match the Python FastAPI daemon's contract.

**Diagnostic subcommand exception:** A small, growing set of `fbuild-cli` subcommands (`clang-tidy`, `clang-query`, `iwyu`, `mcp`, `lnk`, `lib-select`) run in-process and intentionally bypass the daemon. They are read-only diagnostics that don't need build orchestration, so a round-trip through the HTTP API would only add latency. The "thin HTTP client" rule still applies to every command that touches the build pipeline (`build`, `deploy`, `monitor`, `test-emu`, etc.).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Confirm whether mcp dispatches in-process or via HTTP to the daemon.
fd -t f 'mcp.rs' crates/fbuild-cli
echo "--- module header ---"
fd -t f 'mcp.rs' crates/fbuild-cli -x sed -n '1,40p' {}
echo "--- daemon/HTTP usage inside mcp module ---"
rg -nP -C2 '\b(DaemonClient|reqwest|http|base_url|/api/|post|get_json)\b' crates/fbuild-cli/src/mcp.rs crates/fbuild-cli/src/mcp 2>/dev/null
echo "--- dispatch from main/cli ---"
rg -nP -C3 '\bmcp\b' crates/fbuild-cli/src/main.rs crates/fbuild-cli/src/lib.rs 2>/dev/null

Repository: FastLED/fbuild

Length of output: 3844


Remove mcp from the diagnostic-bypass exception list in CLAUDE.md line 51.

The mcp subcommand acts as a thin HTTP client to the daemon, not an in-process diagnostic that bypasses it. Its own module documentation states it "Translates MCP tool/resource/prompt calls into HTTP requests to the running daemon," and the implementation uses DaemonClient throughout to communicate with the daemon. Including it in the exception contradicts both the documented behavior and the "thin HTTP client" rule being reaffirmed. The diagnostic-bypass list should contain only: clang-tidy, clang-query, iwyu, lnk, lib-select.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/CLAUDE.md` at line 51, Update the diagnostic-bypass exception list in
CLAUDE.md by removing the `mcp` entry so the list only contains `clang-tidy`,
`clang-query`, `iwyu`, `lnk`, `lib-select`; `mcp` should not be listed because
it is a thin HTTP client that uses `DaemonClient` rather than an in-process
diagnostic. Locate the sentence containing "clang-tidy, clang-query, iwyu, mcp,
lnk, lib-select" and edit it to drop `mcp`, preserving punctuation and wording
consistency with the surrounding paragraph.

@zackees zackees merged commit a28ead6 into main Apr 25, 2026
78 of 79 checks passed
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