test(pipeline): fix Phase 2 tests to require ssr.build execution#124
Closed
zeroedin wants to merge 2 commits into
Closed
test(pipeline): fix Phase 2 tests to require ssr.build execution#124zeroedin wants to merge 2 commits into
zeroedin wants to merge 2 commits into
Conversation
- Add OverlayState to Server struct, initialized in New/NewWithMode - Expose via Overlay() accessor for use by rebuild loop - serveFileWithReload injects error overlay HTML before </body> when active build errors exist (dev mode only) - Rebuild loop in cmd/serve.go sets errors on failure, clears on success, and broadcasts reload in both cases so browser shows the overlay Closes #106 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Existing Phase 2 tests validated local DSD transform (shadowrootmode insertion), but the spec says BuildPhase2 must shell out to the configured ssr.build command — Alloy does not perform SSR itself. Changes: - Fix "Phase 2 transforms intermediate HTML" to expect command execution error when ssr.build tool is not installed (not local transform) - Fix "Phase 2 receives Phase 1 output" to use echo as ssr.build command - Fix "with SSR config" to tolerate command execution error - Add "BuildPhase2 returns error when ssr.build command fails" - Add "BuildPhase2 does not fall back to local transform" - Update IMPLEMENTATION.md Phase 4D: BuildPhase2 uses os/exec, no fallback Closes #117 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 16, 2026
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.
Summary
shadowrootmodeinsertion). Per spec §6,BuildPhase2must shell out to the configuredssr.buildcommand — Alloy does not perform SSR itself.BuildPhase2must error when the command fails (not silently fall back to local transform).os/execcommand execution with no fallback.Test changes (16 → 18 specs)
shadowrootmodeoutputecho okas ssr.build commandshadowrootmodevia local fallbackCurrent state: 15 pass, 3 fail
The 3 failing tests prove the bug —
BuildPhase2currently does a localtransformCustomElementsinstead of executingssr.build. These will pass once the implementation shells out viaos/exec.Test plan
go vet ./internal/pipeline/...compiles cleanCloses #117
🤖 Generated with Claude Code