feat: add optimistic V8 garbage collection proposal and design#170
Closed
avoidwork wants to merge 2 commits into
Closed
feat: add optimistic V8 garbage collection proposal and design#170avoidwork wants to merge 2 commits into
avoidwork wants to merge 2 commits into
Conversation
…nd heap thresholds - Add OpenSpec change artifacts for optimistic-gc - proposal.md: defines why (heap pressure during long sessions), what (global.gc() triggered by idle state or heap threshold), and scope - design.md: architecture with GC Manager, TUI idle detection, config schema, and Dockerfile --expose-gc integration - specs/memory-gc/spec.md: requirements for GC triggers, graceful degradation, and configurable parameters - tasks.md: 6-phase implementation checklist (config schema, GC manager module, TUI integration, Dockerfile, tests, verification)
Address all 10 audit findings: - Mark tasks 1.1/1.2 as complete (already implemented in schemas.js) - Add idle timeout check (lastActivityTime) to design check logic - Simplify Dockerfile task: add --expose-gc to package.json start script - Add timer cleanup task (stop() on shutdown) - Tighten heapThreshold bounds to [0.01, 0.99] to prevent degenerate configs - Make TUI callback wiring explicit in tasks - Add note about non-streaming TUI activity tradeoff - Move graceful degradation check to constructor (not first _check()) - Consolidate test file references (1.3 and 5.2) - Add positive scenario: GC triggers after sustained idle period Also: add gc schema and defaults to schemas.js + DEFAULT_CONFIG, and add --expose-gc to package.json start script.
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.
Description
Add OpenSpec change proposal for optimistic V8 garbage collection. Proactively triggers
global.gc()during TUI idle periods or when heap usage exceeds a configurable threshold (default: 80%).Type of Change
Testing
Proposal only — no code changes yet. Full test suite will be added during implementation (see tasks.md).
Coverage
Checklist
npm run lintpassesRelated Design
See
openspec/changes/optimistic-gc/design.mdfor architecture:--expose-gcis unavailable--expose-gcflag