# QA ALIGN Engineer Remediation Plan

> Internal engineering artifact. Do not send this file as the client-facing advisory report.

## System Summary

- Framework: selenium-dotnet
- Trust Level: low
- Release Decision: BLOCK
- Recommended Start Sprint: 5
- Recommended Route: 5
- Estimated Good Fix: $4800

## Engineer Execution Order

1. **Selenium 3 runtime blocks WebDriver BiDi adoption** (30 risk points) — Fix first because it has the highest mathematical impact on the release signal.
2. **No WebDriver BiDi readiness contract is present** (12 risk points) — Fix after critical trust blockers are under control.
3. **Hard sleeps preserve polling-based synchronization debt** (10 risk points) — Fix after critical trust blockers are under control.
4. **Legacy browser-driver packages prevent a governed BiDi browser matrix** (6 risk points) — Fix after critical trust blockers are under control.
5. **Browser session lifecycle is fragmented by direct window closes** (6 risk points) — Fix after critical trust blockers are under control.
6. **Legacy .NET target frameworks require an explicit modernization decision** (3 risk points) — Fix after critical trust blockers are under control.
7. **JavaScript execution dependencies require BiDi migration classification** (2 risk points) — Fix after critical trust blockers are under control.
8. **Static driver ownership obscures BiDi event-session boundaries** (1 risk points) — Fix after critical trust blockers are under control.

## Selenium 3 runtime blocks WebDriver BiDi adoption

**Severity:** high
**Impact:** blocks_trust

### Pattern Detected
Detected framework risk pattern: Selenium 3 runtime blocks WebDriver BiDi adoption

### Evidence
- Detected 13 Selenium 3 package references. WebDriver BiDi readiness cannot be proven until the supported Selenium 4 runtime and browser/driver matrix are established.

### Line-Level Remediation Targets
- `NewPageObjectLegacy/LegacyPageObjectTests/packages.config:18` — Selenium 3 package reference blocks a supported WebDriver BiDi session contract.

```
<package id="Selenium.Support" version="3.14.0" targetFramework="net452" />
```

- `NewPageObjectLegacy/LegacyPageObjectTests/packages.config:19` — Selenium 3 package reference blocks a supported WebDriver BiDi session contract.

```
<package id="Selenium.WebDriver" version="3.141.0" targetFramework="net452" />
```

- `SaaSPlatformTest/CentralLogicSaaSAutomationTests/packages.config:15` — Selenium 3 package reference blocks a supported WebDriver BiDi session contract.

```
<package id="Selenium.WebDriver" version="3.14.0" targetFramework="net452" />
```

- `SaaSPlatformTest/packages.config:18` — Selenium 3 package reference blocks a supported WebDriver BiDi session contract.

```
<package id="Selenium.Support" version="3.141.0" targetFramework="net452" />
```

- `SaaSPlatformTest/packages.config:19` — Selenium 3 package reference blocks a supported WebDriver BiDi session contract.

```
<package id="Selenium.WebDriver" version="3.141.0" targetFramework="net452" />
```

- `SeleniumTests/CentralLogic.Platform.Test/packages.config:6` — Selenium 3 package reference blocks a supported WebDriver BiDi session contract.

```
<package id="Selenium.WebDriver" version="3.12.0" targetFramework="net461" />
```


### Deterministic Fix Card

```json
{
  "target_file": "NewPageObjectLegacy/LegacyPageObjectTests/packages.config:18",
  "before_snippet": "<package id=\"Selenium.Support\" version=\"3.14.0\" targetFramework=\"net452\" />",
  "after_snippet": "assert eventually(lambda: svc.ready())",
  "verification_command": "Run the affected test area.",
  "agent_attribution": "QA ALIGN Remediation Agent: derived a deterministic fix target from framework assessment evidence.",
  "matrix_source": "pytest|Waiting & Flakiness|Sleeping for async readiness",
  "field_catalog_csv": null,
  "qa_align_solution": {
    "finding_id": "Selenium 3 runtime blocks WebDriver BiDi adoption",
    "mode": "NOT_APPLICABLE",
    "tool_id": null,
    "tool_name": null,
    "reason": "No internal tool contract matches the observed finding.",
    "expected_outputs": [],
    "verification": [],
    "fallback": "Use the conventional engineering remediation described by the fix plan."
  },
  "evidence_status": "line-level evidence provided by assessment"
}
```

### QA ALIGN Solution

- No QA ALIGN proprietary tool contract matches this finding. Use the conventional remediation below.

### Engineering Intent
Reduce the risk represented by this finding without changing unrelated test behavior.

### Likely Files To Inspect
- Review files referenced in validation evidence.
- Review framework setup, test base, and CI configuration.

### Fix Steps
1. Review the finding evidence.
2. Locate the smallest safe code area responsible for the pattern.
3. Apply a focused fix.
4. Run the narrowest relevant validation first.
5. Then rerun the full assessment.

### Do Not
- Do not perform broad rewrites without preserving test intent.
- Do not hide the symptom without correcting the pattern.
- Do not skip validation.

### Verification
- Run the affected test area.
- Rerun QA ALIGN assessment.
- Confirm trust level or finding count improves.

### Expected Impact
Reduces framework risk associated with this finding.

## No WebDriver BiDi readiness contract is present

**Severity:** high
**Impact:** weakens_release_confidence

### Pattern Detected
Detected framework risk pattern: No WebDriver BiDi readiness contract is present

### Evidence
- The suite has no executable contract proving that its target browser matrix can establish and use the BiDi capabilities the team intends to adopt.

### Line-Level Remediation Targets
- `NewPageObjectLegacy/LegacyPageObjectTests/packages.config:18` — Current Selenium dependency evidence exists, but no BiDi readiness proof was found.

```
<package id="Selenium.Support" version="3.14.0" targetFramework="net452" />
```

- `NewPageObjectLegacy/LegacyPageObjectTests/packages.config:19` — Current Selenium dependency evidence exists, but no BiDi readiness proof was found.

```
<package id="Selenium.WebDriver" version="3.141.0" targetFramework="net452" />
```


### Deterministic Fix Card

```json
{
  "target_file": "NewPageObjectLegacy/LegacyPageObjectTests/packages.config:18",
  "before_snippet": "<package id=\"Selenium.Support\" version=\"3.14.0\" targetFramework=\"net452\" />",
  "after_snippet": "minimal implicit wait + targeted WebDriverWait",
  "verification_command": "Run the affected test area.",
  "agent_attribution": "QA ALIGN Remediation Agent: derived a deterministic fix target from framework assessment evidence.",
  "matrix_source": "Selenium|Performance & Timeouts|Overusing implicit waits / raising global timeouts",
  "field_catalog_csv": null,
  "qa_align_solution": {
    "finding_id": "No WebDriver BiDi readiness contract is present",
    "mode": "NOT_APPLICABLE",
    "tool_id": null,
    "tool_name": null,
    "reason": "No internal tool contract matches the observed finding.",
    "expected_outputs": [],
    "verification": [],
    "fallback": "Use the conventional engineering remediation described by the fix plan."
  },
  "evidence_status": "line-level evidence provided by assessment"
}
```

### QA ALIGN Solution

- No QA ALIGN proprietary tool contract matches this finding. Use the conventional remediation below.

### Engineering Intent
Reduce the risk represented by this finding without changing unrelated test behavior.

### Likely Files To Inspect
- Review files referenced in validation evidence.
- Review framework setup, test base, and CI configuration.

### Fix Steps
1. Review the finding evidence.
2. Locate the smallest safe code area responsible for the pattern.
3. Apply a focused fix.
4. Run the narrowest relevant validation first.
5. Then rerun the full assessment.

### Do Not
- Do not perform broad rewrites without preserving test intent.
- Do not hide the symptom without correcting the pattern.
- Do not skip validation.

### Verification
- Run the affected test area.
- Rerun QA ALIGN assessment.
- Confirm trust level or finding count improves.

### Expected Impact
Reduces framework risk associated with this finding.

## Hard sleeps preserve polling-based synchronization debt

**Severity:** medium
**Impact:** weakens_release_confidence

### Pattern Detected
Detected framework risk pattern: Hard sleeps preserve polling-based synchronization debt

### Evidence
- Detected 137 hard sleeps across 42 files. Each started group of 15 contributes one readiness-risk point, capped at 12.

### Line-Level Remediation Targets
- `NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:22` — Hard sleep is a measurable synchronization-debt candidate for review before event-driven adoption.

```
Thread.Sleep(3000);
```

- `NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:55` — Hard sleep is a measurable synchronization-debt candidate for review before event-driven adoption.

```
Thread.Sleep(2000);
```

- `NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:57` — Hard sleep is a measurable synchronization-debt candidate for review before event-driven adoption.

```
Thread.Sleep(2000);
```

- `NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:59` — Hard sleep is a measurable synchronization-debt candidate for review before event-driven adoption.

```
Thread.Sleep(2000);
```

- `NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:61` — Hard sleep is a measurable synchronization-debt candidate for review before event-driven adoption.

```
Thread.Sleep(2000);
```

- `NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:63` — Hard sleep is a measurable synchronization-debt candidate for review before event-driven adoption.

```
Thread.Sleep(2000);
```

- `NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:65` — Hard sleep is a measurable synchronization-debt candidate for review before event-driven adoption.

```
Thread.Sleep(2000);
```

- `NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:93` — Hard sleep is a measurable synchronization-debt candidate for review before event-driven adoption.

```
Thread.Sleep(2000);
```


### Deterministic Fix Card

```json
{
  "target_file": "NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:22",
  "before_snippet": "Thread.Sleep(3000);",
  "after_snippet": "wait.until(ExpectedConditions.visibilityOf(element))",
  "verification_command": "Run the affected test area.",
  "agent_attribution": "QA ALIGN Remediation Agent: derived a deterministic fix target from framework assessment evidence.",
  "matrix_source": "Selenium|Waiting & Flakiness|Thread.sleep-based synchronization",
  "field_catalog_csv": null,
  "qa_align_solution": {
    "finding_id": "Hard sleeps preserve polling-based synchronization debt",
    "mode": "NOT_APPLICABLE",
    "tool_id": null,
    "tool_name": null,
    "reason": "No internal tool contract matches the observed finding.",
    "expected_outputs": [],
    "verification": [],
    "fallback": "Use the conventional engineering remediation described by the fix plan."
  },
  "evidence_status": "line-level evidence provided by assessment"
}
```

### QA ALIGN Solution

- No QA ALIGN proprietary tool contract matches this finding. Use the conventional remediation below.

### Engineering Intent
Reduce the risk represented by this finding without changing unrelated test behavior.

### Likely Files To Inspect
- Review files referenced in validation evidence.
- Review framework setup, test base, and CI configuration.

### Fix Steps
1. Review the finding evidence.
2. Locate the smallest safe code area responsible for the pattern.
3. Apply a focused fix.
4. Run the narrowest relevant validation first.
5. Then rerun the full assessment.

### Do Not
- Do not perform broad rewrites without preserving test intent.
- Do not hide the symptom without correcting the pattern.
- Do not skip validation.

### Verification
- Run the affected test area.
- Rerun QA ALIGN assessment.
- Confirm trust level or finding count improves.

### Expected Impact
Reduces framework risk associated with this finding.

## Legacy browser-driver packages prevent a governed BiDi browser matrix

**Severity:** high
**Impact:** weakens_release_confidence

### Pattern Detected
Detected framework risk pattern: Legacy browser-driver packages prevent a governed BiDi browser matrix

### Evidence
- Detected 12 legacy browser-driver package references. The correction landmark must prove the approved browser and driver combination rather than merely changing package versions.

### Line-Level Remediation Targets
- `NewPageObjectLegacy/LegacyPageObjectTests/packages.config:17` — Pinned legacy browser-driver package requires modernization and compatibility proof.

```
<package id="Selenium.Firefox.WebDriver" version="0.22.0" targetFramework="net461" />
```

- `NewPageObjectLegacy/LegacyPageObjectTests/packages.config:20` — Pinned legacy browser-driver package requires modernization and compatibility proof.

```
<package id="Selenium.WebDriver.ChromeDriver" version="2.44.0" targetFramework="net452" />
```

- `SaaSPlatformTest/CentralLogicSaaSAutomationTests/packages.config:13` — Pinned legacy browser-driver package requires modernization and compatibility proof.

```
<package id="Selenium.Chrome.WebDriver" version="2.45" targetFramework="net452" />
```

- `SaaSPlatformTest/CentralLogicSaaSAutomationTests/packages.config:14` — Pinned legacy browser-driver package requires modernization and compatibility proof.

```
<package id="Selenium.Firefox.WebDriver" version="0.23.0" targetFramework="net452" />
```

- `SaaSPlatformTest/packages.config:17` — Pinned legacy browser-driver package requires modernization and compatibility proof.

```
<package id="Selenium.Firefox.WebDriver" version="0.22.0" targetFramework="net461" />
```

- `SaaSPlatformTest/packages.config:20` — Pinned legacy browser-driver package requires modernization and compatibility proof.

```
<package id="Selenium.WebDriver.ChromeDriver" version="2.44.0" targetFramework="net452" />
```

- `SeleniumTests/CentralLogic.Platform.Test/packages.config:5` — Pinned legacy browser-driver package requires modernization and compatibility proof.

```
<package id="Selenium.Chrome.WebDriver" version="2.38" targetFramework="net461" />
```

- `SeleniumTests/CentralLogic.Platform.Test.Api/packages.config:6` — Pinned legacy browser-driver package requires modernization and compatibility proof.

```
<package id="Selenium.Chrome.WebDriver" version="2.38" targetFramework="net461" />
```


### Deterministic Fix Card

```json
{
  "target_file": "NewPageObjectLegacy/LegacyPageObjectTests/packages.config:17",
  "before_snippet": "<package id=\"Selenium.Firefox.WebDriver\" version=\"0.22.0\" targetFramework=\"net461\" />",
  "after_snippet": "fresh driver/session for unauth tests",
  "verification_command": "Run the affected test area.",
  "agent_attribution": "QA ALIGN Remediation Agent: derived a deterministic fix target from framework assessment evidence.",
  "matrix_source": "Selenium|Test Isolation & State|Reusing the same browser session for auth and unauth flows",
  "field_catalog_csv": null,
  "qa_align_solution": {
    "finding_id": "Legacy browser-driver packages prevent a governed BiDi browser matrix",
    "mode": "NOT_APPLICABLE",
    "tool_id": null,
    "tool_name": null,
    "reason": "No internal tool contract matches the observed finding.",
    "expected_outputs": [],
    "verification": [],
    "fallback": "Use the conventional engineering remediation described by the fix plan."
  },
  "evidence_status": "line-level evidence provided by assessment"
}
```

### QA ALIGN Solution

- No QA ALIGN proprietary tool contract matches this finding. Use the conventional remediation below.

### Engineering Intent
Reduce the risk represented by this finding without changing unrelated test behavior.

### Likely Files To Inspect
- Review files referenced in validation evidence.
- Review framework setup, test base, and CI configuration.

### Fix Steps
1. Review the finding evidence.
2. Locate the smallest safe code area responsible for the pattern.
3. Apply a focused fix.
4. Run the narrowest relevant validation first.
5. Then rerun the full assessment.

### Do Not
- Do not perform broad rewrites without preserving test intent.
- Do not hide the symptom without correcting the pattern.
- Do not skip validation.

### Verification
- Run the affected test area.
- Rerun QA ALIGN assessment.
- Confirm trust level or finding count improves.

### Expected Impact
Reduces framework risk associated with this finding.

## Browser session lifecycle is fragmented by direct window closes

**Severity:** medium
**Impact:** weakens_release_confidence

### Pattern Detected
Detected framework risk pattern: Browser session lifecycle is fragmented by direct window closes

### Evidence
- Detected 53 direct window closes and 3 driver quits. Fragmented close behavior can leave BiDi event subscriptions and evidence ownership ambiguous.

### Line-Level Remediation Targets
- `SeleniumTests/CentralLogic.Platform.Test.Api/Pages/HistoryPage.cs:25` — Direct window closure is a session-lifecycle governance candidate.

```
WebDriver.NativeDriver.Close();
```

- `SeleniumTests/CentralLogic.Platform.Test.Api/Pages/TransferPage.cs:23` — Direct window closure is a session-lifecycle governance candidate.

```
WebDriver.NativeDriver.Close();
```

- `SeleniumTests/CentralLogic.Platform.Test.Api/Pages/ViewNotesPage.cs:26` — Direct window closure is a session-lifecycle governance candidate.

```
WebDriver.NativeDriver.Close();
```

- `SeleniumTests/CentralLogic.Platform.Test.Api/Pages/ViewSummaryPage.cs:25` — Direct window closure is a session-lifecycle governance candidate.

```
WebDriver.NativeDriver.Close();
```

- `SeleniumTests/CentralLogic.Selenium.Api/WebDriver.cs:250` — Direct window closure is a session-lifecycle governance candidate.

```
NativeDriver.Close();
```

- `SeleniumTests/CentralLogic.Selenium.Api/WebDriver.cs:274` — Direct window closure is a session-lifecycle governance candidate.

```
NativeDriver.Close();
```

- `SeleniumTests/CentralLogic.TransferCenter.Test/CallEditor/Functionality by Section/Patient/MiscPatientTests.cs:139` — Direct window closure is a session-lifecycle governance candidate.

```
_webDriver.NativeDriver.Close();
```

- `SeleniumTests/CentralLogic.TransferCenter.Test/CallEditor/LefthandNavbar/CallNotesTests.cs:72` — Direct window closure is a session-lifecycle governance candidate.

```
_webDriver.NativeDriver.Close();
```


### Deterministic Fix Card

```json
{
  "target_file": "SeleniumTests/CentralLogic.Platform.Test.Api/Pages/HistoryPage.cs:25",
  "before_snippet": "WebDriver.NativeDriver.Close();",
  "after_snippet": "clear state first, visit page, assert redirect/sign-in CTA",
  "verification_command": "Run the affected test area.",
  "agent_attribution": "QA ALIGN Remediation Agent: derived a deterministic fix target from framework assessment evidence.",
  "matrix_source": "Cypress|Test Isolation & State|Reusing authenticated browser state for unauthorized scenarios",
  "field_catalog_csv": null,
  "qa_align_solution": {
    "finding_id": "Browser session lifecycle is fragmented by direct window closes",
    "mode": "NOT_APPLICABLE",
    "tool_id": null,
    "tool_name": null,
    "reason": "No internal tool contract matches the observed finding.",
    "expected_outputs": [],
    "verification": [],
    "fallback": "Use the conventional engineering remediation described by the fix plan."
  },
  "evidence_status": "line-level evidence provided by assessment"
}
```

### QA ALIGN Solution

- No QA ALIGN proprietary tool contract matches this finding. Use the conventional remediation below.

### Engineering Intent
Reduce the risk represented by this finding without changing unrelated test behavior.

### Likely Files To Inspect
- Review files referenced in validation evidence.
- Review framework setup, test base, and CI configuration.

### Fix Steps
1. Review the finding evidence.
2. Locate the smallest safe code area responsible for the pattern.
3. Apply a focused fix.
4. Run the narrowest relevant validation first.
5. Then rerun the full assessment.

### Do Not
- Do not perform broad rewrites without preserving test intent.
- Do not hide the symptom without correcting the pattern.
- Do not skip validation.

### Verification
- Run the affected test area.
- Rerun QA ALIGN assessment.
- Confirm trust level or finding count improves.

### Expected Impact
Reduces framework risk associated with this finding.

## Legacy .NET target frameworks require an explicit modernization decision

**Severity:** medium
**Impact:** weakens_release_confidence

### Pattern Detected
Detected framework risk pattern: Legacy .NET target frameworks require an explicit modernization decision

### Evidence
- Detected 15 classic .NET Framework project targets. This is not automatically defective, but each project needs an explicit retain, modernize, or retire decision before the portfolio claims BiDi readiness.

### Line-Level Remediation Targets
- `NewPageObjectLegacy/LegacyPageObjectTests/LegacyPageObjectTests.csproj:14` — Legacy target framework requires a documented compatibility and modernization decision.

```
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
```

- `SaaSPlatformTest/CelntralLogic.SaaS.Platform.Deployment/CelntralLogic.SaaS.Platform.Deployment.csproj:11` — Legacy target framework requires a documented compatibility and modernization decision.

```
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
```

- `SaaSPlatformTest/CentralLogicSaaSAutomationTests/CentralLogicSaaSAutomationTests.csproj:15` — Legacy target framework requires a documented compatibility and modernization decision.

```
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
```

- `SeleniumTests/CentralLogic.Platform.Test/CentralLogic.Platform.Test.csproj:12` — Legacy target framework requires a documented compatibility and modernization decision.

```
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
```

- `SeleniumTests/CentralLogic.Platform.Test.Api/CentralLogic.Platform.Test.Api.csproj:12` — Legacy target framework requires a documented compatibility and modernization decision.

```
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
```

- `SeleniumTests/CentralLogic.PocTest/CentralLogic.PocTest.csproj:12` — Legacy target framework requires a documented compatibility and modernization decision.

```
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
```

- `SeleniumTests/CentralLogic.Selenium.Api/CentralLogic.Selenium.Api.csproj:12` — Legacy target framework requires a documented compatibility and modernization decision.

```
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
```

- `SeleniumTests/CentralLogic.TransferCenter.Test/CentralLogic.TransferCenter.Test.csproj:12` — Legacy target framework requires a documented compatibility and modernization decision.

```
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
```


### Deterministic Fix Card

```json
{
  "target_file": "NewPageObjectLegacy/LegacyPageObjectTests/LegacyPageObjectTests.csproj:14",
  "before_snippet": "<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>",
  "after_snippet": "@BeforeEach createDriver(); test calls explicit login helper when needed",
  "verification_command": "Run the affected test area.",
  "agent_attribution": "QA ALIGN Remediation Agent: derived a deterministic fix target from framework assessment evidence.",
  "matrix_source": "Selenium|Fixtures & Setup/Teardown|Base test classes / @BeforeEach doing too much hidden setup",
  "field_catalog_csv": null,
  "qa_align_solution": {
    "finding_id": "Legacy .NET target frameworks require an explicit modernization decision",
    "mode": "NOT_APPLICABLE",
    "tool_id": null,
    "tool_name": null,
    "reason": "No internal tool contract matches the observed finding.",
    "expected_outputs": [],
    "verification": [],
    "fallback": "Use the conventional engineering remediation described by the fix plan."
  },
  "evidence_status": "line-level evidence provided by assessment"
}
```

### QA ALIGN Solution

- No QA ALIGN proprietary tool contract matches this finding. Use the conventional remediation below.

### Engineering Intent
Reduce the risk represented by this finding without changing unrelated test behavior.

### Likely Files To Inspect
- Review files referenced in validation evidence.
- Review framework setup, test base, and CI configuration.

### Fix Steps
1. Review the finding evidence.
2. Locate the smallest safe code area responsible for the pattern.
3. Apply a focused fix.
4. Run the narrowest relevant validation first.
5. Then rerun the full assessment.

### Do Not
- Do not perform broad rewrites without preserving test intent.
- Do not hide the symptom without correcting the pattern.
- Do not skip validation.

### Verification
- Run the affected test area.
- Rerun QA ALIGN assessment.
- Confirm trust level or finding count improves.

### Expected Impact
Reduces framework risk associated with this finding.

## JavaScript execution dependencies require BiDi migration classification

**Severity:** low
**Impact:** scalability_risk_only

### Pattern Detected
Detected framework risk pattern: JavaScript execution dependencies require BiDi migration classification

### Evidence
- Detected 27 script execution calls. They are not inherently wrong, but they need explicit classification before the suite claims a governed BiDi migration.

### Line-Level Remediation Targets
- `NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:143` — Script execution dependency requires retain/migrate/exception classification.

```
((IJavaScriptExecutor)Driver).ExecuteScript($"window.resizeTo({horozontal}, {vert});");
```

- `SaaSPlatformTest/CentralLogicSaaSAutomationTests/PageObjects/BasePage.cs:206` — Script execution dependency requires retain/migrate/exception classification.

```
((IJavaScriptExecutor)Driver).ExecuteScript($"window.resizeTo({horozontal}, {vert});");
```

- `SeleniumTests/CentralLogic.Selenium.Api/WebDriver.cs:113` — Script execution dependency requires retain/migrate/exception classification.

```
public object ExecuteAsyncScript(string script, params object[] args)
```

- `SeleniumTests/CentralLogic.Selenium.Api/WebDriver.cs:115` — Script execution dependency requires retain/migrate/exception classification.

```
return NativeDriver.ExecuteAsyncScript(script, args);
```

- `SeleniumTests/CentralLogic.Selenium.Api/WebDriver.cs:118` — Script execution dependency requires retain/migrate/exception classification.

```
public object ExecuteScript(string script, params object[] args)
```

- `SeleniumTests/CentralLogic.Selenium.Api/WebDriver.cs:120` — Script execution dependency requires retain/migrate/exception classification.

```
return NativeDriver.ExecuteScript(script, args);
```


### Deterministic Fix Card

```json
{
  "target_file": "NewPageObjectLegacy/LegacyPageObjectTests/PageObjects/BasePage.cs:143",
  "before_snippet": "((IJavaScriptExecutor)Driver).ExecuteScript($\"window.resizeTo({horozontal}, {vert});\");",
  "after_snippet": "if not os.getenv('BASE_URL'): pytest.skip/raise with message",
  "verification_command": "Run the affected test area.",
  "agent_attribution": "QA ALIGN Remediation Agent: derived a deterministic fix target from framework assessment evidence.",
  "matrix_source": "pytest|CI/CD & Environment Drift|Tests depend on local env (missing env vars)",
  "field_catalog_csv": null,
  "qa_align_solution": {
    "finding_id": "JavaScript execution dependencies require BiDi migration classification",
    "mode": "NOT_APPLICABLE",
    "tool_id": null,
    "tool_name": null,
    "reason": "No internal tool contract matches the observed finding.",
    "expected_outputs": [],
    "verification": [],
    "fallback": "Use the conventional engineering remediation described by the fix plan."
  },
  "evidence_status": "line-level evidence provided by assessment"
}
```

### QA ALIGN Solution

- No QA ALIGN proprietary tool contract matches this finding. Use the conventional remediation below.

### Engineering Intent
Reduce the risk represented by this finding without changing unrelated test behavior.

### Likely Files To Inspect
- Review files referenced in validation evidence.
- Review framework setup, test base, and CI configuration.

### Fix Steps
1. Review the finding evidence.
2. Locate the smallest safe code area responsible for the pattern.
3. Apply a focused fix.
4. Run the narrowest relevant validation first.
5. Then rerun the full assessment.

### Do Not
- Do not perform broad rewrites without preserving test intent.
- Do not hide the symptom without correcting the pattern.
- Do not skip validation.

### Verification
- Run the affected test area.
- Rerun QA ALIGN assessment.
- Confirm trust level or finding count improves.

### Expected Impact
Reduces framework risk associated with this finding.

## Static driver ownership obscures BiDi event-session boundaries

**Severity:** medium
**Impact:** weakens_release_confidence

### Pattern Detected
Detected framework risk pattern: Static driver ownership obscures BiDi event-session boundaries

### Evidence
- Detected 1 static driver declarations. Event ownership and teardown must be deterministic before BiDi listeners are added.

### Line-Level Remediation Targets
- `SeleniumTests/CentralLogic.TransferCenter.Test/Utilities/CentralLogicTestBase.cs:30` — Static driver declaration requires explicit event-session ownership.

```
protected static WebDriver _webDriver;
```


### Deterministic Fix Card

```json
{
  "target_file": "SeleniumTests/CentralLogic.TransferCenter.Test/Utilities/CentralLogicTestBase.cs:30",
  "before_snippet": "protected static WebDriver _webDriver;",
  "after_snippet": "fresh driver/session for unauth tests",
  "verification_command": "Run the affected test area.",
  "agent_attribution": "QA ALIGN Remediation Agent: derived a deterministic fix target from framework assessment evidence.",
  "matrix_source": "Selenium|Test Isolation & State|Reusing the same browser session for auth and unauth flows",
  "field_catalog_csv": null,
  "qa_align_solution": {
    "finding_id": "Static driver ownership obscures BiDi event-session boundaries",
    "mode": "NOT_APPLICABLE",
    "tool_id": null,
    "tool_name": null,
    "reason": "No internal tool contract matches the observed finding.",
    "expected_outputs": [],
    "verification": [],
    "fallback": "Use the conventional engineering remediation described by the fix plan."
  },
  "evidence_status": "line-level evidence provided by assessment"
}
```

### QA ALIGN Solution

- No QA ALIGN proprietary tool contract matches this finding. Use the conventional remediation below.

### Engineering Intent
Reduce the risk represented by this finding without changing unrelated test behavior.

### Likely Files To Inspect
- Review files referenced in validation evidence.
- Review framework setup, test base, and CI configuration.

### Fix Steps
1. Review the finding evidence.
2. Locate the smallest safe code area responsible for the pattern.
3. Apply a focused fix.
4. Run the narrowest relevant validation first.
5. Then rerun the full assessment.

### Do Not
- Do not perform broad rewrites without preserving test intent.
- Do not hide the symptom without correcting the pattern.
- Do not skip validation.

### Verification
- Run the affected test area.
- Rerun QA ALIGN assessment.
- Confirm trust level or finding count improves.

### Expected Impact
Reduces framework risk associated with this finding.

