LearnNewsExamplesServices
Frontmatter
id11638
titlePhase 2F — Test Fixture Infrastructure: Synthetic External Workspaces + Multi-Tenant E2E Suite
stateClosed
labels
enhancementaitesting
assigneesneo-gpt
createdAtMay 19, 2026, 1:56 PM
updatedAtJun 7, 2026, 7:13 PM
githubUrlhttps://github.com/neomjs/neo/issues/11638
authorneo-opus-ada
commentsCount1
parentIssue11626
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 21, 2026, 8:00 AM

Phase 2F — Test Fixture Infrastructure: Synthetic External Workspaces + Multi-Tenant E2E Suite

Closed v13.0.0/archive-v13-0-0-chunk-12 enhancementaitesting
neo-opus-ada
neo-opus-ada commented on May 19, 2026, 1:56 PM

Context

Sub of Phase 2 Epic #11626 (meta-Epic #11624). Graduated from Discussion #11623 §8.

Substantial test scaffolding — synthetic external-workspace fixtures + end-to-end multi-tenant suite. Filed as separate sub because the fixture-authoring effort is non-trivial (each fixture mimics a real workspace shape).

The Problem

Phase 2 integration tests need synthetic external-workspace fixtures to validate cross-repo ingestion without requiring real external repos. We have one real repo (Neo); need to fake the rest.

The Fix

Create fixture directories under test/playwright/integration/ai/kb-ingestion/fixtures/external-workspaces/:

  1. mini-neo-workspace/npx neo app-shaped workspace; validates default-inheritance flow (useDefaultSources: true + custom additions)
  2. mini-es5-workspace/ — pure ES5 code; tests custom parser registration (ES5 needs different acorn options or babel)
  3. mini-cpp-workspace/ — C++ source files + pre-parsed parsed-chunk-v1 JSONL records (client-side parser simulation)
  4. mini-custom-source/ — non-standard source type (e.g., .proto files) with mock custom Source class

Each fixture includes:

  • Minimal package.json (or non-JS marker file)
  • Sample source files (3-5 per fixture)
  • Expected chunk-output JSONL (golden file for byte-equivalence regression)
  • Optional kb-config.yaml for tenant config bootstrap

Plus end-to-end multi-tenant integration suite at test/playwright/integration/ai/kb-ingestion/multi-tenant.spec.mjs:

  • Push pipeline: mock hook → ingestSourceFiles → ingestion → query → tenant isolation
  • Default-inheritance + default-exclusion variants
  • Cross-server transport parity (server-side parse vs client-side parse byte-equivalence)
  • Schema-version mismatch handling
  • Tombstone flow
  • Tenant path collision isolation
  • Backup-record rejection
  • MCP threshold → bulk path response
  • Force-push reconciliation (revision-boundary)

Acceptance Criteria

  • fixtures/external-workspaces/mini-neo-workspace/ exists with sample files + expected chunks
  • fixtures/external-workspaces/mini-es5-workspace/ exists with sample ES5 files + custom parser config
  • fixtures/external-workspaces/mini-cpp-workspace/ exists with sample C++ + pre-parsed JSONL
  • fixtures/external-workspaces/mini-custom-source/ exists with mock custom Source class
  • multi-tenant.spec.mjs covers all 9 integration scenarios listed above
  • Each fixture has README explaining its purpose + how to extend
  • CI integration: fixtures tested against current dev; regressions break build
  • Performance budget: full E2E suite runs in < 5 minutes (per Neo test-substrate norms)

Out of Scope

  • Real external repo integration (synthetic fixtures only for V1)
  • ML-driven test generation (manual fixture authoring for V1)
  • Performance benchmarking suite (separate from correctness E2E; future ticket if needed)

Related

  • Parent: #11626
  • Blocked-by: Phase 0/1 Epic completion (need stable schemas + registry)
  • Consumed by: Phase 2A, 2B, 2C, 2D, 2E (integration test substrate)
  • Discussion source: #11623 §8 test substrate (all 13 scenarios from §8)

Origin Session ID

7360e917-1733-4cdd-a6f3-5ac51c34b838

Handoff Retrieval Hints

  • test/playwright/ is the test substrate root; follow existing pattern conventions
  • Memory anchor: feedback_npx_bypass_test_isolation.md — use npm run test-unit not npx playwright
  • Memory anchor: feedback_mcp_test_location.md — MCP server tests under test/playwright/unit/ai/mcp/server/; this sub adds integration tests under test/playwright/integration/ai/kb-ingestion/
  • whitebox-e2e skill applies for any Neural Link-shaped E2E tests
tobiu referenced in commit 546e8e2 - "test(kb): add external ingestion fixtures (#11638) (#11700) on May 21, 2026, 8:00 AM
tobiu closed this issue on May 21, 2026, 8:00 AM