fix: clear all 7 tracked tech-debt items#31
Merged
Conversation
Resolves every entry tracked under techdebt/ — one high-priority goroutine-leak, four medium correctness/perf items, and two low-priority hardening items. Code-review findings on top of the initial cleanup are folded in. Fixed - daemon: Stop() now closes d.shutdown via shutdownOnce + wraps teardown in stopOnce, so idleChecker / memReport ctx-bridge / sendGhostChunked exit on every Stop path. server.Stop() runs before the final snapshot so no IPC ACK can outlive the on-disk state. (techdebt 2-2) - daemon: snapshot() takes one consistent SnapshotState and reuses it for both workspace.json and ghost-buffer flush via the new workspaceStateFromSnapshot helper, eliminating the off-by-one pane-count drift between the two halves. Periodic ticker still calls snapshot() directly so the safety-net write cannot be starved by sustained event traffic resetting the debounce timer. (techdebt 3-2) - daemon: paneSourceAdapter collapsed from 7 methods (6 PluginMu acquisitions per pane per tick) to a single Snapshot() that acquires PluginMu once with defer-Unlock for panic safety. (techdebt 3-2) Changed - mcp: get_memory_report halves IPC latency by embedding the tab list directly in MemoryReportRespPayload; the bridge falls back to bare tab IDs against pre-1.10 daemons. (techdebt 3-2) - tui: notes-mode header gains a persistent reverse-video focus badge (INPUT / PANE) with three-tier degrade for narrow widths. Defence-in-depth against synthesised mouse-click input redirection. (techdebt 4-2) Tests - New daemon unit tests: TestIsValidHexID, TestWorkspaceStateFromSnapshot, TestStop_ClosesShutdownChannel, TestStop_Idempotent. - New cmd/quil unit tests: TestBuildTabMemSummaries (4 cases incl. pre-1.10 daemon nil-Tabs path). - New TUI tests: dialog handlers (settings/confirm), notes header badge focus + narrow-width truncation. - New Windows-tagged PTY tests covering SetCWD/SetEnv/newWithSize/ pre-start safety/WaitExit sentinel. (techdebt 4-2) - New //go:build integration suite for daemon Start/Stop and IPC-driven MemoryReport round-trip + snapshot consistency.
cc69813 to
50404b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves every entry tracked under techdebt/ — one high-priority goroutine-leak, four medium correctness/perf items, and two low-priority hardening items. Code-review findings on top of the initial cleanup are folded in.
Fixed
Changed
Tests