Skip to content

E2E tests and clean up -- stabilization#363

Merged
khaliqgant merged 6 commits into
mainfrom
fix/log-cleanup
Feb 3, 2026
Merged

E2E tests and clean up -- stabilization#363
khaliqgant merged 6 commits into
mainfrom
fix/log-cleanup

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Feb 3, 2026

khaliqgant and others added 3 commits February 3, 2026 10:53
- Remove duplicate '[storage] Using JSONL storage' log
- Fix logger to read env vars at runtime (not import time) so
  AGENT_RELAY_LOG_FILE set by CLI is picked up correctly
- Add --verbose flag to `up` command for debug logging
- Update e2e-test.sh script to use modern CLI commands (up, spawn, release, down)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update e2e test to use CLI agents command instead of non-existent /api/agents endpoint
- Add CLI command tests (version, status, agents, who) to e2e workflow
- Remove deprecated `agent-relay claude` and `agent-relay codex` convenience commands
- Update docs and examples to reflect removed commands

Users should use `agent-relay up --dashboard` and `agent-relay spawn` instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
const logFile = getLogFile();
if (logFile) {
ensureLogDir(logFile);
fs.appendFileSync(logFile, formatted + '\n');

Check warning

Code scanning / CodeQL

Network data written to file Medium

Write to file system depends on
Untrusted data
.
Write to file system depends on
Untrusted data
.
Write to file system depends on
Untrusted data
.
Write to file system depends on
Untrusted data
.
Write to file system depends on
Untrusted data
.
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View issue and 6 additional flags in Devin Review.

Open in Devin Review

Comment thread scripts/e2e-test.sh
Comment on lines +63 to +64
if [ -f "$PROJECT_DIR/dist/src/cli/index.js" ]; then
CLI_CMD="$PROJECT_DIR/dist/src/cli/index.js"
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.

🔴 E2E test script tries to execute .js file directly without execute permissions

The e2e test script attempts to execute the compiled JavaScript CLI file directly as a command, but compiled .js files don't have execute permissions by default.

Click to expand

Problem

At scripts/e2e-test.sh:63-64, the script sets CLI_CMD to the path of the compiled .js file:

if [ -f "$PROJECT_DIR/dist/src/cli/index.js" ]; then
  CLI_CMD="$PROJECT_DIR/dist/src/cli/index.js"

Then at lines 137, 177, 193, etc., it tries to execute this file directly:

"$CLI_CMD" up --dashboard --port "$DASHBOARD_PORT" > "$DAEMON_LOG" 2>&1 &
VERSION_OUTPUT=$("$CLI_CMD" --version)

Actual vs Expected

  • Actual: The TypeScript compiler outputs .js files without execute permissions (-rw-r--r--). Trying to execute ./dist/src/cli/index.js directly results in "Permission denied".
  • Expected: The CLI should execute successfully. The old version of this script (before this PR) correctly used node dist/cli/index.js ... which works regardless of permissions.

Impact

The E2E tests will fail in CI because the script will get "Permission denied" when trying to run the CLI commands. This affects both the full E2E test and the daemon-only test paths.

Recommendation: Change the CLI invocation to explicitly use node: replace "$CLI_CMD" with node "$CLI_CMD" throughout the script, or change the preference logic to use the global agent-relay command first (which is properly installed via npm link with executable permissions).

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@khaliqgant khaliqgant merged commit fa76067 into main Feb 3, 2026
32 checks passed
@khaliqgant khaliqgant deleted the fix/log-cleanup branch February 3, 2026 11:02
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