Skip to content

fix: embed agent and workflow framework sources in compiled binary - #276

Merged
kwakayama merged 2 commits into
mainfrom
fix/embed-agent-workflow-framework-sources
Feb 9, 2026
Merged

fix: embed agent and workflow framework sources in compiled binary#276
kwakayama merged 2 commits into
mainfrom
fix/embed-agent-workflow-framework-sources

Conversation

@kwakayama

Copy link
Copy Markdown
Contributor

Summary

  • Add agent/ and workflow/ to FRAMEWORK_DIRS in prepare-framework-sources.ts
  • Add e2e test verifying framework modules are served from compiled binary

Problem

FRAMEWORK_DIRS only included ["react", "lib"], so client-side modules like veryfront/agent/react (useChat, useAgent) and veryfront/workflow/react (useWorkflow, useApproval) returned 404 "Module not found" in production compiled binaries.

The embedded sources in dist/framework-src/ only contained react/ files. When the module server tried to resolve _veryfront/agent/react/index.js, it couldn't find it.

Fixes #275

Test plan

  • Local compiled binary: agent/react/index.js returns 200 (was 404)
  • Local compiled binary: workflow/react/index.js returns 200 (was 404)
  • Local compiled binary: react/components/Head.js still returns 200
  • E2e test: should serve embedded framework modules from compiled binary
  • CI green

Copilot AI review requested due to automatic review settings February 9, 2026 06:52

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

This PR fixes production 404s for framework modules when running as a compiled Deno binary by embedding additional framework source directories into dist/framework-src/, and adds an integration test to ensure those embedded modules are served correctly.

Changes:

  • Add agent/ and workflow/ to the embedded framework source copy list in prepare-framework-sources.ts.
  • Add an integration e2e test that fetches several _veryfront/* module URLs from the compiled binary to ensure they return 200.
  • Bump deno.json version from 0.1.7-rc.50 to 0.1.7-rc.51.

Reviewed changes

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

File Description
scripts/build/prepare-framework-sources.ts Embeds src/agent/ and src/workflow/ into dist/framework-src/ for compiled-binary module serving.
tests/integration/vfs-proxy-mode-e2e.test.ts Adds a compiled-binary VFS/proxy-mode e2e test asserting key embedded framework modules return 200.
deno.json Version bump to 0.1.7-rc.51.

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

Comment on lines +180 to +188
// Wait for server to be ready
const deadline = Date.now() + 30_000;
while (Date.now() < deadline) {
try {
const r = await fetch(`http://127.0.0.1:${server.port}/`);
await r.text();
break;
} catch { await new Promise((r) => setTimeout(r, 500)); }
}

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

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

The server "readiness" loop breaks on the first successful fetch, but if the deadline is reached it falls through silently and the test continues. That makes failures harder to diagnose (you'll get connection errors or 404s later without a clear timeout message) and can introduce flakiness. Track whether the server became reachable and throw a descriptive error (ideally including recent server logs) when the timeout elapses, or reuse a shared waitForServer helper like the one in tests/integration/compiled-binary-e2e.test.ts.

Copilot uses AI. Check for mistakes.
FRAMEWORK_DIRS only included react/ and lib/, so client-side modules
like veryfront/agent/react (useChat, useAgent) and veryfront/workflow/react
(useWorkflow, useApproval) returned 404 in production compiled binaries.

Add agent/ and workflow/ to the embedded framework sources list.
@kwakayama
kwakayama force-pushed the fix/embed-agent-workflow-framework-sources branch from 4a21140 to 20e2f35 Compare February 9, 2026 07:09
@kwakayama
kwakayama merged commit 09e57f8 into main Feb 9, 2026
12 checks passed
@kwakayama
kwakayama deleted the fix/embed-agent-workflow-framework-sources branch February 9, 2026 07:18
ariskemper pushed a commit that referenced this pull request Feb 9, 2026
)

* chore: bump version to 0.1.7-rc.51

* fix: embed agent and workflow dirs in compiled binary (#275)

FRAMEWORK_DIRS only included react/ and lib/, so client-side modules
like veryfront/agent/react (useChat, useAgent) and veryfront/workflow/react
(useWorkflow, useApproval) returned 404 in production compiled binaries.

Add agent/ and workflow/ to the embedded framework sources list.
kojiwakayama added a commit that referenced this pull request Aug 17, 2026
…dbox

- teams/confluence template clients: strip HTML tags to a fixed point and
  decode &amp; last, closing incomplete-multi-character-sanitization and
  double-escaping findings (alerts #276-#278)
- push command: drop the dead pushedSourceDigest initializer — every path
  that reads it reassigns via computePushedSourceDigest, which revalidates
  remote content itself (alert #285)
- worker-script: remove a null comparison already excluded by the early
  return at the top of snapshotStructuredData (alert #247)
- execution-support test: call throwIfChildRunAborted directly instead of
  asserting the return value of a void function (alerts #279/#280)
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.

Framework modules agent/react and others return 404 in production

2 participants