apex-dev-tools / apex-dev-tools/apex-log-parser

✨ feat: Fix the event classification: split SOSL from SOQL, separate frames from methods

Đang mở
#35 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
TypeScript
Star
2
Fork
0
Merge trung bình
5 giờ 51 phút
Pull request đã merge (30 ngày)
32

Mô tả

### Problem

MCP builds its own operation taxonomy on top of the parser's `type` and `subCategory` because the
parser's classification does not separate what a reader needs to see apart —
`src/tools/operations.ts`:

- `SOSL` cannot be told from `SOQL`: both share the `SOQL` sub-category, so MCP re-splits them by raw
type in `KIND_BY_TYPE` (lines 185-188).
- `EXECUTION_STARTED` is not a method, so MCP holds `FRAME_TYPES` (line 175) to exclude it.
- `ENTERING_MANAGED_PKG` is a package boundary, not a method, and needs the same treatment.

Because `kindOf` returns nothing for a type its tables do not cover, any unclassified frame drops out
of MCP's `Operation` chain — which is what makes its caller-namespace derivation diverge from the
immediate-parent model (see the `callerNamespace` issue).

### Proposed solution

Fix the classification in the parser rather than in each consumer:

- Split SOSL from SOQL at the sub-category level.
- Distinguish a root or execution frame, and a managed-package boundary, from a method.
- Make the classification total, so no event type is unclassified.

Review MCP's `OPERATION_KINDS`, `LOG_CATEGORY_BY_KIND` and `LEVEL_FIELD_BY_CATEGORY` as the reference
for what consumers actually need, and decide which of those mappings belong here.

#### Acceptance

- SOSL and SOQL are distinguishable without inspecting the raw type string.
- Every event type maps to a kind.
- MCP can drop `FRAME_TYPES` and `KIND_BY_TYPE`.

### Alternatives considered

_None recorded._

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with src/tools/operations.ts, especially OPERATION_KINDS, LOG_CATEGORY_BY_KIND, LEVEL_FIELD_BY_CATEGORY, FRAME_TYPES, and KIND_BY_TYPE, then trace the parser classification definitions they reflect. Compare the consumer mappings with the proposed parser-level kinds and identify the event types that need coverage. Done means SOSL and SOQL are distinguishable, every event type has a kind, and MCP no longer needs its two classification tables.

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

Đánh giá

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

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.