Skip to content

Commit 57d1e96

Browse files
committed
Add deterministic validation caching and targeted-lane deduplication to reduce redundant Playwright execution and browser startup waste - PR_26146_030-deterministic-validation-caching-and-deduplication
1 parent e6dd66d commit 57d1e96

10 files changed

Lines changed: 520 additions & 53 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:04:26.917Z
3+
Generated: 2026-05-26T19:12:03.836Z
44
Status: PASS
55

66
## Gate Order

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:04:26.917Z
3+
Generated: 2026-05-26T19:12:03.836Z
44
Status: PASS
55

66
## Lane Graph
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Lane Deduplication Report
2+
3+
Generated: 2026-05-26T19:12:03.837Z
4+
Status: PASS
5+
6+
## Summary
7+
8+
Raw lane requests: tool-runtime, tool-runtime, integration, integration
9+
Unique scheduled lanes: tool-runtime, integration
10+
Prevented duplicate lane executions: 2
11+
Prevented browser launches: 4
12+
Prevented Workspace lane reruns: 0
13+
14+
## Duplicate Requests
15+
16+
| Lane | Request Count | Duplicate Executions Prevented | Browser Launches Prevented | Status |
17+
| --- | --- | --- | --- | --- |
18+
| tool-runtime | 2 | 1 | 3 | DEDUPED |
19+
| integration | 2 | 1 | 1 | DEDUPED |
20+
21+
## Enforcement Notes
22+
23+
- Duplicate lane requests are collapsed before validation and runtime scheduling.
24+
- Already validated targeted lanes are not executed again in the same run.
25+
- Duplicate Workspace V2 lane requests are counted and suppressed before npm invocation.
26+
- Duplicate dependency chains cannot cause repeated Playwright/browser startup for the same targeted lane.

docs/dev/reports/lane_runtime_optimization_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Lane Runtime Optimization Report
22

3-
Generated: 2026-05-26T19:04:26.917Z
3+
Generated: 2026-05-26T19:12:03.837Z
44
Status: PASS
55

66
## Runtime Cost Summary
77

88
Reused runtime sessions: 2
9-
Prevented redundant browser launches: 1
10-
Prevented redundant lane execution: 3
9+
Prevented redundant browser launches: 5
10+
Prevented redundant lane execution: 5
1111
Baseline Playwright/browser launches: 4
1212
Scheduled Playwright/browser launches: 3
1313

docs/dev/reports/playwright_structure_audit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Playwright Structure Audit
22

3-
Generated: 2026-05-26T19:04:26.887Z
3+
Generated: 2026-05-26T19:12:03.801Z
44
Status: PASS
55

66
## Lane Directories

docs/dev/reports/static_validation_report.md

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

3-
Generated: 2026-05-26T19:04:26.914Z
3+
Generated: 2026-05-26T19:12:03.834Z
44
Status: PASS
55
Static only: No
66
Dry run: No

docs/dev/reports/testing_lane_execution_report.md

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

3-
Generated: 2026-05-26T19:05:55.095Z
3+
Generated: 2026-05-26T19:13:32.997Z
44
Dry run: No
55

66
## Summary
@@ -32,15 +32,26 @@ Reason: No deterministic dependency failures before runtime.
3232
Status: PASS
3333
Scheduled lane order: tool-runtime, integration
3434
Reused runtime sessions: 2
35-
Prevented redundant browser launches: 1
36-
Prevented redundant lane execution: 3
35+
Prevented redundant browser launches: 5
36+
Prevented redundant lane execution: 5
37+
38+
## Validation Cache
39+
40+
Cached validations reused: 8
41+
Validation computations: 6
42+
43+
## Lane Deduplication
44+
45+
Prevented duplicate lane executions: 2
46+
Prevented browser launches from duplicate lane requests: 4
47+
Prevented Workspace lane reruns: 0
3748

3849
## Validation Sequence
3950

4051
- PASS zero-browser preflight first: `npm run test:playwright:zero-browser`
41-
- PASS lane compilation validation second: `node ./scripts/run-targeted-test-lanes.mjs --zero-browser-only --lanes tool-runtime,integration`
42-
- PASS affected targeted runtime lanes after dependency validation: `PLAYWRIGHT_BROWSERS_PATH=0 node ./scripts/run-targeted-test-lanes.mjs --lanes tool-runtime,integration`
43-
- SKIP Workspace V2 lane: no Workspace V2 contract behavior was changed, and workspace-contract lane was not in scope.
52+
- PASS cached deterministic validation with duplicate lane requests: `node ./scripts/run-targeted-test-lanes.mjs --zero-browser-only --lanes tool-runtime,tool-runtime,integration,integration`
53+
- PASS affected targeted runtime lanes after validation: `PLAYWRIGHT_BROWSERS_PATH=0 node ./scripts/run-targeted-test-lanes.mjs --lanes tool-runtime,tool-runtime,integration,integration`
54+
- SKIP Workspace V2 lane: no Workspace V2 contract behavior was changed, and duplicate Workspace requests were not needed for the affected runtime validation.
4455
- SKIP full samples smoke: changed files do not modify sample JSON or shared sample loader/framework behavior.
4556

4657
## Lanes
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Validation Cache Report
2+
3+
Generated: 2026-05-26T19:12:03.837Z
4+
Status: PASS
5+
6+
## Cache Summary
7+
8+
Cached validations reused: 8
9+
Validations computed: 6
10+
11+
## Cache Events
12+
13+
| Stage | Cache | Input Hash | Reused By | Invalidation Inputs |
14+
| --- | --- | --- | --- | --- |
15+
| lane registration validation | MISS | d331d34f620be161 | initial computation | lane definitions change; package.json lane scripts change |
16+
| runner preflight validation | MISS | 4a29a5cb869a7876 | initial computation | lane definitions change; fixture ownership changes; targeted files change |
17+
| structural ownership validation | MISS | bc8d35347e302d46 | initial computation | fixture ownership changes; helper/import graph changes; targeted files change |
18+
| lane compilation validation | MISS | 614ff201f755c81c | initial computation | lane definitions change; targeted files change; fixture ownership changes |
19+
| lane compilation validation | HIT | 614ff201f755c81c | dependency validation input | unchanged within execution cycle |
20+
| dependency validation | MISS | ab41de7d0ff270b0 | initial computation | dependency graph changes; lane definitions change; lane compilation input changes |
21+
| zero-browser preflight | MISS | 6c43c915a37a0e95 | initial computation | lane definitions change; fixture ownership changes; helper/import graph changes; targeted files change; dependency graph changes |
22+
| structural ownership validation | HIT | bc8d35347e302d46 | static validation report | unchanged within execution cycle |
23+
| structural ownership validation | HIT | bc8d35347e302d46 | zero-browser preflight report | unchanged within execution cycle |
24+
| lane compilation validation | HIT | 614ff201f755c81c | lane compilation report | unchanged within execution cycle |
25+
| lane compilation validation | HIT | 614ff201f755c81c | runtime scheduling | unchanged within execution cycle |
26+
| dependency validation | HIT | ab41de7d0ff270b0 | dependency report | unchanged within execution cycle |
27+
| dependency validation | HIT | ab41de7d0ff270b0 | runtime scheduling | unchanged within execution cycle |
28+
| zero-browser preflight | HIT | 6c43c915a37a0e95 | zero-browser report output | unchanged within execution cycle |
29+
30+
## Deterministic Invalidation Rules
31+
32+
- Lane definitions change: lane registration, runner preflight, lane compilation, dependency validation, and scheduling caches invalidate.
33+
- Fixture ownership changes: structural ownership and runner preflight caches invalidate.
34+
- Helper/import graph changes: structural ownership validation cache invalidates.
35+
- Targeted files change: runner preflight and lane compilation caches invalidate.
36+
- Dependency graph changes: dependency validation and runtime scheduling caches invalidate.
37+
38+
## Runtime Savings Observations
39+
40+
- Structural ownership validation is computed once per runner invocation and reused by static and zero-browser reporting.
41+
- Lane compilation is computed once and reused by dependency gating, runtime scheduling, and reports.
42+
- Dependency validation is computed once and reused by zero-browser preflight, runtime scheduling, and reports.
43+
- No persistent validation cache is written to project JSON, toolState, localStorage, or sessionStorage.

docs/dev/reports/zero_browser_preflight_report.md

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

3-
Generated: 2026-05-26T19:04:26.918Z
3+
Generated: 2026-05-26T19:12:03.837Z
44
Status: PASS
55

66
## Prevented Browser Launches

0 commit comments

Comments
 (0)