assist v0.326
Gating comments and unifying daemon logs
The theme I’m most pleased with today is enforcing the self-documenting code policy at the hook level rather than hoping I remember it. A new comment edit gate is a PreToolUse hook (decideCommentGuard) that blocks Edit/Write from adding code comments, with an escape hatch: when a comment genuinely earns its place I can confirm it through codeComment and have it allowed. I also hardened the block-comments verify gate so the check can’t be quietly sidestepped. Alongside it, the maintainability gate got a proper override: a special marker comment exempts a file that legitimately can’t hit the index, and the edit-hook protects the marker itself — Edit/Write can’t add, change, or remove one — so the exemption is a deliberate act rather than something a refactor can flip. The complexity output now surfaces which files are running under an override.
The other substantial piece was observability. Daemon logging is now unified into a single assist.log stream instead of scattered outputs, daemon session operations are logged as they happen, and I dropped a redundant lifecycle logger that was just adding noise. To go with it, a new assist daemon drain command clears all sessions from the local daemon for a clean slate, and a Windows-proxy create refusal now gets logged so I can see why a session didn’t start.
The rest was hardening, much of it on the Windows path now that it carries real traffic. I capped the Windows connect probe at 2s and tightened the create timeout to 5s so a stuck host fails fast, surfaced a failed Windows create to the UI instead of leaving it silent, gated the Windows proxy off when assist is itself running on the Windows host, and stopped an unbounded w- growth in Windows session ids. A few general fixes too: a hard cap on session fan-out so a runaway can’t spawn endlessly, the web server now binds before the daemon is ready so the page is reachable during startup, the session-card prompt is clamped to five lines, and the 7-day usage row gets a tinted background to set it apart.