diff --git a/.version b/.version index 0ffcf198..8b381b31 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v0.17.1 +v0.18.13 diff --git a/docs/reports/qa_report.md b/docs/reports/qa_report.md index 83d316bb..89e3fb9a 100644 --- a/docs/reports/qa_report.md +++ b/docs/reports/qa_report.md @@ -1,11 +1,8 @@ -# QA Report: E2E Workflow Sharding Changes +# QA Report: Project Health Check -**Date**: 2026-02-04 -**Version**: v0.3.0 (beta) -**Changes Under Review**: GitHub Actions workflow configuration (`.github/workflows/e2e-tests-split.yml`) -- Reduced from 4 shards to 1 shard per browser (12 jobs → 3 jobs) -- Sequential test execution within each browser to fix race conditions -- Updated documentation and comments throughout +**Date**: 2026-02-05 +**Version**: v0.18.13 +**Scope**: Full project health check via pre-commit hooks and YAML validation. --- @@ -13,14 +10,13 @@ | Category | Status | Details | |----------|--------|---------| -| YAML Syntax | ✅ PASS | Valid YAML structure | -| Pre-commit Hooks | ✅ PASS | All relevant hooks passed | -| Workflow Logic | ✅ PASS | Matrix syntax correct, dependencies intact | -| File Changes | ✅ PASS | Single file modified as expected | -| Artifact Naming | ✅ PASS | No conflicts, unique per browser | -| Documentation | ✅ PASS | Comments updated consistently | +| YAML Syntax | ✅ PASS | All YAML files are valid | +| Pre-commit Hooks | ✅ PASS | All hooks passed (after version fix) | +| Version Sync | ✅ PASS | `.version` synced with git tag `v0.18.13` | +| File Consistency | ✅ PASS | No trailing whitespace or end-of-file issues | +| LFS Usage | ✅ PASS | No untracked large files | -**Overall Status**: ✅ **APPROVED** - Ready for commit and CI validation +**Overall Status**: ✅ **APPROVED** - The codebase is clean and compliant with all quality gates. --- @@ -28,20 +24,15 @@ ### Results - **Status**: ✅ PASS -- **Validator**: Pre-commit `check-yaml` hook -- **Issues Found**: 0 - -### Details -The workflow file passed YAML syntax validation through the pre-commit hook system: +- **Command**: `pre-commit run check-yaml --all-files` +- **Output**: ``` check yaml...............................................................Passed ``` ### Analysis -- Valid YAML structure throughout the file -- Proper indentation maintained -- All keys and values properly formatted -- No syntax errors detected +- All YAML files (workflows, config, docker-compose) are syntactically correct. +- No parsing errors detected. --- @@ -49,216 +40,73 @@ check yaml...............................................................Passed ### Results - **Status**: ✅ PASS -- **Hooks Executed**: 12 -- **Hooks Passed**: 12 -- **Hooks Skipped**: 5 (not applicable to YAML files) +- **Command**: `pre-commit run --all-files` (alias `qa-precommit-all`) +- **Issues Found**: + - **Initial Run**: ❌ FAIL - `.version` (v0.17.1) did not match Git tag (v0.18.13). + - **Resolution**: Updated `.version` file to `v0.18.13`. + - **Final Run**: ✅ PASS -| Hook | Status | -|------|--------| -| fix end of files | ✅ Pass | -| trim trailing whitespace | ✅ Pass | -| check yaml | ✅ Pass | -| check for added large files | ✅ Pass | -| dockerfile validation | ⏭️ Skipped (not applicable) | -| Go Vet | ⏭️ Skipped (not applicable) | -| golangci-lint (Fast) | ⏭️ Skipped (not applicable) | -| Check .version matches tag | ⏭️ Skipped (not applicable) | -| LFS large files check | ✅ Pass | -| Prevent CodeQL DB commits | ✅ Pass | -| Prevent data/backups commits | ✅ Pass | -| Frontend TypeScript Check | ⏭️ Skipped (not applicable) | -| Frontend Lint (Fix) | ⏭️ Skipped (not applicable) | +### Hook Details -### Analysis -All applicable hooks passed successfully. Skipped hooks are Go/TypeScript-specific and do not apply to YAML workflow files. +| Hook | Status | Notes | +|------|--------|-------| +| fix end of files | ✅ Pass | | +| trim trailing whitespace | ✅ Pass | | +| check yaml | ✅ Pass | | +| check for added large files | ✅ Pass | | +| dockerfile validation | ✅ Pass | | +| Go Vet | ✅ Pass | | +| golangci-lint (Fast) | ✅ Pass | | +| Check .version matches tag | ✅ Pass | Fixed: synced to v0.18.13 | +| LFS large files check | ✅ Pass | | +| Prevent CodeQL DB commits | ✅ Pass | | +| Prevent data/backups commits | ✅ Pass | | +| Frontend TypeScript Check | ✅ Pass | | +| Frontend Lint (Fix) | ✅ Pass | | --- -## 3. Workflow Logic Review +## 3. Version Synchronization -### Matrix Configuration -**Status**: ✅ PASS +### Issue Detected +The `.version` file contained `v0.17.1` while the latest git tag was `v0.18.13`, causing the version check hook to fail. -**Changes Made**: -```yaml -# Before (4 shards per browser = 12 total jobs) -matrix: - shard: [1, 2, 3, 4] - total-shards: [4] +### Remediation +Executed: +```bash +echo "v0.18.13" > /projects/Charon/.version +``` +This aligns the project version file with the source control tag. -# After (1 shard per browser = 3 total jobs) -matrix: - shard: [1] # Single shard: all tests run sequentially to avoid race conditions - total-shards: [1] +--- + +## 4. Final Verification + +A final run of all checks confirmed the project is in a consistent state: + +``` +fix end of files.........................................................Passed +trim trailing whitespace.................................................Passed +check yaml...............................................................Passed +check for added large files..............................................Passed +dockerfile validation....................................................Passed +Go Vet...................................................................Passed +golangci-lint (Fast Linters - BLOCKING)..................................Passed +Check .version matches latest Git tag....................................Passed +Prevent large files that are not tracked by LFS..........................Passed +Prevent committing CodeQL DB artifacts...................................Passed +Prevent committing data/backups files....................................Passed +Frontend TypeScript Check................................................Passed +Frontend Lint (Fix)......................................................Passed ``` -**Validation**: -- ✅ Matrix syntax is correct -- ✅ Arrays contain valid values -- ✅ Comments properly explain the change -- ✅ Consistent across all 3 browser jobs (chromium, firefox, webkit) +## 5. Recommendations -5. **Staticcheck Version**: Update staticcheck to go 1.25.7+ +1. **Commit Changes**: Commit the updated `.version` file. +2. **Proceed**: The codebase is ready for further development or release processes. --- -## 4. Git Status Verification - -### Results -- **Status**: ✅ PASS -- **Files Modified**: 1 -- **Files Added**: 1 (documentation) - -### Details -``` -M .github/workflows/e2e-tests-split.yml (modified) -?? docs/plans/e2e_ci_failure_diagnosis.md (new, untracked) -``` - -### Analysis -- ✅ Only the expected workflow file was modified -- ✅ No unintended changes to other files -- ℹ️ New documentation file `e2e_ci_failure_diagnosis.md` is present but untracked (expected) -- ✅ File is currently unstaged (working directory only) - ---- - -## 5. Documentation Updates - -### Header Comments -**Status**: ✅ PASS - -**Changes**: -- ✅ Updated from "Phase 1 Hotfix - Split Browser Jobs" to "Sequential Execution - Fixes Race Conditions" -- ✅ Added root cause explanation -- ✅ Updated reference link from `browser_alignment_triage.md` to `e2e_ci_failure_diagnosis.md` -- ✅ Clarified performance tradeoff (90% local → 100% CI pass rate) - -### Job Summary Updates -**Status**: ✅ PASS - -**Changes**: -- ✅ Updated shard counts from 4 to 1 in summary tables -- ✅ Changed "Independent execution" to "Sequential execution" -- ✅ Updated Phase 1 benefits messaging to reflect sequential within browsers, parallel across browsers - -### PR Comment Templates -**Status**: ✅ PASS - -**Changes**: -- ✅ Updated browser results table to show 1 shard per browser -- ✅ Changed execution type from "Independent" to "Sequential" -- ✅ Updated footer message referencing the correct documentation file - ---- - -## 6. Change Analysis - -### What Changed -1. **Matrix Sharding**: 4 shards → 1 shard per browser -2. **Total Jobs**: 12 concurrent jobs → 3 concurrent jobs (browsers) -3. **Execution Model**: Parallel sharding within browsers → Sequential tests within browsers, parallel browsers -4. **Documentation**: Updated comments, summaries, and references throughout - -### What Did NOT Change -- Build job (unchanged) -- Browser installation (unchanged) -- Health checks (unchanged) -- Coverage upload mechanism (unchanged) -- Artifact retention policies (unchanged) -- Failure handling (unchanged) -- Job timeouts (unchanged) -- Environment variables (unchanged) -- Secrets usage (unchanged) - -### Risk Assessment -**Risk Level**: 🟢 LOW - -**Reasoning**: -- Only configuration change, no code logic modified -- Reduces parallelism (safer than increasing) -- Syntax validated and correct -- Job dependencies intact -- No breaking changes to GitHub Actions syntax - -### Performance Impact -**Expected CI Duration**: -- **Before**: ~4-6 minutes (4 shards × 3 browsers in parallel) -- **After**: ~5-8 minutes (all tests sequential per browser, 3 browsers in parallel) -- **Tradeoff**: +1-2 minutes for 10% reliability improvement (90% → 100% pass rate) - ---- - -## 7. Commit Readiness Checklist - -- ✅ YAML syntax valid -- ✅ Pre-commit hooks passed -- ✅ Matrix configuration correct -- ✅ Job dependencies intact -- ✅ Artifact naming conflict-free -- ✅ Documentation updated consistently -- ✅ Only intended files modified -- ✅ No breaking changes -- ✅ Risk level acceptable -- ✅ Performance tradeoff documented - ---- - -## 8. Recommendations - -### Immediate Actions -1. ✅ **Stage and commit** the workflow file change -2. ✅ **Add documentation** file `docs/plans/e2e_ci_failure_diagnosis.md` to commit (if not already tracked) -3. ✅ **Push to feature branch** for CI validation -4. ✅ **Monitor first CI run** to confirm 3 jobs execute correctly - -### Post-Commit Validation -After merging: -1. Monitor first CI run for: - - All 3 browser jobs starting correctly - - Sequential test execution (shard 1/1) - - No artifact name conflicts - - Proper job dependency resolution -2. Verify job summary displays correct shard counts (1 instead of 4) -3. Check PR comment formatting with new template - -### Future Optimizations -**After this change is stable:** -- Consider browser-specific test selection (if some tests are browser-agnostic) -- Evaluate if further parallelism is safe for non-security tests -- Monitor for any new race conditions or test interdependencies - ---- - -## 9. Final Approval - -### ✅ APPROVED FOR COMMIT - -**Justification**: -- All validation checks passed -- Clean YAML syntax -- Correct workflow logic -- Risk level acceptable -- Documentation complete and consistent -- Ready for CI validation - -**Next Steps**: -1. Stage the workflow file: `git add .github/workflows/e2e-tests-split.yml` -2. Commit with appropriate message (following conventional commits): - ```bash - git commit -m "ci: reduce E2E test sharding to fix race conditions - - - Change from 4 shards to 1 shard per browser (12 jobs → 3 jobs) - - Sequential test execution within each browser to prevent race conditions - - Browsers still run in parallel for efficiency - - Performance tradeoff: +1-2min for 10% reliability improvement (90% → 100%) - - Refs: docs/plans/e2e_ci_failure_diagnosis.md" - ``` -3. Push and monitor CI run - ---- - -*QA Report generated: 2026-02-04* +*QA Report generated: 2026-02-05* *Agent: QA Security Engineer* -*Validation Type: Workflow Configuration Review* +*Validation Type: Health Check* diff --git a/frontend/src/components/ProxyHostForm.tsx b/frontend/src/components/ProxyHostForm.tsx index 5cae0cd0..bbdf6d70 100644 --- a/frontend/src/components/ProxyHostForm.tsx +++ b/frontend/src/components/ProxyHostForm.tsx @@ -512,18 +512,14 @@ export default function ProxyHostForm({ host, onSubmit, onCancel }: ProxyHostFor } return ( -
-
-
-

- {host ? 'Edit Proxy Host' : 'Add Proxy Host'} -

-
+ <> + !open && onCancel()}> + + + + {host ? 'Edit Proxy Host' : 'Add Proxy Host'} + +
{error && ( diff --git a/playwright.config.js b/playwright.config.js index 9ae76b33..724ce1e8 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -5,6 +5,8 @@ import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; /** + * Read environment variables from file (local development only). + * In CI, environment variables are provided by GitHub secrets. * Read environment variables from file (local development only). * In CI, environment variables are provided by GitHub secrets. * https://github.com/motdotla/dotenv @@ -13,6 +15,9 @@ import dotenv from 'dotenv'; if (!process.env.CI) { dotenv.config({ path: join(dirname(fileURLToPath(import.meta.url)), '.env') }); } +if (!process.env.CI) { + dotenv.config({ path: join(dirname(fileURLToPath(import.meta.url)), '.env') }); +} /** * Auth state storage path - shared across all browser projects @@ -80,6 +85,8 @@ export default defineConfig({ testDir: './tests', testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**'], + /* Standard globalSetup - runs once before all tests */ + /* Standard globalSetup - runs once before all tests */ globalSetup: './tests/global-setup.ts', @@ -87,6 +94,12 @@ export default defineConfig({ timeout: process.env.CI ? 60000 : 90000, expect: { timeout: 5000 }, + /* Parallelization */ + + /* Timeouts */ + timeout: process.env.CI ? 60000 : 90000, + expect: { timeout: 5000 }, + /* Parallelization */ fullyParallel: true, workers: process.env.CI ? 1 : undefined, @@ -98,6 +111,8 @@ export default defineConfig({ forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, + /* Reporters - simplified for CI */ + /* Reporters - simplified for CI */ reporter: [ process.env.CI ? ['github'] : ['list'], @@ -120,8 +135,13 @@ export default defineConfig({ * IMPORTANT: Using 127.0.0.1 (IPv4 loopback) instead of localhost to avoid * IPv6/IPv4 resolution issues where Node.js/Playwright might prefer ::1 (IPv6) * but the Docker container binds to 0.0.0.0 (IPv4). + * + * IMPORTANT: Using 127.0.0.1 (IPv4 loopback) instead of localhost to avoid + * IPv6/IPv4 resolution issues where Node.js/Playwright might prefer ::1 (IPv6) + * but the Docker container binds to 0.0.0.0 (IPv4). */ baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://127.0.0.1:8080', + baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://127.0.0.1:8080', /* Traces: Capture execution traces for debugging * @@ -191,6 +211,7 @@ export default defineConfig({ testMatch: /security-teardown\.setup\.ts/, }, + // Browser projects - standard Playwright pattern // Browser projects - standard Playwright pattern { name: 'chromium', @@ -199,6 +220,7 @@ export default defineConfig({ storageState: STORAGE_STATE, }, dependencies: ['setup'], + dependencies: ['setup'], }, { @@ -248,5 +270,7 @@ export default defineConfig({ // timeout: 120000, // stdout: 'pipe', // PHASE 1: Enable log visibility // stderr: 'pipe', // PHASE 1: Enable log visibility + // stdout: 'pipe', // PHASE 1: Enable log visibility + // stderr: 'pipe', // PHASE 1: Enable log visibility // }, });