Skip to content

add describe-time producer and override-route hints#164

Merged
HumanBean17 merged 2 commits into
masterfrom
cursor/issue-161-describe-producer-hints
May 16, 2026
Merged

add describe-time producer and override-route hints#164
HumanBean17 merged 2 commits into
masterfrom
cursor/issue-161-describe-producer-hints

Conversation

@HumanBean17
Copy link
Copy Markdown
Owner

Summary

Closes #161.

  • Add five v1 describe hint templates in mcp_hints.py for the producer axis (DECLARES.DECLARES_PRODUCER, DECLARES_PRODUCER, OVERRIDDEN_BY.DECLARES_PRODUCER) and the missing override-route axis (OVERRIDDEN_BY.EXPOSES), plus producer-node declaring-method hint.
  • Wire triggers in generate_hints with the same priorities as symmetric client/route hints.
  • Add integration and synthetic tests in tests/test_mcp_hints.py.

No schema change, no re-index, no ontology bump.

Test plan

  • .venv/bin/ruff check .
  • .venv/bin/python -m pytest tests/test_mcp_hints.py -v (110 passed, 2 skipped)
  • .venv/bin/python -m pytest tests -v (579 passed; 18 CLI failures are pre-existing env issue — system java-codebase-rag not editable venv install)

Made with Cursor

Close #161: emit symmetric road-sign hints for DECLARES_PRODUCER,
DECLARES.DECLARES_PRODUCER, OVERRIDDEN_BY.DECLARES_PRODUCER, and
OVERRIDDEN_BY.EXPOSES rollups plus producer-node declaring-method hint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown
Owner Author

@HumanBean17 HumanBean17 left a comment

Choose a reason for hiding this comment

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

Review summary

Verdict: Approve — small, correctly scoped fix for #161. I don't see a functional bug in the hint logic.

What works well

  • All five missing describe hints are implemented with the expected traversal shapes, atomic EdgeType literals (no dot-keys in emissions), and the same priority bands as existing client/route hints.
  • Producer leaf nodes follow the same early-return pattern as route / client; type and method branches mirror the symmetric triggers.
  • Tests are mostly at the right layer: bank-chat e2e for type/method/producer leaf hints; override_axis_rollup_smoke e2e for OVERRIDDEN_BY.EXPOSES; parametrized ≤120-char sweep for all new templates.
  • No unnecessary schema/ontology/re-index churn — accurate for this PR.

Nits (non-blocking)

  1. OVERRIDDEN_BY.DECLARES_PRODUCER coverage is weakesttest_hints_describe_method_producers_in_overriders_emits is synthetic generate_hints(...) only, while clients_in_overriders uses bank-chat and routes_in_overriders uses override_axis_graph + real describe_v2. No fixture currently produces that rollup key. Follow-up: extend override_axis_rollup_smoke (or a tiny brownfield stub) with override methods that declare producers, mirroring test_describe_abstract_method_with_route_override_emits_exposes.

  2. Propose/catalog hygienemcp_hints.py still references the locked v1 catalog in HINTS-ROAD-SIGNS-PROPOSE.md Appendix A, which doesn't list these five templates. Worth a short amendment note so the lock doc and code don't diverge.

  3. docs/AGENT-GUIDE.md drift — override-axis section still documents only OVERRIDDEN_BY.DECLARES_CLIENT / OVERRIDDEN_BY.EXPOSES, not OVERRIDDEN_BY.DECLARES_PRODUCER (already in mcp_v2.py / server.py). Optional doc follow-up.

  4. Tiny test inconsistency — parametrized length test uses {"id": "a"} for TPL_DESCRIBE_METHOD_PRODUCERS_IN_OVERRIDERS while siblings use sym:a (harmless for length-only).

  5. Duplicated override_axis_graph fixture — copied from test_mcp_v2_compose.py; fine for this PR, could move to conftest.py later.

Note on hint cap

A method with full override-axis rollups plus multiple leaf edges can exceed five candidates; finalize_hint_list drops lower-priority leaf hints first. Pre-existing behavior, not introduced here.

Please confirm CI green on this branch (Actions was pending at review time).

Extend override_axis_rollup_smoke with abstract/concrete Kafka producer
override; replace synthetic producers-in-overriders hint test with
describe_v2 e2e. Amend HINTS-ROAD-SIGNS Appendix A and AGENT-GUIDE for
DECLARES_PRODUCER / OVERRIDDEN_BY.DECLARES_PRODUCER parity.

Co-authored-by: Cursor <cursoragent@cursor.com>
@HumanBean17 HumanBean17 merged commit ed3097d into master May 16, 2026
1 check passed
@HumanBean17 HumanBean17 deleted the cursor/issue-161-describe-producer-hints branch May 23, 2026 16:19
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.

hints: describe-time producer/route hint templates missing — asymmetry with client hints

1 participant