Skip to content

Commit e619a4d

Browse files
committed
Reduce Playwright discovery scope and prevent broad filesystem scans during targeted lane execution - PR_26146_032-playwright-discovery-scope-and-scan-reduction
1 parent 2770059 commit e619a4d

14 files changed

Lines changed: 869 additions & 101 deletions

docs/dev/reports/dependency_gating_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dependency Gating Report
22

3-
Generated: 2026-05-26T19:30:40.928Z
3+
Generated: 2026-05-26T19:43:53.674Z
44
Status: PASS
55

66
## Gate Order
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Filesystem Scan Reduction Report
2+
3+
Generated: 2026-05-26T19:43:53.658Z
4+
Status: PASS
5+
6+
## Scan Enforcement
7+
8+
| Path | Status | Reason |
9+
| --- | --- | --- |
10+
| tests/playwright | PREVENTED | Targeted lanes supplied explicit spec files; global Playwright discovery was not used. |
11+
| tests/helpers | SCOPED | Helper discovery used the targeted import graph instead of enumerating every helper. |
12+
| games/ | SCOPED | Game fixture discovery used explicit manifest/path references from targeted files. |
13+
| tests/playwright/engine | SKIP | Unselected lane directory discovery was skipped. |
14+
| tests/playwright/games | SKIP | Unselected lane directory discovery was skipped. |
15+
| tests/playwright/integration | SCOPED | Selected lane discovery was restricted to explicit target specs. |
16+
| tests/playwright/tools | SCOPED | Selected lane discovery was restricted to explicit target specs. |
17+
18+
## Runtime Savings Observations
19+
20+
- Scoped discovery prevented broad Playwright lane-directory enumeration for targeted execution.
21+
- Helper and fixture inputs are explicit, allowing the runner to cache the discovery map within one execution cycle.
22+
- Deterministic discovery-scope failures block Playwright launch instead of expanding into fallback lanes.
23+
- Full samples smoke remains outside targeted discovery unless samples scope is explicitly active.
24+
25+
## Blockers
26+
27+
No scan-scope blockers.

docs/dev/reports/lane_compilation_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lane Compilation Report
22

3-
Generated: 2026-05-26T19:30:40.927Z
3+
Generated: 2026-05-26T19:43:53.674Z
44
Status: PASS
55

66
## Lane Graph

docs/dev/reports/lane_deduplication_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lane Deduplication Report
22

3-
Generated: 2026-05-26T19:30:40.928Z
3+
Generated: 2026-05-26T19:43:53.674Z
44
Status: PASS
55

66
## Summary

docs/dev/reports/lane_runtime_optimization_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lane Runtime Optimization Report
22

3-
Generated: 2026-05-26T19:30:40.928Z
3+
Generated: 2026-05-26T19:43:53.674Z
44
Status: PASS
55

66
## Runtime Cost Summary

docs/dev/reports/playwright_discovery_ownership_report.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Playwright Discovery Ownership Report
22

3-
Generated: 2026-05-26T19:30:40.904Z
3+
Generated: 2026-05-26T19:43:53.654Z
44
Status: PASS
55

66
## Discovery-Time Ownership
@@ -9,25 +9,16 @@ Status: PASS
99
| --- | --- | --- | --- | --- | --- | --- |
1010
| tests/playwright/tools/AssetManagerV2.spec.mjs | tools | tools | tests/playwright/tools | none | PASS | tool-specific filename: AssetManagerV2 |
1111
| tests/playwright/tools/CollisionInspectorV2.spec.mjs | tools | tools | tests/playwright/tools | none | PASS | tool-specific filename: CollisionInspectorV2 |
12-
| tests/playwright/tools/ObjectVectorStudioV2FirstClassToolStarter.spec.mjs | tools | tools | tests/playwright/tools | none | PASS | tool-specific filename: ObjectVectorStudioV2 |
1312
| tests/playwright/tools/PreviewGeneratorV2Baseline.spec.mjs | tools | tools | tests/playwright/tools | none | PASS | tool-specific filename: PreviewGeneratorV2 |
14-
| tests/playwright/tools/WorkspaceManagerV2.spec.mjs | tools | tools | tests/playwright/tools | none | PASS | tool-specific filename: WorkspaceManagerV2 |
15-
| tests/playwright/games/AsteroidsBackgroundAssetResolution.spec.mjs | games | games | tests/playwright/games | none | PASS | game-specific filename: Asteroids |
16-
| tests/playwright/games/AsteroidsBeatTiming.spec.mjs | games | games | tests/playwright/games | none | PASS | game-specific filename: Asteroids |
17-
| tests/playwright/games/AsteroidsGameSceneCleanup.spec.mjs | games | games | tests/playwright/games | none | PASS | game-specific filename: Asteroids |
18-
| tests/playwright/games/AsteroidsShipStateVisuals.spec.mjs | games | games | tests/playwright/games | none | PASS | game-specific filename: Asteroids |
1913
| tests/playwright/integration/GameIndexPreviewManifestResolution.spec.mjs | integration | integration | tests/playwright/integration | none | PASS | integration filename marker: GameIndex, ManifestResolution |
2014

2115
## Shared Helper Naming
2216

2317
| File | Detected Ownership | Expected Location | Status | Reason |
2418
| --- | --- | --- | --- | --- |
25-
| tests/helpers/playwrightCtrlTapClick.mjs | shared | tests/helpers | PASS | Generic shared helper name. |
2619
| tests/helpers/playwrightRepoServer.mjs | shared | tests/helpers | PASS | Intentionally shared helper is documented. |
2720
| tests/helpers/playwrightStorageIsolation.mjs | shared | tests/helpers | PASS | Intentionally shared helper is documented. |
2821
| tests/helpers/playwrightV8CoverageReporter.mjs | shared | tests/helpers | PASS | Generic shared helper name. |
29-
| tests/helpers/runtimeSceneLoaderHotReload.helpers.mjs | shared | tests/helpers | PASS | Generic shared helper name. |
30-
| tests/helpers/testCoverageCatalog.mjs | shared | tests/helpers | PASS | Generic shared helper name. |
3122
| tests/helpers/workspaceV2CoverageReporter.mjs | shared | tests/helpers | PASS | Intentionally shared helper is documented. |
3223

3324
## Blocking Findings
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Playwright Discovery Scope Report
2+
3+
Generated: 2026-05-26T19:43:53.656Z
4+
Status: PASS
5+
Scoped discovery: Yes
6+
7+
## Targeted Discovery Scope
8+
9+
| Role | File | Status | Reason |
10+
| --- | --- | --- | --- |
11+
| target spec | tests/playwright/integration/GameIndexPreviewManifestResolution.spec.mjs | PASS | Explicit target is inside the selected discovery lane scope. |
12+
| target spec | tests/playwright/tools/AssetManagerV2.spec.mjs | PASS | Explicit target is inside the selected discovery lane scope. |
13+
| target spec | tests/playwright/tools/CollisionInspectorV2.spec.mjs | PASS | Explicit target is inside the selected discovery lane scope. |
14+
| target spec | tests/playwright/tools/PreviewGeneratorV2Baseline.spec.mjs | PASS | Explicit target is inside the selected discovery lane scope. |
15+
| required shared helper | tests/helpers/playwrightRepoServer.mjs | PASS | Required shared helper was resolved from targeted spec imports. |
16+
| required shared helper | tests/helpers/playwrightStorageIsolation.mjs | PASS | Required shared helper was resolved from targeted spec imports. |
17+
| required shared helper | tests/helpers/playwrightV8CoverageReporter.mjs | PASS | Required shared helper was resolved from targeted spec imports. |
18+
| required shared helper | tests/helpers/workspaceV2CoverageReporter.mjs | PASS | Required shared helper was resolved from targeted spec imports. |
19+
| required fixture | games/Asteroids/game.manifest.json | PASS | Explicit fixture was resolved from lane configuration or targeted file references. |
20+
| required fixture | games/GravityWell/game.manifest.json | PASS | Explicit fixture was resolved from lane configuration or targeted file references. |
21+
| required fixture | games/Pong/game.manifest.json | PASS | Explicit fixture was resolved from lane configuration or targeted file references. |
22+
| required fixture | tests/fixtures/workspace-v2/uat.manifest.json | PASS | Explicit fixture was resolved from lane configuration or targeted file references. |
23+
24+
## Scope Guard
25+
26+
- Targeted lane discovery must use explicit spec files instead of lane-directory targets.
27+
- Required shared helpers must be resolved from targeted imports.
28+
- Required fixtures must come from lane configuration or targeted file references.
29+
- Unaffected Workspace/global lanes must remain outside targeted discovery scope.
30+
- Ownership failures are deterministic blockers and do not trigger fallback discovery expansion.
31+
32+
## Blockers
33+
34+
No scoped discovery blockers.

docs/dev/reports/playwright_structure_audit.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Playwright Structure Audit
22

3-
Generated: 2026-05-26T19:30:40.892Z
3+
Generated: 2026-05-26T19:43:53.641Z
44
Status: PASS
55

66
## Lane Directories
77

88
| Directory | Status | Reason |
99
| --- | --- | --- |
10-
| tests/playwright/games | PASS | Directory is an allowed Playwright lane ownership bucket. |
11-
| tests/playwright/integration | PASS | Directory is an allowed Playwright lane ownership bucket. |
12-
| tests/playwright/tools | PASS | Directory is an allowed Playwright lane ownership bucket. |
13-
| tests/playwright/engine | SKIP | No engine Playwright specs are currently present; engine lane may be empty. |
10+
| tests/playwright/engine | SKIP | Lane was not selected, so targeted discovery did not enumerate this directory. |
11+
| tests/playwright/games | SKIP | Lane was not selected, so targeted discovery did not enumerate this directory. |
12+
| tests/playwright/integration | PASS | Scoped discovery is limited to explicit target file(s): tests/playwright/integration/GameIndexPreviewManifestResolution.spec.mjs. |
13+
| tests/playwright/tools | PASS | Scoped discovery is limited to explicit target file(s): tests/playwright/tools/AssetManagerV2.spec.mjs, tests/playwright/tools/CollisionInspectorV2.spec.mjs, tests/playwright/tools/PreviewGeneratorV2Baseline.spec.mjs. |
1414

1515
## Blocking Findings
1616

@@ -32,7 +32,6 @@ No blocking structural findings.
3232
| --- | --- | --- | --- |
3333
| tools | tests/playwright/tools/AssetManagerV2.spec.mjs | Asteroids, GravityWell, Pong | Tool runtime validation uses repo/game manifests as explicit asset payload fixtures. |
3434
| tools | tests/playwright/tools/CollisionInspectorV2.spec.mjs | Asteroids | Tool runtime validation uses game manifests as explicit collision payload fixtures. |
35-
| tools | tests/playwright/tools/WorkspaceManagerV2.spec.mjs | AITargetDummy, Asteroids, Bouncing-ball, Breakout, GravityWell, Pacman, Pong, SolarSystem, SpaceDuel, SpaceInvaders, vector-arcade-sample | Workspace contract validation uses game manifests as explicit launch/toolState fixtures. |
3635
| integration | tests/playwright/integration/GameIndexPreviewManifestResolution.spec.mjs | Pong | Integration validation uses Pong as an explicit cross-surface manifest handoff fixture. |
3736

3837
## Import Targets
@@ -41,20 +40,11 @@ No blocking structural findings.
4140
| --- | --- | --- |
4241
| tests/playwright/tools/AssetManagerV2.spec.mjs | PASS | none |
4342
| tests/playwright/tools/CollisionInspectorV2.spec.mjs | PASS | none |
44-
| tests/playwright/tools/ObjectVectorStudioV2FirstClassToolStarter.spec.mjs | PASS | none |
4543
| tests/playwright/tools/PreviewGeneratorV2Baseline.spec.mjs | PASS | none |
46-
| tests/playwright/tools/WorkspaceManagerV2.spec.mjs | PASS | none |
47-
| tests/playwright/games/AsteroidsBackgroundAssetResolution.spec.mjs | PASS | none |
48-
| tests/playwright/games/AsteroidsBeatTiming.spec.mjs | PASS | none |
49-
| tests/playwright/games/AsteroidsGameSceneCleanup.spec.mjs | PASS | none |
50-
| tests/playwright/games/AsteroidsShipStateVisuals.spec.mjs | PASS | none |
5144
| tests/playwright/integration/GameIndexPreviewManifestResolution.spec.mjs | PASS | none |
52-
| tests/helpers/playwrightCtrlTapClick.mjs | PASS | none |
5345
| tests/helpers/playwrightRepoServer.mjs | PASS | none |
5446
| tests/helpers/playwrightStorageIsolation.mjs | PASS | none |
5547
| tests/helpers/playwrightV8CoverageReporter.mjs | PASS | none |
56-
| tests/helpers/runtimeSceneLoaderHotReload.helpers.mjs | PASS | none |
57-
| tests/helpers/testCoverageCatalog.mjs | PASS | none |
5848
| tests/helpers/workspaceV2CoverageReporter.mjs | PASS | none |
5949

6050
## Intentionally Shared Helpers

docs/dev/reports/static_validation_report.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Static Validation Report
22

3-
Generated: 2026-05-26T19:30:40.925Z
3+
Generated: 2026-05-26T19:43:53.671Z
44
Status: PASS
55
Static only: No
66
Dry run: No
@@ -23,6 +23,8 @@ Reason: No deterministic static validation failure was found.
2323
| invalid filename detection | PASS | Covered by Playwright structure audit. |
2424
| missing import detection | PASS | Covered by Playwright structure audit relative import checks. |
2525
| missing fixture detection | PASS | No missing fixture findings. |
26+
| scoped discovery targets | PASS | tests/playwright/integration/GameIndexPreviewManifestResolution.spec.mjs; tests/playwright/tools/AssetManagerV2.spec.mjs; tests/playwright/tools/CollisionInspectorV2.spec.mjs; tests/playwright/tools/PreviewGeneratorV2Baseline.spec.mjs |
27+
| broad scan prevention | PASS | Discovery map read 8 targeted file(s)/helper(s); lane-directory enumeration is delegated only to standalone broad audit mode. |
2628
| invalid lane target detection | PASS | No invalid lane target findings. |
2729
| Windows quoting hazard detection | PASS | Lane tool-runtime grep pattern is passed as a literal Node argv value: launch guard|temporary UAT context|rejects non-Workspace |
2830
| duplicate lane registration detection | PASS | No duplicate lane registrations found. |

docs/dev/reports/testing_lane_execution_report.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Testing Lane Execution Report
22

3-
Generated: 2026-05-26T19:31:59.716Z
3+
Generated: 2026-05-26T19:45:29.919Z
44
Dry run: No
55

66
## Summary
@@ -19,7 +19,7 @@ Reason: Skipped because changed files do not modify sample JSON or shared sample
1919

2020
Status: PASS
2121
Reason: Runner preflight and Playwright structure audit passed before expensive lane execution.
22-
Command: C:\nvm4w\nodejs\node.exe scripts/audit-playwright-test-locations.mjs --discovery-report docs/dev/reports/playwright_discovery_ownership_report.md
22+
Command: C:\nvm4w\nodejs\node.exe scripts/audit-playwright-test-locations.mjs --discovery-report docs/dev/reports/playwright_discovery_ownership_report.md --scope-report docs/dev/reports/playwright_discovery_scope_report.md --scan-report docs/dev/reports/filesystem_scan_reduction_report.md --lanes tool-runtime,integration --targets tests/playwright/integration/GameIndexPreviewManifestResolution.spec.mjs,tests/playwright/tools/AssetManagerV2.spec.mjs,tests/playwright/tools/CollisionInspectorV2.spec.mjs,tests/playwright/tools/PreviewGeneratorV2Baseline.spec.mjs --helpers tests/helpers/playwrightRepoServer.mjs,tests/helpers/playwrightStorageIsolation.mjs,tests/helpers/playwrightV8CoverageReporter.mjs,tests/helpers/workspaceV2CoverageReporter.mjs --fixtures games/Asteroids/game.manifest.json,games/GravityWell/game.manifest.json,games/Pong/game.manifest.json,tests/fixtures/workspace-v2/uat.manifest.json
2323
Details: Lane tool-runtime grep pattern is passed as a literal Node argv value: launch guard|temporary UAT context|rejects non-Workspace
2424

2525
## Dependency Gate
@@ -37,23 +37,25 @@ Prevented redundant lane execution: 3
3737

3838
## Validation Cache
3939

40-
Cached validations reused: 8
41-
Validation computations: 6
40+
Cached validations reused: 10
41+
Validation computations: 7
42+
43+
## Discovery Scope
44+
45+
Status: PASS
46+
Target files: tests/playwright/integration/GameIndexPreviewManifestResolution.spec.mjs, tests/playwright/tools/AssetManagerV2.spec.mjs, tests/playwright/tools/CollisionInspectorV2.spec.mjs, tests/playwright/tools/PreviewGeneratorV2Baseline.spec.mjs
47+
Required shared helpers: tests/helpers/playwrightRepoServer.mjs, tests/helpers/playwrightStorageIsolation.mjs, tests/helpers/playwrightV8CoverageReporter.mjs, tests/helpers/workspaceV2CoverageReporter.mjs
48+
Required fixtures: games/Asteroids/game.manifest.json, games/GravityWell/game.manifest.json, games/Pong/game.manifest.json, tests/fixtures/workspace-v2/uat.manifest.json
49+
Targeted file/helper reads: 8
50+
Cached discovery reuse: Yes
51+
Prevented fallback expansion: Yes; no ownership or scope blocker widened into broad discovery.
4252

4353
## Lane Deduplication
4454

4555
Prevented duplicate lane executions: 0
4656
Prevented browser launches from duplicate lane requests: 0
4757
Prevented Workspace lane reruns: 0
4858

49-
## Validation Sequence
50-
51-
- PASS discovery ownership validation first: `node ./scripts/audit-playwright-test-locations.mjs --discovery-report docs/dev/reports/playwright_discovery_ownership_report.md`
52-
- PASS affected targeted runtime lanes after discovery passed: `PLAYWRIGHT_BROWSERS_PATH=0 node ./scripts/run-targeted-test-lanes.mjs --lanes tool-runtime,integration`
53-
- SKIP Workspace V2 full lane: workspace-contract behavior was not changed.
54-
- SKIP engine/src lane: engine/src runtime behavior was not changed.
55-
- SKIP full samples smoke: changed files do not modify sample JSON or shared sample loader/framework behavior.
56-
5759
## Lanes
5860

5961
| Lane | Status | Executed/Skipped Reason | Affected Surface | Fixtures / Inputs |

0 commit comments

Comments
 (0)