container: /cq + /verify-tests skills, auto-mode off, Hermes CDP#78
container: /cq + /verify-tests skills, auto-mode off, Hermes CDP#78AnExiledDev merged 6 commits intostagingfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The 3 Stop hooks (format-on-stop, lint-file, advisory-test-runner) caused race conditions with background agents, fired too frequently during orchestration pauses, and produced lint results as passive context that Claude couldn't act on. Replace them with: - /cq skill — Claude runs format, lint (auto-fix), and tests explicitly - quality-gate.py — lightweight Stop hook that prompts /cq when needed - task-tracker.py — tracks active background tasks to avoid conflicts The gate is background-task-aware and self-cleaning (deletes temp files on block to prevent loops).
…tests skill The TaskCompleted, implementer Stop, refactorer PostToolUse, and test-writer Stop hooks each ran the project test suite automatically on agent/task lifecycle events, serializing 30-120s of verification work per event. Replace all four with a single on-demand /verify-tests skill that Claude invokes explicitly. Keeps test-running behaviour available without forcing it on every stop or completion, aligning with the same pattern used by /cq.
Users kept landing on auto mode after a Shift+Tab misclick and discovering it mid-task. Default to disabled across all generated profiles so the mode must be explicitly re-enabled via ~/.claude/settings.json.
…roxy workflow Windows host Chrome CDP connections previously required launching Chrome with --remote-debugging-port flags by hand and still hit HTTP 500 errors because Chrome CDP rejects DNS Host headers like host.docker.internal. Add start-hermes-chrome.ps1: runs from Administrator PowerShell, launches Chrome on 127.0.0.1:9222 with a dedicated profile, and creates a netsh portproxy mapping 0.0.0.0:9223 -> 127.0.0.1:9222 plus matching firewall rule. Container side resolves host.docker.internal to IPv4 and connects on port 9223. Also adds HERMES_CDP_ENDPOINT env var and updates the agent-browser feature, skill, and docs site with the new workflow.
…up notes Sync docs/ changelog entries for CI changes that landed on main but were only recorded in container/.devcontainer/CHANGELOG.md — canary pre-release publishing on staging pushes, removal of the extracted dashboard release workflow, and the release.yml changelog-extraction sed fix.
…nd CDP endpoint - task-tracker.py: add fcntl-based file locking with retry (3 attempts, 100ms) to prevent race conditions on concurrent TaskCreated/TaskCompleted hooks; add event type validation for early exit on unknown events - quality-gate.py: move temp file deletion after block response output to ensure the block is sent even if cleanup fails; add session_id missing warning to stderr - devcontainer.json: replace hardcoded 192.168.65.254 CDP endpoint with host.docker.internal for dynamic resolution across Docker environments - install.sh: replace echo with heredoc for host Chrome usage examples so users can copy-paste directly without escaping issues
69e95ca to
4d59873
Compare
Code review fixes appliedtask-tracker.py:
quality-gate.py:
devcontainer.json:
install.sh:
PowerShell hardening: Opened #83 to track separately (low priority). All 298 pytest + npm tests pass. |
Summary
Branch grew beyond the original
/cqskill refactor. Now covers four independent container improvements, all aimed at removing auto-firing lifecycle hooks, hardening defaults, and fixing the Windows host-Chrome CDP workflow.Commits
refactor(auto-code-quality): replace Stop hooks with /cq skill— 6b9e596format-on-stop.py,lint-file.py,advisory-test-runner.pywith a single on-demand/cqskill invoked explicitly by Claudequality-gate.pyStop hook (~1ms) prompts Claude to run/cqwhen files were edited and no background tasks are activetask-tracker.pykeeps the gate quiet while agents are working, eliminating file-mutation conflictsrefactor(agent-system): replace test-verification hooks with /verify-tests skill— e9bc9a5TaskCompleted(task-completed-check.py), implementer Stop + refactorer PostToolUse (verify-no-regression.py), test-writer Stop (verify-tests-pass.py)/verify-testsskill: detects the project's test framework and runs the suite on-demand with structured reporting/cq— explicit invocation instead of passive firingfeat(settings): disable auto permission mode by default— a2914f4"disableAutoMode": "disable"to all 7 settings profiles (settings.base.json+settings.json+ 5 overlays)autofrom the Shift+Tab permission cycle and rejects--permission-mode autoat startup~/.claude/settings.jsonfeat(agent-browser): Hermes Chrome CDP helper for Windows + portproxy workflow— 4fda330start-hermes-chrome.ps1: Administrator PowerShell helper that launches Chrome on127.0.0.1:9222and creates0.0.0.0:9223 -> 127.0.0.1:9222vianetsh portproxy+ matching firewall ruleHERMES_CDP_ENDPOINTenv var (http://192.168.65.254:9223) todevcontainer.jsonhost.docker.internalto IPv4 (Chrome CDP rejects DNSHostheaders) and connects on port 9223docs: backfill user-facing changelog with CI canary + dashboard cleanup notes— 813065fdocs/changelog with CI changes already on main (canary publishing on staging push, removal of dead dashboard release workflow,release.ymlsed header fix)chore(container): reformat test.js— 69e95caconsole.logwraps). No logic change.Test plan
/cqskill/cq→ formats + lints + tests → stops clean/cqmanually → skill runs quality checks on edited files.jsonwith bad syntax → PostToolUse catches it immediately (unchanged)quality-gatetodisabled-hooks.json→ gate skips entirely/verify-testsskill/verify-tests→ detects framework → runs tests → reports pass/fail/verify-tests path/to/file.py→ scopes run to that fileAuto mode disable
autopermission modeclaude --permission-mode auto→ rejected at startup~/.claude/settings.jsonwith"disableAutoMode": "enable"→ auto returnsHermes Chrome CDP (Windows)
.\.devcontainer\scripts\start-hermes-chrome.ps1from Administrator PowerShell → Chrome launches on 127.0.0.1:9222 with dedicated profileInvoke-WebRequest http://127.0.0.1:9223/json/versionon host → returns JSONCDP_HOST=$(getent ahostsv4 host.docker.internal | awk 'NR==1 {print $1}')→curl http://$CDP_HOST:9223/json/version→ returns JSONagent-browser connect $CDP_HOST:9223→ successful sessionstart-hermes-chrome.ps1 -Cleanup→ portproxy + firewall rule removedDocs backfill
cd docs && npm run build→ docs site builds clean with the new CI sectiontest.js
cd container && npm test→ all tests pass