feat: add ManualDNSChallenge component and related hooks for manual DNS challenge management
- Implemented `useManualChallenge`, `useChallengePoll`, and `useManualChallengeMutations` hooks for managing manual DNS challenges. - Created tests for the `useManualChallenge` hooks to ensure correct fetching and mutation behavior. - Added `ManualDNSChallenge` component for displaying challenge details and actions. - Developed end-to-end tests for the Manual DNS Provider feature, covering provider selection, challenge UI, and accessibility compliance. - Included error handling tests for verification failures and network errors.
This commit is contained in:
18
.github/agents/Managment.agent.md
vendored
18
.github/agents/Managment.agent.md
vendored
@@ -72,22 +72,30 @@ You are "lazy" in the smartest way possible. You never do what a subordinate can
|
||||
|
||||
The task is not complete until ALL of the following pass with zero issues:
|
||||
|
||||
1. **Coverage Tests (MANDATORY - Verify Explicitly)**:
|
||||
1. **Playwright E2E Tests (MANDATORY - Run First)**:
|
||||
- **Run**: `npx playwright test --project=chromium` from project root
|
||||
- **Why First**: If the app is broken at E2E level, unit tests may need updates. Catch integration issues early.
|
||||
- **Scope**: Run tests relevant to modified features (e.g., `tests/manual-dns-provider.spec.ts`)
|
||||
- **On Failure**: Trace root cause through frontend → backend flow before proceeding
|
||||
- **Base URL**: Uses `PLAYWRIGHT_BASE_URL` or default from `playwright.config.js`
|
||||
- All E2E tests must pass before proceeding to unit tests
|
||||
|
||||
2. **Coverage Tests (MANDATORY - Verify Explicitly)**:
|
||||
- **Backend**: Ensure `Backend_Dev` ran VS Code task "Test: Backend with Coverage" or `scripts/go-test-coverage.sh`
|
||||
- **Frontend**: Ensure `Frontend_Dev` ran VS Code task "Test: Frontend with Coverage" or `scripts/frontend-test-coverage.sh`
|
||||
- **Why**: These are in manual stage of pre-commit for performance. Subagents MUST run them via VS Code tasks or scripts.
|
||||
- Minimum coverage: 85% for both backend and frontend.
|
||||
- All tests must pass with zero failures.
|
||||
|
||||
2. **Type Safety (Frontend)**:
|
||||
3. **Type Safety (Frontend)**:
|
||||
- Ensure `Frontend_Dev` ran VS Code task "Lint: TypeScript Check" or `npm run type-check`
|
||||
- **Why**: This check is in manual stage of pre-commit for performance. Subagents MUST run it explicitly.
|
||||
|
||||
3. **Pre-commit Hooks**: Ensure `QA_Security` ran `pre-commit run --all-files` (fast hooks only; coverage was verified in step 1)
|
||||
4. **Pre-commit Hooks**: Ensure `QA_Security` ran `pre-commit run --all-files` (fast hooks only; coverage was verified in step 2)
|
||||
|
||||
4. **Security Scans**: Ensure `QA_Security` ran CodeQL and Trivy with zero Critical or High severity issues
|
||||
5. **Security Scans**: Ensure `QA_Security` ran CodeQL and Trivy with zero Critical or High severity issues
|
||||
|
||||
5. **Linting**: All language-specific linters must pass
|
||||
6. **Linting**: All language-specific linters must pass
|
||||
|
||||
**Your Role**: You delegate implementation to subagents, but YOU are responsible for verifying they completed the Definition of Done. Do not accept "DONE" from a subagent until you have confirmed they ran coverage tests, type checks, and security scans explicitly.
|
||||
|
||||
|
||||
21
.github/agents/Planning.agent.md
vendored
21
.github/agents/Planning.agent.md
vendored
@@ -67,9 +67,12 @@ Your goal is to design the **User Experience** first, then engineer the **Backen
|
||||
}
|
||||
```
|
||||
|
||||
### 🕵️ Phase 1: QA & Security
|
||||
### 🕵️ Phase 1: Playwright E2E Tests (Run First)
|
||||
|
||||
1. Build tests for coverage of perposed code additions and chages based on how the code SHOULD work
|
||||
1. Run `npx playwright test --project=chromium` to verify app functions correctly
|
||||
2. If tests fail, trace root cause through frontend → backend flow
|
||||
3. Write/update Playwright tests for new features in `tests/*.spec.ts`
|
||||
4. Build unit tests for coverage of proposed code additions and changes based on how the code SHOULD work
|
||||
|
||||
|
||||
### 🏗️ Phase 2: Backend Implementation (Go)
|
||||
@@ -89,15 +92,19 @@ Your goal is to design the **User Experience** first, then engineer the **Backen
|
||||
|
||||
### 🕵️ Phase 3: QA & Security
|
||||
|
||||
1. Edge Cases: {List specific scenarios to test}
|
||||
2. **Coverage Tests (MANDATORY)**:
|
||||
1. **Playwright E2E Tests (MANDATORY - Run First)**:
|
||||
- Run `npx playwright test --project=chromium` from project root
|
||||
- All E2E tests must pass BEFORE running unit tests
|
||||
- If E2E fails, trace root cause and fix before proceeding
|
||||
2. Edge Cases: {List specific scenarios to test}
|
||||
3. **Coverage Tests (MANDATORY - After E2E passes)**:
|
||||
- Backend: Run VS Code task "Test: Backend with Coverage" or execute `scripts/go-test-coverage.sh`
|
||||
- Frontend: Run VS Code task "Test: Frontend with Coverage" or execute `scripts/frontend-test-coverage.sh`
|
||||
- Minimum coverage: 85% for both backend and frontend
|
||||
- **Critical**: These are in manual stage of pre-commit for performance. Agents MUST run them via VS Code tasks or scripts before marking tasks complete.
|
||||
3. Security: Run CodeQL and Trivy scans. Triage and fix any new errors or warnings.
|
||||
4. **Type Safety (Frontend)**: Run VS Code task "Lint: TypeScript Check" or execute `cd frontend && npm run type-check`
|
||||
5. Linting: Run `pre-commit` hooks on all files and triage anything not auto-fixed.
|
||||
4. Security: Run CodeQL and Trivy scans. Triage and fix any new errors or warnings.
|
||||
5. **Type Safety (Frontend)**: Run VS Code task "Lint: TypeScript Check" or execute `cd frontend && npm run type-check`
|
||||
6. Linting: Run `pre-commit` hooks on all files and triage anything not auto-fixed.
|
||||
|
||||
### 📚 Phase 4: Documentation
|
||||
|
||||
|
||||
18
.github/agents/QA_Security.agent.md
vendored
18
.github/agents/QA_Security.agent.md
vendored
@@ -70,13 +70,21 @@ When Trivy or CodeQLreports CVEs in container dependencies (especially Caddy tra
|
||||
|
||||
The task is not complete until ALL of the following pass with zero issues:
|
||||
|
||||
1. **Security Scans**:
|
||||
1. **Playwright E2E Tests (MANDATORY - Run First)**:
|
||||
- **Run**: `npx playwright test --project=chromium` from project root
|
||||
- **Why First**: If the app is broken at E2E level, unit tests may need updates. Catch integration issues early.
|
||||
- **Scope**: Run tests relevant to modified features (e.g., `tests/manual-dns-provider.spec.ts`)
|
||||
- **On Failure**: Trace root cause through frontend → backend flow, report to Management or Dev subagent
|
||||
- **Base URL**: Uses `PLAYWRIGHT_BASE_URL` or default `http://100.98.12.109:8080`
|
||||
- All E2E tests must pass before proceeding
|
||||
|
||||
2. **Security Scans**:
|
||||
- CodeQL: Run VS Code task "Security: CodeQL All (CI-Aligned)" or individual Go/JS tasks
|
||||
- Trivy: Run VS Code task "Security: Trivy Scan"
|
||||
- Go Vulnerabilities: Run VS Code task "Security: Go Vulnerability Check"
|
||||
- Zero Critical/High issues allowed
|
||||
|
||||
2. **Coverage Tests (MANDATORY - Run Explicitly)**:
|
||||
3. **Coverage Tests (MANDATORY - Run Explicitly)**:
|
||||
- **MANDATORY**: Patch coverage must cover 100% of new/modified code. This prevents CodeCov Report failing CI.
|
||||
- **Backend**: Run VS Code task "Test: Backend with Coverage" or execute `scripts/go-test-coverage.sh`
|
||||
- **Frontend**: Run VS Code task "Test: Frontend with Coverage" or execute `scripts/frontend-test-coverage.sh`
|
||||
@@ -84,14 +92,14 @@ The task is not complete until ALL of the following pass with zero issues:
|
||||
- Minimum coverage: 85% for both backend and frontend.
|
||||
- All tests must pass with zero failures.
|
||||
|
||||
3. **Type Safety (Frontend)**:
|
||||
4. **Type Safety (Frontend)**:
|
||||
- Run VS Code task "Lint: TypeScript Check" or execute `cd frontend && npm run type-check`
|
||||
- **Why**: This check is in manual stage of pre-commit for performance. You MUST run it explicitly.
|
||||
- Fix all type errors immediately.
|
||||
|
||||
4. **Pre-commit Hooks**: Run `pre-commit run --all-files` (this runs fast hooks only; coverage was verified in step 1)
|
||||
5. **Pre-commit Hooks**: Run `pre-commit run --all-files` (this runs fast hooks only; coverage was verified in step 3)
|
||||
|
||||
5. **Linting (MANDATORY - Run All Explicitly)**:
|
||||
6. **Linting (MANDATORY - Run All Explicitly)**:
|
||||
- **Backend GolangCI-Lint**: Run VS Code task "Lint: GolangCI-Lint (Docker)" - This is the FULL linter suite including gocritic, bodyclose, etc.
|
||||
- **Why**: "Lint: Go Vet" only runs `go vet`, NOT the full golangci-lint suite. CI runs golangci-lint, so you MUST run this task to match CI behavior.
|
||||
- **Command**: `cd backend && docker run --rm -v $(pwd):/app:ro -w /app golangci/golangci-lint:latest golangci-lint run -v`
|
||||
|
||||
Reference in New Issue
Block a user