Query: add `symbolKind` and requirement `text` to the queryable property set

Đang mở
#2,339 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
56/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, grpc

Hướng nghiên cứu

Start with internal/semantic/query/properties.go and the query property tests to see how row properties are resolved; then check internal/frontend/grpc/query_test.go and docs/reference/wire-contract.md. Add tests for requirement text, symbolKind on a transition and anonymous action, and continued rejection of unknown properties. Done means the query results and documented closed property list match the acceptance criteria.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Disclaimer, this issue was detected and written by an AI

Summary

Two browsing/metrics projections are forced onto N+1 work or text scraping because
the query property set is closed and lacks them:

  1. no symbolKind, so a listing that has a row's @type (the metaclass) still
    needs one LookupSymbol per row to learn the symbol kind, and a positional
    …::@1 id cannot be looked up at all;
  2. no requirement text, so sentence metrics parse report output instead of
    querying the requirement's own text feature.

documentation and textualRepresentation are not substitutes: they are the
KerML doc/rep bodies, not RequirementUsage::text.

Current state

  • internal/semantic/query/properties.go has no symbolKind and no text case.
  • docs/reference/wire-contract.md:1044 states the closed set:
    @id, @type, body, declaredName, declaredShortName, documentation, elementId, general, isAbstract, isIndividual, language, locale, multiplicityLower, multiplicityUpper, name, owner, payloadArgument, qualifiedName, receiverArgument, satisfiedRequirement, satisfyingFeature, senderArgument, shortName, textualRepresentation, type.
  • SymbolInfo.Kind exists on GetSymbol (api.md:491), so the fact is known;
    only the query projection is missing.

Proposal

  • symbolKind — the SymbolKind name a GetSymbol answers (PartDefinition,
    StateUsage, …), for every row @type cannot distinguish (a TransitionUsage,
    an anonymous ActionUsage). Same value for every metaclass; empty only where the
    service genuinely has no symbol.
  • text — the requirement's declared text value as a string, on
    RequirementDefinition/RequirementUsage rows; absent when the requirement
    states none. Keep documentation/textualRepresentation unchanged.

Both are additive: the closed list grows, unknown property answers stay for
everything else.

Tests

  • internal/semantic/query property tests: a requirement with
    text = "…" and one without; a transition and an anonymous action in a
    state machine answer symbolKind (TransitionUsage/ActionUsage) without a
    LookupSymbol.
  • internal/frontend/grpc/query_test.go: the two properties over a fixture,
    and unknown property still refuses a name not in the set.
  • docs/reference/wire-contract.md: extend the closed list.

Acceptance

  • A scoped query selecting symbolKind names every row's kind, including
    rows whose id is positional.
  • text answers requirement text and is absent otherwise.
  • The wire-contract property list and its refusal test match the code.
Ngôn ngữ chính
Go
Star
59
Fork
20
Merge trung bình
10 giờ 23 phút
Pull request đã merge (30 ngày)
897

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Open-MBEE/OpenSysML

Tất cả issue của Open-MBEE/OpenSysML

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.