refactor(loop): extract loop module into dedicated service layer#12
Open
chriswritescode-dev wants to merge 68 commits into
Open
refactor(loop): extract loop module into dedicated service layer#12chriswritescode-dev wants to merge 68 commits into
chriswritescode-dev wants to merge 68 commits into
Conversation
…tic logging - Thread forge logger into createLoopWorkspace and bindSessionToWorkspace to enable observability in forge.log for workspace creation failures - Remove workspace routing parameter from session.create to avoid MissingWorkspace errors when workspace hasn't reconciled - Remove explicit id field from workspace.create to preserve the host's WorkspaceID.ascending() ID generation invariant - Add comprehensive tests for workspace creation logging and session binding behavior - Update plan-approval test to expect server-generated workspace ID
# Conflicts: # package.json # pnpm-lock.yaml
- Make reconcileStale selective with optional isSandboxLive probe - Add isLiveByName for Docker-only liveness check in sandbox manager - Reorder boot sequence: init sandboxManager before reconcileStale - Remove activeSandboxLoops snapshot and explicit restore loop - Add boot integration tests for sandbox preservation - Extend unit tests for reconcileStale selectivity and isLiveByName
- Test now uses two loops: alpha (cancelled) and beta (preserved) - Verifies reconcileSandboxes calls restore for beta (preserved loop) - Satisfies Phase 4 acceptance criteria: reconcileSandboxes restores container
…kspace provisioning
…move finalAuditClear
…ove watchdog/section-capture
…, branches are preserved
… mismatched paths and tools
…eny external directory access
…ssion title format
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.
Extracts loop logic into a dedicated service layer with improvements to workspace management, sandbox handling, session lifecycle, and comprehensive test coverage.
Changes
Loop Module Extraction
src/loop/module with runtime, service, state, transitions, and promptsWorkspace & Sandbox Improvements
Testing & Refactoring
Files
src/loop/— New dedicated loop module directory (runtime, service, state, transitions, prompts, etc.)src/services/execution.ts— Major refactoring with improved rollback and type safetysrc/hooks/loop.ts— Simplified hook implementationtest/hooks/*.test.ts— New comprehensive test suite for loop behaviorsdocs/architecture.md— Updated architecture documentationpackage.json,bun.lock,pnpm-lock.yaml— Dependency updates and version bumps