apex-dev-tools / apex-dev-tools/apex-log-parser
✨ feat: Fix the event classification: split SOSL from SOQL, separate frames from methods
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2
- Forks
- 0
- Ø Merge
- 5 Std. 51 Min.
- Gemergte PRs (30 T.)
- 32
Beschreibung
### 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._
Beitragsleitfaden
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100