You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(jrag): address fresh-review findings A-G (silent-wrong-output + test debt)
Folded review fan-out (review-fresh-1..4) findings into one commit.
Code fixes (silent-wrong-output / spec-compliance):
- A: resolve_query returned `ambiguous` with empty candidates when a
post-filter rejected every `many` candidate; now `not_found` with the
filter-failure message (an empty ambiguous list had no narrowing value).
- B: _cmd_connection wrapped list_by_capability(MESSAGE_LISTENER) in a bare
`except: listener_hits = []` -> silent wrong-results; now warns-and-continues
so an empty async inbound section is distinguishable from "no listeners".
- C: find query-mode truncation was decided on the POST-filtered list, so a
post-filter that dropped rows silently cleared `truncated`; now decided on
the raw name/FQN fetch (limit+1), with a warning when post-filters apply
after a capped fetch. find filter-mode didn't slice out.results -> displayed
limit+1 rows at the boundary; now slices to limit and sets truncated from
has_more_results OR len>limit.
- D: overrides/overridden-by set direction="up"/"down" on edge rows, tripping
the renderer's has_direction guard -> mislabeled flat lists as
`↑ supertypes:` / `↓ subtypes:`. Dropped the direction key (flat is correct).
- E: jrag_hints result_edges fallback emitted self-hints (after `callers` it
suggested `jrag callers` again). Added current_command param (plumbed via
next_actions_hook + _emit_traversal) to skip the self-hint; the inverse
direction (`callees` after `callers`) is kept — that's the useful signal.
- F: warnings[] were JSON-only (the renderer never emitted them in text), so
the "inapplicable flags never silently ignored" spec was unenforced for text
consumers. The renderer now appends `warning:` lines; status/microservices/
map/conventions/topics/impact now warn on inherited flags they don't apply.
Tests (G + pinning):
- Pin A/D/E/F with focused regression tests.
- Strengthen vacuous assertions: test_resolve_service (7/10 skipped -> use the
ladybug_db_path fixture; tautological `status in (one,many,none)` -> per-branch
contracts), test_jrag_listing (truncated now actually verified; client_kind
enum must not accept un-normalized "feign"; routes must have `path`),
test_jrag_locate (find_by_capability/annotation prove narrowing vs.
unfiltered; inspect-ambiguous asserts each branch instead of `elif ok: pass`),
test_jrag_orientation test 7 (overview --as vacuous `if status==ok` guard ->
unconditional dispatch assertion).
Verified: 138 focused jrag/resolve tests green; full suite 1006 passed / 16
failed, all 16 pre-existing or fixture-pollution (4 TestPR4IndexProgress are
order-dependent pollution from test_java_codebase_rag_cli init/erase tests
running against the real corpus_root — tracked as a separate follow-up, not a
regression from this commit).
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments