resolve entity schema path from the classpath scan instead of a hardcoded map - #30618
resolve entity schema path from the classpath scan instead of a hardcoded map#30618Vishnuujain wants to merge 2 commits into
Conversation
…n instead of a hardcoded map
…endent of classpath scan order
Code Review ✅ Approved 1 resolved / 1 findingsDerives entity schema paths dynamically from classpath scans instead of using a hardcoded map, addressing the duplicate entity-type resolution finding. No issues found. ✅ 1 resolved✅ Edge Case: Duplicate entity-type resolution depends on classpath scan order
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
✅ Playwright Results — workflow succeededValidated commit ✅ 537 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 5 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 53m 14s ⏱️ Max setup 2m 50s · max shard execution 14m 20s · max shard-job elapsed before upload 17m 59s · reporting 4s 🌐 202.85 requests/attempt · 2.86 app boots/UI scenario · 3.95% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Describe your changes:
Fixes #30533
Entity schemas are discovered by scanning
json/schema/entity/, but were loaded by looking the entity name up in a hardcoded folder map that defaulted todata. The two drifted, so six entity types resolved to a folder they do not live in./fields/{entityType}) keep the previousdatafallback, unchanged.Fixed on
main:mcpServer,mcpExecution,aiGovernanceFramework,aiFrameworkControl,auditReport,contextMemory.Also fixes 9 entity types shipped by downstream modules on the same classpath, which a map in this repo could never cover.
Type of change:
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Checklist:
Fixes #above.Reported by @jun-su-lee, who also proposed a fix in #30534. This takes the structural approach they suggested there.
Greptile Summary
The PR replaces hardcoded entity-schema directory mappings with paths captured during classpath discovery.
datadirectory fallback for undiscovered entity types.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Scan json/schema/entity] --> B{Entity annotation present?} B -- Yes --> C[Record entity type to schema path] B -- No --> D[Ignore resource] E[Field extraction request] --> F{Discovered path exists?} F -- Yes --> G[Load recorded schema path] F -- No --> H[Load data/entityType.json fallback] C --> FReviews (2): Last reviewed commit: "gitarbot feedback: make duplicate entity..." | Re-trigger Greptile