Conversation
| command: [ | ||
| `cd ${RELAYFILE}`, | ||
| // Check Go server compiles | ||
| `echo "=== Go build ===" && make build 2>&1 | tail -3`, | ||
| // Check Go tests pass | ||
| `echo "=== Go test ===" && go test ./internal/... 2>&1 | tail -10`, | ||
| // Check TS SDK builds and tests | ||
| `echo "=== TS SDK build ===" && cd packages/sdk/typescript && npm run build 2>&1 | tail -3`, | ||
| `echo "=== TS SDK test ===" && npm test 2>&1 | tail -10`, | ||
| // Check critical files exist | ||
| `echo "=== File check ==="`, | ||
| `cd ${RELAYFILE}`, | ||
| `missing=0`, | ||
| `for f in internal/httpapi/knowledge.go packages/sdk/typescript/src/types.ts; do if [ ! -f "$f" ]; then echo "MISSING: $f"; missing=$((missing+1)); fi; done`, | ||
| `if [ $missing -gt 0 ]; then echo "$missing files missing"; exit 1; fi`, | ||
| `echo "All files present, build passed"`, | ||
| ].join(' && '), |
There was a problem hiding this comment.
🔴 verify-build step silently swallows build/test failures due to piping to tail
Every build and test command in the verify-build step pipes its output through tail (e.g. make build 2>&1 | tail -3). In bash, a pipeline's exit code is the exit code of the last command (tail), which always returns 0 regardless of whether the preceding command failed. Since all commands are joined with &&, the chain never stops on a build or test failure. This makes failOnError: true useless — the step always succeeds.
This means if make build, go test, npm run build, or npm test fail, the workflow silently continues to the commit and push steps (workflows/knowledge-extraction.ts:207-218), pushing potentially broken code to the remote branch.
Contrast with existing workflow patterns
Other workflows in the repo handle this differently — they either use failOnError: false with a subsequent fix step (e.g. relayfile-bulk-and-export.ts:352-360), or append ; echo "EXIT: $?" to surface the status. This workflow intends to be a hard gate but the pipe defeats it.
A fix would be to prepend set -o pipefail; to the command, or remove the | tail pipes entirely (since captureOutput: true already captures the output).
| command: [ | |
| `cd ${RELAYFILE}`, | |
| // Check Go server compiles | |
| `echo "=== Go build ===" && make build 2>&1 | tail -3`, | |
| // Check Go tests pass | |
| `echo "=== Go test ===" && go test ./internal/... 2>&1 | tail -10`, | |
| // Check TS SDK builds and tests | |
| `echo "=== TS SDK build ===" && cd packages/sdk/typescript && npm run build 2>&1 | tail -3`, | |
| `echo "=== TS SDK test ===" && npm test 2>&1 | tail -10`, | |
| // Check critical files exist | |
| `echo "=== File check ==="`, | |
| `cd ${RELAYFILE}`, | |
| `missing=0`, | |
| `for f in internal/httpapi/knowledge.go packages/sdk/typescript/src/types.ts; do if [ ! -f "$f" ]; then echo "MISSING: $f"; missing=$((missing+1)); fi; done`, | |
| `if [ $missing -gt 0 ]; then echo "$missing files missing"; exit 1; fi`, | |
| `echo "All files present, build passed"`, | |
| ].join(' && '), | |
| command: [ | |
| `set -o pipefail`, | |
| `cd ${RELAYFILE}`, | |
| // Check Go server compiles | |
| `echo "=== Go build ===" && make build 2>&1 | tail -3`, | |
| // Check Go tests pass | |
| `echo "=== Go test ===" && go test ./internal/... 2>&1 | tail -10`, | |
| // Check TS SDK builds and tests | |
| `echo "=== TS SDK build ===" && cd packages/sdk/typescript && npm run build 2>&1 | tail -3`, | |
| `echo "=== TS SDK test ===" && npm test 2>&1 | tail -10`, | |
| // Check critical files exist | |
| `echo "=== File check ==="`, | |
| `cd ${RELAYFILE}`, | |
| `missing=0`, | |
| `for f in internal/httpapi/knowledge.go packages/sdk/typescript/src/types.ts; do if [ ! -f "$f" ]; then echo "MISSING: $f"; missing=$((missing+1)); fi; done`, | |
| `if [ $missing -gt 0 ]; then echo "$missing files missing"; exit 1; fi`, | |
| `echo "All files present, build passed"`, |
Was this helpful? React with 👍 or 👎 to provide feedback.
|
|
||
| const { workflow } = require('@agent-relay/sdk/workflows'); | ||
|
|
||
| const RELAYFILE = process.env.RELAYFILE_DIR || '/Users/khaliqgant/Projects/AgentWorkforce-relayfile'; |
There was a problem hiding this comment.
🟡 Environment variable name RELAYFILE_DIR breaks convention — all other workflows use RELAYFILE_PATH
The new workflow reads process.env.RELAYFILE_DIR at workflows/knowledge-extraction.ts:19, but every other workflow in the repo uses process.env.RELAYFILE_PATH (relayfile-bulk-and-export.ts:17, relayfile-ci-and-publish.ts:17, relayfile-cloud-server.ts:32, relayfile-developer-experience.ts:21, relayfile-landing-page.ts:15). A user or CI environment that sets RELAYFILE_PATH will find this workflow ignores it and falls back to the hardcoded developer-local path /Users/khaliqgant/Projects/AgentWorkforce-relayfile.
| const RELAYFILE = process.env.RELAYFILE_DIR || '/Users/khaliqgant/Projects/AgentWorkforce-relayfile'; | |
| const RELAYFILE = process.env.RELAYFILE_PATH || '/Users/khaliqgant/Projects/AgentWorkforce-relayfile'; |
Was this helpful? React with 👍 or 👎 to provide feedback.
Remove .trajectories/ from .gitignore — trajectories should be tracked.