LearnNewsExamplesServices
Frontmatter
id10033
titleConcept Graph Unit Tests
stateClosed
labels
enhancementaitesting
assigneestobiu
createdAtApr 15, 2026, 11:57 PM
updatedAtApr 19, 2026, 11:00 AM
githubUrlhttps://github.com/neomjs/neo/issues/10033
authortobiu
commentsCount0
parentIssue10030
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[x] 10032 ConceptService & Source Code Wiring
blocking[x] 10035 Graph Integration & GapInferenceEngine Refactor
closedAtApr 19, 2026, 11:00 AM

Concept Graph Unit Tests

Closed v13.0.0/archive-v13-0-0-chunk-4 enhancementaitesting
tobiu
tobiu commented on Apr 15, 2026, 11:57 PM

Objective

Create Playwright unit tests for the ConceptService, validating graph loading, querying, gap detection, and LLM serialization.

Context

Phase 1, Step 3 of the Concept Ontology epic (#10030). Tests validate the ConceptService from #10032.

Test File

test/playwright/unit/ai/graph/ConceptService.spec.mjs

Test Cases

Graph Loading

  • Loads valid JSONL nodes and edges
  • Handles malformed JSONL gracefully
  • Reports node/edge count statistics

Concept Tree

  • getConceptTree() returns hierarchical structure
  • Respects maxTier parameter
  • Root nodes are Tier 1 concepts

Coverage Queries

  • getConceptCoverage(id) returns all edge types
  • Returns empty arrays for uncovered concepts

Gap Detection

  • findGuideGaps() returns concepts missing EXPLAINED_BY
  • Respects minWeight threshold
  • Results sorted by weight (highest priority first)

Classification

  • classifyConcept('src/core/Config.mjs') returns "Config System" concept
  • Returns empty for unclassified files

LLM Serialization

  • serializeForLLM() produces valid tree format
  • Output under 100 lines for Tier 1-2
  • Coverage annotations are correct

Weight Calculation

  • Tier 1 > Tier 3 in weight
  • Neo-unique concepts score higher
  • Coverage deficit increases weight

Acceptance Criteria

  • All tests pass via npm run test-unit -- test/playwright/unit/ai/graph/ConceptService.spec.mjs
  • Tests use fixture JSONL data, no live graph dependency

Origin Session ID: 496c0120-29aa-4b02-a804-d5a32ff6b5eb

tobiu added the enhancement label on Apr 15, 2026, 11:57 PM
tobiu added the ai label on Apr 15, 2026, 11:57 PM
tobiu added the testing label on Apr 15, 2026, 11:57 PM
tobiu cross-referenced by #10035 on Apr 15, 2026, 11:57 PM
tobiu added parent issue #10030 on Apr 15, 2026, 11:58 PM
tobiu marked this issue as being blocked by #10032 on Apr 15, 2026, 11:58 PM
tobiu marked this issue as blocking #10035 on Apr 15, 2026, 11:58 PM
tobiu cross-referenced by PR #10047 on Apr 17, 2026, 9:38 AM
tobiu assigned to @tobiu on Apr 19, 2026, 10:24 AM
tobiu referenced in commit aaa4778 - "test: close AC-checklist coverage gaps in ConceptService.spec (#10033)" on Apr 19, 2026, 10:27 AM
tobiu cross-referenced by PR #10078 on Apr 19, 2026, 10:28 AM
tobiu referenced in commit 29fb2ac - "test: replace 100-line hard cap with observability assertion on production graph serialize (#10033)" on Apr 19, 2026, 10:42 AM
tobiu cross-referenced by #10079 on Apr 19, 2026, 10:43 AM
tobiu referenced in commit 95ffe17 - "test: close AC-checklist coverage gaps in ConceptService.spec (#10033) (#10078) on Apr 19, 2026, 11:00 AM
tobiu closed this issue on Apr 19, 2026, 11:00 AM
tobiu cross-referenced by #10080 on Apr 19, 2026, 11:16 AM
tobiu cross-referenced by PR #10084 on Apr 19, 2026, 12:20 PM
tobiu cross-referenced by #10030 on Apr 19, 2026, 12:33 PM