Skip to content

Phase 4: refactor & cleanup — selection engine, dedup rex runtime, bounded protocol buffers, doc/code sweep - #101

Open
joctaTorres wants to merge 1 commit into
erh/phase-3-lifecycle-isolationfrom
erh/phase-4-refactor-and-cleanup
Open

Phase 4: refactor & cleanup — selection engine, dedup rex runtime, bounded protocol buffers, doc/code sweep#101
joctaTorres wants to merge 1 commit into
erh/phase-3-lifecycle-isolationfrom
erh/phase-4-refactor-and-cleanup

Conversation

@joctaTorres

Copy link
Copy Markdown
Owner

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

Verification

Closes #83
Closes #91
Closes #90
Closes #84

🤖 Generated with Claude Code

…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>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant