Skip to content

chore: allow .trajectories in git#32

Closed
khaliqgant wants to merge 2 commits intomainfrom
chore/allow-trajectories
Closed

chore: allow .trajectories in git#32
khaliqgant wants to merge 2 commits intomainfrom
chore/allow-trajectories

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Mar 30, 2026

Remove .trajectories/ from .gitignore — trajectories should be tracked.


Open with Devin

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 2 potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment on lines +162 to +178
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(' && '),
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.

🔴 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).

Suggested change
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"`,
Open in Devin Review

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';
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.

🟡 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.

Suggested change
const RELAYFILE = process.env.RELAYFILE_DIR || '/Users/khaliqgant/Projects/AgentWorkforce-relayfile';
const RELAYFILE = process.env.RELAYFILE_PATH || '/Users/khaliqgant/Projects/AgentWorkforce-relayfile';
Open in Devin Review

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

@khaliqgant khaliqgant closed this Mar 30, 2026
@khaliqgant khaliqgant deleted the chore/allow-trajectories branch March 30, 2026 09:14
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.

1 participant