Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@agentworkforce/persona-kit": "^3.0.41",
"@agentworkforce/runtime": "^3.0.41",
"@relayfile/relay-helpers": "^0.3.32"
"@relayfile/relay-helpers": "0.3.32"
},
"devDependencies": {
"@types/node": "^22",
Expand Down
27 changes: 27 additions & 0 deletions tests/linear-agent.test.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import assert from 'node:assert/strict';
import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import path from 'node:path';
import test from 'node:test';

import { linearClient as relayLinearClient } from '@relayfile/relay-helpers';

import linearAgent, { handleLinearEvent } from '../.test-build/linear/agent.js';
import { LINEAR_CREATE_PR_SCRIPT } from '../.test-build/linear/create-pr.script.js';

Expand Down Expand Up @@ -367,3 +372,25 @@ test('real relayfile comment record still resolves mention and issue id', async
log.attrs.recordKeys.includes('body')
));
});

test('relay helper reads Linear issues from by-uuid alias without raw-id file', async (t) => {
const root = await mkdtemp(path.join(tmpdir(), 'linear-chat-lead-'));
t.after(() => rm(root, { recursive: true, force: true }));
const issueId = '5d6f2e15-0f1d-45ed-826b-183265809202';
const issue = {
id: issueId,
identifier: 'AR-70',
title: 'Fix Linear by-uuid reads',
};

await mkdir(path.join(root, 'linear/issues/by-uuid'), { recursive: true });
await writeFile(
path.join(root, 'linear/issues/by-uuid', `${issueId}.json`),
JSON.stringify(issue),
);

assert.deepEqual(
await relayLinearClient({ relayfileMountRoot: root, writebackTimeoutMs: 0 }).getIssue(issueId),
issue,
);
});