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/:
mini-neo-workspace/ — npx neo app-shaped workspace; validates default-inheritance flow (useDefaultSources: true + custom additions)
mini-es5-workspace/ — pure ES5 code; tests custom parser registration (ES5 needs different acorn options or babel)
mini-cpp-workspace/ — C++ source files + pre-parsed parsed-chunk-v1 JSONL records (client-side parser simulation)
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
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
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/:mini-neo-workspace/—npx neo app-shaped workspace; validates default-inheritance flow (useDefaultSources: true+ custom additions)mini-es5-workspace/— pure ES5 code; tests custom parser registration (ES5 needs different acorn options or babel)mini-cpp-workspace/— C++ source files + pre-parsedparsed-chunk-v1JSONL records (client-side parser simulation)mini-custom-source/— non-standard source type (e.g.,.protofiles) with mock custom Source classEach fixture includes:
package.json(or non-JS marker file)kb-config.yamlfor tenant config bootstrapPlus end-to-end multi-tenant integration suite at
test/playwright/integration/ai/kb-ingestion/multi-tenant.spec.mjs:ingestSourceFiles→ ingestion → query → tenant isolationAcceptance Criteria
fixtures/external-workspaces/mini-neo-workspace/exists with sample files + expected chunksfixtures/external-workspaces/mini-es5-workspace/exists with sample ES5 files + custom parser configfixtures/external-workspaces/mini-cpp-workspace/exists with sample C++ + pre-parsed JSONLfixtures/external-workspaces/mini-custom-source/exists with mock custom Source classmulti-tenant.spec.mjscovers all 9 integration scenarios listed aboveOut of Scope
Related
Origin Session ID
7360e917-1733-4cdd-a6f3-5ac51c34b838Handoff Retrieval Hints
test/playwright/is the test substrate root; follow existing pattern conventionsfeedback_npx_bypass_test_isolation.md— usenpm run test-unitnotnpx playwrightfeedback_mcp_test_location.md— MCP server tests undertest/playwright/unit/ai/mcp/server/; this sub adds integration tests undertest/playwright/integration/ai/kb-ingestion/whitebox-e2eskill applies for any Neural Link-shaped E2E tests