Phase 4: refactor & cleanup — selection engine, dedup rex runtime, bounded protocol buffers, doc/code sweep - #101
Open
joctaTorres wants to merge 1 commit into
Conversation
…unded protocol buffers, doc/code sweep Phase 4 (refactor-and-cleanup) of engine-runtime-hardening — consolidate duplicated engine/runtime logic and clear dead code / doc drift. - Single selection engine: move pickNextStep into engine/selection.ts, delete dead selectRunnableStep, unify the status.ts/apply.ts gate walk behind a shared firstRunnableChange (#83). - Dedup rex runtime + CI: shared run-command builder, cross-language shquote contract test, drop the Python DEFAULT_DOCKER_IMAGE literal (REX_IMAGE required), wire test_sidecar.py into CI with a build-time packaging assertion (#91). - Bounded protocol buffers: cap partial-line buffers at 1 MiB on all three channels (flush-don't-drop), align the remote byte cursor to the sidecar's surrogateescape arithmetic, and surface non-JSON / unknown frames to the diagnostic transcript instead of dropping them (#90). - Doc/code-drift sweep: guidance documented as $ARGUMENTS, run-dir unification, remove the unreachable llm-judge branch, the phase-gated StepState, and the legacy spawnerAsRuntime fallback; annotate intentional identities; fix the drifted doctor tests; relocate coverage-gate.md (#84). - Fix a phase-3 regression: sidecar used asyncio.SIGTERM (nonexistent) — corrected to signal.SIGTERM so the local-locus agent spawn no longer crashes on startup. Full suite green (npm test exit 0); make test-sidecar 44/44. Closes #83 Closes #91 Closes #90 Closes #84 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ratchet | c5e6295 | Commit Preview URL Branch Preview URL |
Jul 12 2026, 06:50 PM |
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.
Phase 4 — refactor & cleanup
Fourth and final phase of the engine-runtime-hardening batch. Stacked on #99 (base:
erh/phase-3-lifecycle-isolation). Consolidates duplicated engine/runtime logic and clears dead code / doc drift, behavior-preservingly.What landed
pickNextStepmoved intoengine/selection.ts; deadselectRunnableStepdeleted; the duplicatedstatus.ts/apply.tsgate walk unified behind a sharedfirstRunnableChange.shquotecontract test; the PythonDEFAULT_DOCKER_IMAGEliteral dropped (REX_IMAGE required);test_sidecar.pywired into CI with a build-time packaging assertion.surrogateescapearithmetic; non-JSON / unknown frames surfaced to the diagnostic transcript instead of dropped.guidancedocumented as$ARGUMENTS; run-dir unification; unreachablellm-judgebranch,phase-gatedStepState, and legacyspawnerAsRuntimefallback removed; intentional identities annotated; drifted doctor tests fixed;coverage-gate.mdrelocated.asyncio.SIGTERM(which does not exist) and crashed the local-locus agent spawn on startup; corrected tosignal.SIGTERM.Verification
npm test— full suite green, exit 0.make test-sidecar— 44/44.Closes #83
Closes #91
Closes #90
Closes #84
🤖 Generated with Claude Code