fix(cli): reject unknown collections in list#137
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🧰 Additional context used📓 Path-based instructions (2)src/cli.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
tests/cli.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (11)📚 Learning: 2026-03-15T22:40:42.886ZApplied to files:
📚 Learning: 2026-03-15T22:40:42.886ZApplied to files:
📚 Learning: 2026-03-15T22:40:42.886ZApplied to files:
📚 Learning: 2026-03-15T22:40:42.886ZApplied to files:
📚 Learning: 2026-03-15T22:40:42.886ZApplied to files:
📚 Learning: 2026-03-15T22:40:42.886ZApplied to files:
📚 Learning: 2026-03-15T22:40:42.886ZApplied to files:
📚 Learning: 2026-03-15T22:40:42.886ZApplied to files:
📚 Learning: 2026-03-15T22:40:42.886ZApplied to files:
📚 Learning: 2026-02-21T06:17:19.520ZApplied to files:
📚 Learning: 2026-03-15T19:09:49.536ZApplied to files:
🧬 Code graph analysis (1)src/cli.rs (9)
🔇 Additional comments (2)
📝 WalkthroughWalkthrough
Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Small, isolated bug fix for CLI argument validation. It replaces a silent fallback with explicit error handling for unknown collection names and includes a regression test.
Architecture diagram
sequenceDiagram
participant U as User
participant CLI as CLI (cmd_list)
participant M as Collection Modules
participant SE as Stderr
U->>CLI: run "boha list <collection>"
alt Known collection (e.g. "gsmg", "zden")
CLI->>M: Fetch specific collection data
M-->>CLI: puzzle list
CLI-->>U: filtered output
else CHANGED: collection == "all"
CLI->>M: Fetch all collections
M-->>CLI: full puzzle list
CLI-->>U: filtered output
else NEW: Unknown collection name
CLI->>SE: NEW: Write "Error: Unknown collection"
CLI->>CLI: NEW: process::exit(1)
end
Unknown collection names in
boha listwere silently treated asall, so a typo dumped the full dataset instead of failing fast.listnow rejects unknown collections with the same error path used byauthor,search, andexport, and the regression test locks that behavior in.Closes #136