Skip to content

fix(runtime): verify required artifact readability - #3941

Merged
BunsDev merged 1 commit into
mainfrom
fix/runtime-required-file-readability-3927
Jul 27, 2026
Merged

fix(runtime): verify required artifact readability#3941
BunsDev merged 1 commit into
mainfrom
fix/runtime-required-file-readability-3927

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary

  • keep injected command-stat probes scoped to executable discovery
  • verify required launch artifacts with the real readability check unless a dedicated readable-file test double is supplied
  • add deterministic regression coverage for the post-merge Copilot finding on fix(opencode): preflight a shell-free launch plan #3927

Verification

  • red regression confirmed against the old statFile fallback
  • focused runtime-availability.test.ts passes on current origin/main
  • pnpm typecheck
  • pnpm lint
  • pnpm check:tests-wired — 1,274 files wired, 1 allowlisted
  • git diff --check origin/main...HEAD
  • pnpm test:api — 279/279 files passed before the overlapping Hermes fix(chat): preflight Hermes direct launch safely #3911 base advance; on exact current base, the suite reaches an existing route-hermes-availability.integration.test.ts failure (runtime_process_failed vs runtime_missing) that reproduces identically on a clean detached origin/main checkout at 25d817c0b

Follow-up to #3927.

Copilot AI review requested due to automatic review settings July 26, 2026 23:41
@BunsDev
BunsDev force-pushed the fix/runtime-required-file-readability-3927 branch from 0497b43 to f700106 Compare July 26, 2026 23:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Tightens evaluateRuntimeAvailability() preflight semantics so required launch artifacts are verified using a real readability check by default (rather than allowing a command statFile test double to silently satisfy artifact checks), and adds regression tests for the behavior discovered post-merge in #3927.

Changes:

  • Remove the implicit fallback that reused statFile as the required-artifact readability check; required artifacts now default to defaultReadableFile.
  • Extend Windows shim/direct-launch coverage to ensure a statFile double can’t mask missing/unreadable required artifacts.
  • Add OpenCode Windows required-artifact readiness coverage using an explicit readableFile double.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/lib/runtime-availability.ts Ensures required-artifact verification uses defaultReadableFile unless an explicit readableFile probe is provided.
src/lib/runtime-availability.test.ts Adds regression tests covering required-artifact readability (including OpenCode Windows scenarios).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/runtime-availability.test.ts
@BunsDev
BunsDev force-pushed the fix/runtime-required-file-readability-3927 branch from f700106 to 3f0292a Compare July 26, 2026 23:47
@BunsDev
BunsDev force-pushed the fix/runtime-required-file-readability-3927 branch from 3f0292a to 592df54 Compare July 27, 2026 00:08
@BunsDev
BunsDev merged commit dffdc7b into main Jul 27, 2026
15 checks passed
@BunsDev
BunsDev deleted the fix/runtime-required-file-readability-3927 branch July 27, 2026 00:19
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.

2 participants