|
| 1 | +# Operator Testing Guide |
| 2 | + |
| 3 | +Use this guide to verify PromptImprover from a clean Windows operator session. |
| 4 | + |
| 5 | +## 1. Enter The Active Package |
| 6 | + |
| 7 | +```powershell |
| 8 | +cd C:\PersonalRepo\portfolio\Promptimprover\universal-refiner |
| 9 | +``` |
| 10 | + |
| 11 | +## 2. Run The Full Release Gate |
| 12 | + |
| 13 | +```powershell |
| 14 | +npm.cmd run release:verify |
| 15 | +``` |
| 16 | + |
| 17 | +Expected result: |
| 18 | + |
| 19 | +- TypeScript build passes. |
| 20 | +- Vitest coverage reports 100% statements, branches, functions, and lines. |
| 21 | +- MCP tool acceptance passes. |
| 22 | +- Semantic fallback acceptance passes. |
| 23 | +- Tracked-turn acceptance links a `prm_...` prompt ID in SQLite. |
| 24 | +- EventStore stress, abrupt recovery, and soak pass. |
| 25 | +- Production and full dependency audits report zero high-or-higher vulnerabilities. |
| 26 | +- Secret scan passes. |
| 27 | +- Package dry-run passes. |
| 28 | +- `acceptance:package-runtime` installs the packed tarball into a temporary global prefix and serves `/api/health`. |
| 29 | + |
| 30 | +## 3. Check Global MCP Registration |
| 31 | + |
| 32 | +```powershell |
| 33 | +powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\register-global.ps1 -Check -ProfileRoot C:\Users\KimHarjamaki -CodexHome C:\codex-home |
| 34 | +``` |
| 35 | + |
| 36 | +Expected result: |
| 37 | + |
| 38 | +```text |
| 39 | +OK Codex |
| 40 | +OK Claude Code MCP |
| 41 | +OK Claude Code hooks |
| 42 | +OK Gemini |
| 43 | +``` |
| 44 | + |
| 45 | +If any row reports `DRIFT`, run `-Apply` only after confirming the drift is expected: |
| 46 | + |
| 47 | +```powershell |
| 48 | +powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\register-global.ps1 -Apply -ProfileRoot C:\Users\KimHarjamaki -CodexHome C:\codex-home |
| 49 | +``` |
| 50 | + |
| 51 | +## 4. List MCP Servers In Each CLI |
| 52 | + |
| 53 | +```powershell |
| 54 | +codex.cmd mcp list | Select-String -Pattern 'prompt-refiner|obsidian|Connected|enabled' |
| 55 | +claude.cmd mcp list | Select-String -Pattern 'prompt-refiner|obsidian|Connected|Configured' |
| 56 | +gemini.cmd mcp list | Select-String -Pattern 'prompt-refiner|obsidian|Connected|Configured' |
| 57 | +``` |
| 58 | + |
| 59 | +Expected result: |
| 60 | + |
| 61 | +- Codex lists `prompt-refiner` and `obsidian` as enabled. |
| 62 | +- Claude lists `prompt-refiner` and `obsidian` as connected. |
| 63 | +- Gemini lists `prompt-refiner` and `obsidian` as connected. |
| 64 | + |
| 65 | +Codex may show `Unsupported` in the status column for stdio MCP entries. Treat the registration doctor as the authoritative config drift check. |
| 66 | + |
| 67 | +## 5. Verify Dashboard Runtime Health |
| 68 | + |
| 69 | +Start or restart the local background runtime: |
| 70 | + |
| 71 | +```powershell |
| 72 | +$repo = 'C:\PersonalRepo\portfolio\Promptimprover\universal-refiner' |
| 73 | +Get-CimInstance Win32_Process | |
| 74 | + Where-Object { $_.Name -eq 'node.exe' -and ($_.CommandLine -match 'universal-refiner.*dist/src/index.js' -or $_.CommandLine -match 'universal-refiner.*dist\\src\\index.js') } | |
| 75 | + ForEach-Object { Stop-Process -Id $_.ProcessId -Force } |
| 76 | +
|
| 77 | +$env:PROMPT_REFINER_BACKGROUND = 'true' |
| 78 | +Start-Process -WindowStyle Hidden -FilePath node -ArgumentList (Join-Path $repo 'dist\src\index.js') -WorkingDirectory $repo |
| 79 | +``` |
| 80 | + |
| 81 | +Check health: |
| 82 | + |
| 83 | +```powershell |
| 84 | +Invoke-RestMethod http://127.0.0.1:3000/api/health | ConvertTo-Json -Depth 6 |
| 85 | +``` |
| 86 | + |
| 87 | +Expected result: |
| 88 | + |
| 89 | +- `runtime.status` is `online`. |
| 90 | +- `semantic.local.enabled` is `true`. |
| 91 | +- `semantic.local.models` includes `gemma3:12b` and `gemma3:1b`. |
| 92 | + |
| 93 | +## 6. Verify Live Gemma Integration |
| 94 | + |
| 95 | +```powershell |
| 96 | +$env:PROMPT_REFINER_ACCEPTANCE_BASE_URL = 'http://localhost:9000/v1' |
| 97 | +npm.cmd run acceptance:gemma:live |
| 98 | +``` |
| 99 | + |
| 100 | +Expected result: |
| 101 | + |
| 102 | +```text |
| 103 | +Live semantic acceptance passed for gemma3:12b and gemma3:1b at http://localhost:9000/v1. |
| 104 | +Semantic acceptance passed: gemma3:12b -> gemma3:1b and outage provider fallback. |
| 105 | +``` |
| 106 | + |
| 107 | +Warnings such as `HTTP 503` for `gemma3:12b` and `fetch failed` during the outage section are expected. They prove fallback and outage paths are being exercised. The command must still exit successfully. |
| 108 | + |
| 109 | +## 7. Verify Packaged Runtime Directly |
| 110 | + |
| 111 | +```powershell |
| 112 | +npm.cmd run acceptance:package-runtime |
| 113 | +``` |
| 114 | + |
| 115 | +Expected result: |
| 116 | + |
| 117 | +```text |
| 118 | +Package runtime smoke passed: installed gemini-prompt-refiner-8.0.0 and served /api/health on <port>. |
| 119 | +``` |
| 120 | + |
| 121 | +This catches missing production dependencies that are hidden by the local workspace. |
| 122 | + |
| 123 | +## 8. Confirm GitHub CI |
| 124 | + |
| 125 | +After pushing a branch and opening a pull request: |
| 126 | + |
| 127 | +```powershell |
| 128 | +gh pr checks <PR_NUMBER> --repo Coding-Autopilot-System/Promptimprover |
| 129 | +gh run list --repo Coding-Autopilot-System/Promptimprover --branch <BRANCH_NAME> --limit 10 |
| 130 | +``` |
| 131 | + |
| 132 | +Expected result: |
| 133 | + |
| 134 | +- `build-and-test` passes. |
| 135 | +- Both acceptance matrix jobs pass. |
| 136 | +- `stress` passes. |
| 137 | +- `windows` passes. |
| 138 | +- `supply-chain` passes. |
| 139 | +- `release-gate` passes. |
| 140 | + |
| 141 | +Remote CI is the authoritative proof for Linux and Windows clean-checkout behavior. |
0 commit comments