Skip to content

fix(packaging): v1.10.2 engine brick - stop stripping runtime-imported .md + robustness layers (ADR-0177), release v1.10.3 - #246

Merged
mlcyclops merged 1 commit into
masterfrom
fix/packaged-engine-md
Jul 6, 2026
Merged

mlcyclops merged 1 commit into
masterfrom
fix/packaged-engine-md

Conversation

@mlcyclops

Copy link
Copy Markdown
Owner

The brick

Upgrading to v1.10.2 shows "LucidAgentIDE could not start its local engine". Reproduced on the shipped artifact; the engine log is unambiguous:

error: Cannot find module '../prompts/steering/user-interjection.md'
from ...\resources\repo\node_modules\@oh-my-pi\pi-coding-agent\src\session\messages.ts

The extraResources filter strips ALL node_modules/**/*.md; #242 made dev.ts import @oh-my-pi/pi-coding-agent in-process for the first time, and that package imports its prompt .md files at module load (with { type: "text" }). Packaged engine dies at import → port 5319 never binds. Same class as the v1.9.0 typescript-exclusion brick.

The fix - once, then never again

  1. Packaging: drop !node_modules/**/*.md (a few MB of READMEs vs a bricked engine).
  2. Engine survives optional deps: the omp import in skills_data.ts is type-only + lazy inside the already-fail-soft discoverRaw - verified the engine still boots with the bad filter deliberately restored (feature degrades to bundled-only skills).
  3. Self-diagnosing boots: engine stdout/stderr teed to <userData>/engine.log; the failure dialog now points at that file.
  4. CI guard (desktop/packaged_boot.test.ts): emulates the LIVE packaging exclusions with a Bun resolver plugin and boots the real dev.ts, requiring /api/health. Proven red (<1s) on the v1.10.2 state, green on this fix.

Release

Version bumped to v1.10.3 in lockstep. After merge I'll tag v1.10.3 → installers build → verify the shipped Windows artifact boots on the machine that reproduced the brick before calling it done.

🤖 Generated with Claude Code

…d .md + three robustness layers (ADR-0177), release v1.10.3

Root cause (reproduced on the shipped artifact): extraResources stripped ALL
node_modules/**/*.md; #242 made dev.ts import @oh-my-pi/pi-coding-agent in-process,
which imports its prompt .md files at module load - the packaged engine died at
import and never bound port 5319.

- packaging: drop the !node_modules/**/*.md exclusion (READMEs are cheaper than bricks)
- skills_data: the omp import is type-only + LAZY inside fail-soft discoverRaw - an
  unloadable optional dep degrades the Skills directory, never kills the engine
  (verified with the bad filter deliberately restored)
- main.ts: engine stdout/stderr teed to <userData>/engine.log; the failure dialog
  points at the log instead of asking for a terminal relaunch
- packaged_boot.test.ts: CI guard that emulates the LIVE packaging exclusions with a
  Bun resolver plugin and boots the real dev.ts - red in <1s on the v1.10.2 state,
  green on the fix, so this brick class can never ship again
- version bump to 1.10.3 (version.ts + package.json + about.test.ts in lockstep)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mlcyclops
mlcyclops merged commit ee97d8b into master Jul 6, 2026
5 checks passed
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