fix(install): guard strip_legacy_hooks against non-string command; add agy probe glob#70
Conversation
A pre-existing hook handler whose `command` is present-but-null crashed strip_legacy_hooks with `TypeError: argument of type 'NoneType' is not iterable` at both dedupe walks (the flat copilot entry and the nested claude/codex/gemini handler). Mirror the isinstance-str guard PR #67 landed in merge_hooks so a malformed hand-edited config is tolerated (a non-string command simply isn't a bmad_auto hook, so it's kept). Regression test covers both walks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Give `probe-adapter antigravity` a fallback transcript location so it can auto-discover an agy conversation transcript.jsonl — the step that unblocks writing the deferred token parser (the antigravity profile ships usage_parser = "none"). The path is community-doc-sourced (agy 1.0.x) and degrades safely to the existing "no convention" note if wrong; confirm against a live build with `probe-adapter antigravity --probe`. Companion to #67 — the glob activates once the antigravity profile lands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 1 minute Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🤖 Augment PR SummarySummary: This PR hardens hook-migration and improves transcript auto-discovery for the Antigravity (agy) adapter. Changes:
Technical Notes: The new Antigravity transcript path is documented as community-sourced and safely falls back to manual 🤖 Was this summary useful? React with 👍 or 👎 |
What
Two small follow-ups to #67 (Antigravity
agyadapter), both flagged during its validation.1. Harden
strip_legacy_hooksagainst a non-string command (install.py)#67 hardened the idempotency dedupe in
merge_hooksso a present-but-nullcommandcan't crash it, butstrip_legacy_hookshad the same latentTypeErrorat both its dedupe walks — the flat copilot entry (entry.get("command", "")) and the nested claude/codex/gemini handler (h.get("command", "")). A malformed hand-edited hook config would blow upbmad-loop initwithTypeError: argument of type 'NoneType' is not iterableinstead of skipping the entry.Applies the identical
isinstance(cmd := ..., str)guard #67 landed inmerge_hooks. A non-string command simply isn't abmad_autohook, so it's preserved. Pre-existing across all dialects; not introduced by #67 (and unreachable via the antigravity path, whose hooks live under thebmad-loopgroup thatstrip_legacy_hooksnever walks). New regression test covers both walks.2. Add an
agytranscript family glob (probe.py)The antigravity profile ships
usage_parser = "none", soprobe-adapter antigravityhad no transcript-location convention and couldn't auto-discover a transcript — the exact artifact needed to capture the schema and write the deferred token parser. Adds aFAMILY_GLOBSentry so probe can findagy's per-conversationtranscript.jsonl.The path is community-doc-sourced (agy 1.0.x); it degrades safely to the existing "no convention — pass
--transcript/--session-dir" note if wrong, and the inline comment says to confirm it against a live build withprobe-adapter antigravity --probe— the same posture #67's flags were landed with.Sequencing
Fix 1 is independent and lands regardless. Fix 2 activates once #67's antigravity profile is on
main(the glob is inert until then, keyed by theantigravityCLI name) — merge this after #67.Tests
New
test_strip_legacy_hooks_tolerates_non_string_command(flat + nested null-command shapes). Full suite green locally (1412 passed, 1 skipped);ruff check,ruff format, andtrunk checkclean.🤖 Generated with Claude Code