Skip to content

Enable interactive test console backed by Netlify runner#135

Merged
LennartvdM merged 1 commit into
mainfrom
codex/make-test-console-fully-interactive
Nov 14, 2025
Merged

Enable interactive test console backed by Netlify runner#135
LennartvdM merged 1 commit into
mainfrom
codex/make-test-console-fully-interactive

Conversation

@LennartvdM
Copy link
Copy Markdown
Owner

Summary

  • add a Netlify function that executes TES scripts and returns stdout, stderr, and JSON results for the console UI
  • make the web console editable, wire the Run action to the new endpoint, and surface stdout/stderr/result panes with run metadata
  • support injecting globals into tes.run_script and cover the behaviour with a new unit test

Testing

  • pytest

Codex Task

@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 14, 2025

Deploy Preview for wyrrdmaek ready!

Name Link
🔨 Latest commit ca6d05d
🔍 Latest deploy log https://app.netlify.com/projects/wyrrdmaek/deploys/6916e7757ca7b70008bd78f1
😎 Deploy Preview https://deploy-preview-135--wyrrdmaek.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@LennartvdM LennartvdM merged commit 1ee6460 into main Nov 14, 2025
5 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +68 to +79
const [{ spawn }, pathModule, urlModule] = await Promise.all([
import('child_process'),
import('path'),
import('url'),
]);

const path = pathModule.default || pathModule;
const { fileURLToPath } = urlModule;
const __filename = fileURLToPath(import.meta.url);
const repoRoot = path.resolve(path.dirname(__filename), '..', '..');

cachedEnvironment = { spawn, path, repoRoot };
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Bundle Python sources with Netlify runner

The handler at netlify/functions/tes-runner.js (lines 68‑79) assumes it can set repoRoot = path.resolve(path.dirname(__filename), '..', '..') and import tes.runner plus the rig/modules from the repository. Netlify only deploys the contents of the function bundle (the files under netlify/functions plus JS dependencies); nothing outside that directory is shipped unless you declare it via functions.included_files in netlify.toml. Because the Python sources (tes/, rigs/, modules/, etc.) live outside the function directory and are never referenced from JS, they are not packaged, so every invocation in production will hit ModuleNotFoundError: No module named 'tes' before the console can run any script. You need to include the Python tree in the function bundle (e.g. add the directories to functions.included_files or copy them under netlify/functions) so that the spawned interpreter can import the engine modules.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant