sqlew 3.2.4 → 3.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +843 -0
- package/README.md +53 -2
- package/assets/schema.sql +6 -1
- package/dist/config/loader.d.ts +46 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +151 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/types.d.ts +77 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +28 -0
- package/dist/config/types.js.map +1 -0
- package/dist/constants.d.ts +9 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +10 -0
- package/dist/constants.js.map +1 -1
- package/dist/database.d.ts +1 -1
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +84 -15
- package/dist/database.js.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/dist/migrations/add-v3.5.0-pruned-files.d.ts +26 -0
- package/dist/migrations/add-v3.5.0-pruned-files.d.ts.map +1 -0
- package/dist/migrations/add-v3.5.0-pruned-files.js +107 -0
- package/dist/migrations/add-v3.5.0-pruned-files.js.map +1 -0
- package/dist/migrations/index.d.ts +2 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +16 -1
- package/dist/migrations/index.js.map +1 -1
- package/dist/tests/git-aware-completion.test.d.ts +6 -0
- package/dist/tests/git-aware-completion.test.d.ts.map +1 -0
- package/dist/tests/git-aware-completion.test.js +141 -0
- package/dist/tests/git-aware-completion.test.js.map +1 -0
- package/dist/tests/tasks.auto-pruning-decision-link.test.d.ts +6 -0
- package/dist/tests/tasks.auto-pruning-decision-link.test.d.ts.map +1 -0
- package/dist/tests/tasks.auto-pruning-decision-link.test.js +250 -0
- package/dist/tests/tasks.auto-pruning-decision-link.test.js.map +1 -0
- package/dist/tests/tasks.auto-pruning-partial.test.d.ts +6 -0
- package/dist/tests/tasks.auto-pruning-partial.test.d.ts.map +1 -0
- package/dist/tests/tasks.auto-pruning-partial.test.js +274 -0
- package/dist/tests/tasks.auto-pruning-partial.test.js.map +1 -0
- package/dist/tests/tasks.auto-pruning-persistence.test.d.ts +6 -0
- package/dist/tests/tasks.auto-pruning-persistence.test.d.ts.map +1 -0
- package/dist/tests/tasks.auto-pruning-persistence.test.js +232 -0
- package/dist/tests/tasks.auto-pruning-persistence.test.js.map +1 -0
- package/dist/tests/tasks.auto-pruning-safety.test.d.ts +12 -0
- package/dist/tests/tasks.auto-pruning-safety.test.d.ts.map +1 -0
- package/dist/tests/tasks.auto-pruning-safety.test.js +196 -0
- package/dist/tests/tasks.auto-pruning-safety.test.js.map +1 -0
- package/dist/tests/tasks.link-file-backward-compat.test.d.ts +6 -0
- package/dist/tests/tasks.link-file-backward-compat.test.d.ts.map +1 -0
- package/dist/tests/tasks.link-file-backward-compat.test.js +235 -0
- package/dist/tests/tasks.link-file-backward-compat.test.js.map +1 -0
- package/dist/tests/tasks.watch-files-action.test.d.ts +6 -0
- package/dist/tests/tasks.watch-files-action.test.d.ts.map +1 -0
- package/dist/tests/tasks.watch-files-action.test.js +351 -0
- package/dist/tests/tasks.watch-files-action.test.js.map +1 -0
- package/dist/tests/tasks.watch-files-parameter.test.d.ts +6 -0
- package/dist/tests/tasks.watch-files-parameter.test.d.ts.map +1 -0
- package/dist/tests/tasks.watch-files-parameter.test.js +249 -0
- package/dist/tests/tasks.watch-files-parameter.test.js.map +1 -0
- package/dist/tests/two-step-git-completion.test.d.ts +6 -0
- package/dist/tests/two-step-git-completion.test.d.ts.map +1 -0
- package/dist/tests/two-step-git-completion.test.js +283 -0
- package/dist/tests/two-step-git-completion.test.js.map +1 -0
- package/dist/tests/vcs-staging.test.d.ts +6 -0
- package/dist/tests/vcs-staging.test.d.ts.map +1 -0
- package/dist/tests/vcs-staging.test.js +137 -0
- package/dist/tests/vcs-staging.test.js.map +1 -0
- package/dist/tools/config.d.ts +4 -2
- package/dist/tools/config.d.ts.map +1 -1
- package/dist/tools/config.js +13 -11
- package/dist/tools/config.js.map +1 -1
- package/dist/tools/constraints.d.ts +7 -4
- package/dist/tools/constraints.d.ts.map +1 -1
- package/dist/tools/constraints.js +19 -16
- package/dist/tools/constraints.js.map +1 -1
- package/dist/tools/context.d.ts +33 -17
- package/dist/tools/context.d.ts.map +1 -1
- package/dist/tools/context.js +84 -68
- package/dist/tools/context.js.map +1 -1
- package/dist/tools/files.d.ts +9 -5
- package/dist/tools/files.d.ts.map +1 -1
- package/dist/tools/files.js +19 -15
- package/dist/tools/files.js.map +1 -1
- package/dist/tools/messaging.d.ts +9 -5
- package/dist/tools/messaging.d.ts.map +1 -1
- package/dist/tools/messaging.js +20 -16
- package/dist/tools/messaging.js.map +1 -1
- package/dist/tools/tasks.d.ts +40 -12
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +475 -87
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/utils.d.ts +11 -6
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tools/utils.js +56 -44
- package/dist/tools/utils.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/file-pruning.d.ts +69 -0
- package/dist/utils/file-pruning.d.ts.map +1 -0
- package/dist/utils/file-pruning.js +185 -0
- package/dist/utils/file-pruning.js.map +1 -0
- package/dist/utils/quality-checks.d.ts +60 -0
- package/dist/utils/quality-checks.d.ts.map +1 -0
- package/dist/utils/quality-checks.js +228 -0
- package/dist/utils/quality-checks.js.map +1 -0
- package/dist/utils/retention.d.ts +8 -0
- package/dist/utils/retention.d.ts.map +1 -1
- package/dist/utils/retention.js +12 -0
- package/dist/utils/retention.js.map +1 -1
- package/dist/utils/task-stale-detection.d.ts +69 -1
- package/dist/utils/task-stale-detection.d.ts.map +1 -1
- package/dist/utils/task-stale-detection.js +494 -17
- package/dist/utils/task-stale-detection.js.map +1 -1
- package/dist/utils/validators.d.ts +2 -2
- package/dist/utils/validators.d.ts.map +1 -1
- package/dist/utils/validators.js +11 -2
- package/dist/utils/validators.js.map +1 -1
- package/dist/utils/vcs-adapter.d.ts +68 -0
- package/dist/utils/vcs-adapter.d.ts.map +1 -0
- package/dist/utils/vcs-adapter.js +187 -0
- package/dist/utils/vcs-adapter.js.map +1 -0
- package/dist/watcher/file-watcher.d.ts +54 -4
- package/dist/watcher/file-watcher.d.ts.map +1 -1
- package/dist/watcher/file-watcher.js +312 -30
- package/dist/watcher/file-watcher.js.map +1 -1
- package/dist/watcher/gitignore-parser.d.ts +70 -0
- package/dist/watcher/gitignore-parser.d.ts.map +1 -0
- package/dist/watcher/gitignore-parser.js +191 -0
- package/dist/watcher/gitignore-parser.js.map +1 -0
- package/dist/watcher/index.d.ts +1 -0
- package/dist/watcher/index.d.ts.map +1 -1
- package/dist/watcher/index.js +1 -0
- package/dist/watcher/index.js.map +1 -1
- package/docs/AI_AGENT_GUIDE.md +1 -1
- package/docs/ARCHITECTURE.md +12 -0
- package/docs/AUTO_FILE_TRACKING.md +486 -82
- package/docs/CONFIGURATION.md +908 -0
- package/docs/GIT_AWARE_AUTO_COMPLETE.md +645 -0
- package/docs/MIGRATION_v3.3.md +602 -0
- package/docs/SHARED_CONCEPTS.md +2 -1
- package/docs/TASK_ACTIONS.md +12 -0
- package/docs/TASK_OVERVIEW.md +124 -23
- package/docs/TASK_PRUNING.md +589 -0
- package/docs/TASK_SYSTEM.md +83 -13
- package/docs/TOOL_REFERENCE.md +94 -6
- package/package.json +8 -6
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integration tests for v3.5.0 Auto-Pruning Safety Check
|
|
3
|
+
* Tests that the system blocks task transition when ALL watched files are non-existent
|
|
4
|
+
*
|
|
5
|
+
* Test Scenario: Zero Work Done Protection
|
|
6
|
+
* - Create task with 3 watched files
|
|
7
|
+
* - Make ALL 3 files non-existent
|
|
8
|
+
* - Trigger detectAndTransitionToReview()
|
|
9
|
+
* - Expected: Error thrown, task status unchanged, transaction rolled back
|
|
10
|
+
*/
|
|
11
|
+
import { describe, it, beforeEach, afterEach } from 'node:test';
|
|
12
|
+
import assert from 'node:assert/strict';
|
|
13
|
+
import Database from 'better-sqlite3';
|
|
14
|
+
import { initializeSchema } from '../schema.js';
|
|
15
|
+
import { runAllMigrations } from '../migrations/index.js';
|
|
16
|
+
import { detectAndTransitionToReview } from '../utils/task-stale-detection.js';
|
|
17
|
+
describe('Auto-pruning: Safety check when all files pruned', () => {
|
|
18
|
+
let db;
|
|
19
|
+
beforeEach(() => {
|
|
20
|
+
db = new Database(':memory:');
|
|
21
|
+
db.pragma('foreign_keys = ON');
|
|
22
|
+
initializeSchema(db);
|
|
23
|
+
runAllMigrations(db);
|
|
24
|
+
});
|
|
25
|
+
afterEach(() => {
|
|
26
|
+
db.close();
|
|
27
|
+
});
|
|
28
|
+
it('should block transition when all watched files are non-existent', async () => {
|
|
29
|
+
// 1. Create test task in 'in_progress' status
|
|
30
|
+
const taskId = createTestTask(db);
|
|
31
|
+
// 2. Add 3 non-existent files to watch list
|
|
32
|
+
// Using paths that will never exist in the test environment
|
|
33
|
+
const nonExistentFiles = [
|
|
34
|
+
'/tmp/never-created-file-1.ts',
|
|
35
|
+
'/tmp/never-created-file-2.ts',
|
|
36
|
+
'/tmp/never-created-file-3.ts'
|
|
37
|
+
];
|
|
38
|
+
addWatchedFiles(db, taskId, nonExistentFiles);
|
|
39
|
+
// 3. Make task appear "stale" by backdating its updated_ts
|
|
40
|
+
// Set updated_ts to 10 minutes ago (older than default 3-minute idle threshold)
|
|
41
|
+
const tenMinutesAgo = Math.floor(Date.now() / 1000) - (10 * 60);
|
|
42
|
+
db.prepare(`
|
|
43
|
+
UPDATE t_tasks
|
|
44
|
+
SET updated_ts = ?
|
|
45
|
+
WHERE id = ?
|
|
46
|
+
`).run(tenMinutesAgo, taskId);
|
|
47
|
+
// 4. Verify task is in 'in_progress' before attempt
|
|
48
|
+
const beforeStatus = db.prepare(`
|
|
49
|
+
SELECT s.name
|
|
50
|
+
FROM t_tasks t
|
|
51
|
+
JOIN m_task_statuses s ON t.status_id = s.id
|
|
52
|
+
WHERE t.id = ?
|
|
53
|
+
`).get(taskId);
|
|
54
|
+
assert.strictEqual(beforeStatus.name, 'in_progress', 'Task should start in in_progress');
|
|
55
|
+
// 5. Verify watch list has all 3 files before attempt
|
|
56
|
+
const beforeWatchCount = db.prepare(`
|
|
57
|
+
SELECT COUNT(*) as count FROM t_task_file_links WHERE task_id = ?
|
|
58
|
+
`).get(taskId);
|
|
59
|
+
assert.strictEqual(beforeWatchCount.count, 3, 'Watch list should have 3 files before pruning attempt');
|
|
60
|
+
// 6. Attempt transition - should NOT throw at top level
|
|
61
|
+
// The error should be caught internally and logged
|
|
62
|
+
// Task should remain in in_progress without transitioning
|
|
63
|
+
const transitioned = await detectAndTransitionToReview(db);
|
|
64
|
+
// 7. Verify zero tasks were transitioned
|
|
65
|
+
assert.strictEqual(transitioned, 0, 'No tasks should have been transitioned');
|
|
66
|
+
// 8. Verify task status unchanged (remains in in_progress)
|
|
67
|
+
const afterStatus = db.prepare(`
|
|
68
|
+
SELECT s.name
|
|
69
|
+
FROM t_tasks t
|
|
70
|
+
JOIN m_task_statuses s ON t.status_id = s.id
|
|
71
|
+
WHERE t.id = ?
|
|
72
|
+
`).get(taskId);
|
|
73
|
+
assert.strictEqual(afterStatus.name, 'in_progress', 'Task should remain in in_progress after safety check');
|
|
74
|
+
// 9. Verify NO audit records created (transaction rollback)
|
|
75
|
+
const prunedCount = db.prepare(`
|
|
76
|
+
SELECT COUNT(*) as count FROM t_task_pruned_files WHERE task_id = ?
|
|
77
|
+
`).get(taskId);
|
|
78
|
+
assert.strictEqual(prunedCount.count, 0, 'Should have no pruned file records due to rollback');
|
|
79
|
+
// 10. Verify watch list is NOT empty (transaction rolled back)
|
|
80
|
+
const afterWatchCount = db.prepare(`
|
|
81
|
+
SELECT COUNT(*) as count FROM t_task_file_links WHERE task_id = ?
|
|
82
|
+
`).get(taskId);
|
|
83
|
+
assert.strictEqual(afterWatchCount.count, 3, 'Watch list should still have all 3 files after rollback');
|
|
84
|
+
});
|
|
85
|
+
it('should prune SOME non-existent files and continue (partial prune)', async () => {
|
|
86
|
+
// Create task
|
|
87
|
+
const taskId = createTestTask(db);
|
|
88
|
+
// Add mix of existent and non-existent files
|
|
89
|
+
// Use package.json as a file that definitely exists in the project root
|
|
90
|
+
const mixedFiles = [
|
|
91
|
+
'package.json', // exists
|
|
92
|
+
'/tmp/never-created-file-1.ts', // does not exist
|
|
93
|
+
'/tmp/never-created-file-2.ts' // does not exist
|
|
94
|
+
];
|
|
95
|
+
addWatchedFiles(db, taskId, mixedFiles);
|
|
96
|
+
// Make task appear stale
|
|
97
|
+
const tenMinutesAgo = Math.floor(Date.now() / 1000) - (10 * 60);
|
|
98
|
+
db.prepare(`
|
|
99
|
+
UPDATE t_tasks
|
|
100
|
+
SET updated_ts = ?
|
|
101
|
+
WHERE id = ?
|
|
102
|
+
`).run(tenMinutesAgo, taskId);
|
|
103
|
+
// Verify initial watch count
|
|
104
|
+
const beforeWatchCount = db.prepare(`
|
|
105
|
+
SELECT COUNT(*) as count FROM t_task_file_links WHERE task_id = ?
|
|
106
|
+
`).get(taskId);
|
|
107
|
+
assert.strictEqual(beforeWatchCount.count, 3, 'Watch list should start with 3 files');
|
|
108
|
+
// Attempt transition - should proceed with partial pruning
|
|
109
|
+
await detectAndTransitionToReview(db);
|
|
110
|
+
// Verify some files were pruned
|
|
111
|
+
const prunedCount = db.prepare(`
|
|
112
|
+
SELECT COUNT(*) as count FROM t_task_pruned_files WHERE task_id = ?
|
|
113
|
+
`).get(taskId);
|
|
114
|
+
assert.strictEqual(prunedCount.count, 2, 'Should have 2 pruned file records (the non-existent ones)');
|
|
115
|
+
// Verify watch list now has only 1 file (the existing one)
|
|
116
|
+
const afterWatchCount = db.prepare(`
|
|
117
|
+
SELECT COUNT(*) as count FROM t_task_file_links WHERE task_id = ?
|
|
118
|
+
`).get(taskId);
|
|
119
|
+
assert.strictEqual(afterWatchCount.count, 1, 'Watch list should have 1 remaining file after partial prune');
|
|
120
|
+
// Verify remaining file is package.json
|
|
121
|
+
const remainingFile = db.prepare(`
|
|
122
|
+
SELECT f.path
|
|
123
|
+
FROM t_task_file_links tfl
|
|
124
|
+
JOIN m_files f ON tfl.file_id = f.id
|
|
125
|
+
WHERE tfl.task_id = ?
|
|
126
|
+
`).get(taskId);
|
|
127
|
+
assert.strictEqual(remainingFile.path, 'package.json', 'Remaining file should be package.json');
|
|
128
|
+
});
|
|
129
|
+
it('should handle task with no watched files gracefully', async () => {
|
|
130
|
+
// Create task without any watched files
|
|
131
|
+
const taskId = createTestTask(db);
|
|
132
|
+
// Make task appear stale
|
|
133
|
+
const tenMinutesAgo = Math.floor(Date.now() / 1000) - (10 * 60);
|
|
134
|
+
db.prepare(`
|
|
135
|
+
UPDATE t_tasks
|
|
136
|
+
SET updated_ts = ?
|
|
137
|
+
WHERE id = ?
|
|
138
|
+
`).run(tenMinutesAgo, taskId);
|
|
139
|
+
// Attempt transition - should skip this task
|
|
140
|
+
const transitioned = await detectAndTransitionToReview(db);
|
|
141
|
+
assert.strictEqual(transitioned, 0, 'Should not transition task with no watched files');
|
|
142
|
+
// Verify task status unchanged
|
|
143
|
+
const status = db.prepare(`
|
|
144
|
+
SELECT s.name
|
|
145
|
+
FROM t_tasks t
|
|
146
|
+
JOIN m_task_statuses s ON t.status_id = s.id
|
|
147
|
+
WHERE t.id = ?
|
|
148
|
+
`).get(taskId);
|
|
149
|
+
assert.strictEqual(status.name, 'in_progress', 'Task should remain in in_progress');
|
|
150
|
+
});
|
|
151
|
+
console.log('\n✅ All auto-pruning safety check tests passed!\n');
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* Helper: Create a test task in 'in_progress' status
|
|
155
|
+
*/
|
|
156
|
+
function createTestTask(db) {
|
|
157
|
+
// Create test agent
|
|
158
|
+
const agentId = db.prepare(`
|
|
159
|
+
INSERT INTO m_agents (name) VALUES (?) RETURNING id
|
|
160
|
+
`).get('test-agent');
|
|
161
|
+
// Get 'in_progress' status ID
|
|
162
|
+
const statusId = db.prepare(`
|
|
163
|
+
SELECT id FROM m_task_statuses WHERE name = 'in_progress'
|
|
164
|
+
`).get();
|
|
165
|
+
// Create task with updated_ts set to now (will be backdated in tests)
|
|
166
|
+
const taskId = db.prepare(`
|
|
167
|
+
INSERT INTO t_tasks (
|
|
168
|
+
title,
|
|
169
|
+
status_id,
|
|
170
|
+
priority,
|
|
171
|
+
assigned_agent_id,
|
|
172
|
+
created_by_agent_id,
|
|
173
|
+
created_ts,
|
|
174
|
+
updated_ts
|
|
175
|
+
)
|
|
176
|
+
VALUES (?, ?, 2, ?, ?, unixepoch(), unixepoch())
|
|
177
|
+
RETURNING id
|
|
178
|
+
`).get('Test task for auto-pruning', statusId.id, agentId.id, agentId.id);
|
|
179
|
+
return taskId.id;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Helper: Add watched files to a task
|
|
183
|
+
*/
|
|
184
|
+
function addWatchedFiles(db, taskId, filePaths) {
|
|
185
|
+
const insertFile = db.prepare(`
|
|
186
|
+
INSERT OR IGNORE INTO m_files (path) VALUES (?) RETURNING id
|
|
187
|
+
`);
|
|
188
|
+
const linkFile = db.prepare(`
|
|
189
|
+
INSERT INTO t_task_file_links (task_id, file_id) VALUES (?, ?)
|
|
190
|
+
`);
|
|
191
|
+
for (const filePath of filePaths) {
|
|
192
|
+
const fileResult = insertFile.get(filePath);
|
|
193
|
+
linkFile.run(taskId, fileResult.id);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=tasks.auto-pruning-safety.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.auto-pruning-safety.test.js","sourceRoot":"","sources":["../../src/tests/tasks.auto-pruning-safety.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAA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C;IAEvC,8BAA8B;IAC9B,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC;;GAE3B,CAAC,CAAC,GAAG,EAAoB,CAAC;IAE3B,sEAAsE;IACtE,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC;;;;;;;;;;;;GAYzB,CAAC,CAAC,GAAG,CACJ,4BAA4B,EAC5B,QAAQ,CAAC,EAAE,EACX,OAAO,CAAC,EAAE,EACV,OAAO,CAAC,EAAE,CACO,CAAC;IAEpB,OAAO,MAAM,CAAC,EAAE,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,EAAqB,EAAE,MAAc,EAAE,SAAmB;IACjF,MAAM,UAAU,GAAG,EAAE,CAAC,OAAO,CAAC;;GAE7B,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,EAAE,CAAC,OAAO,CAAC;;GAE3B,CAAC,CAAC;IAEH,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAmB,CAAC;QAC9D,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.link-file-backward-compat.test.d.ts","sourceRoot":"","sources":["../../src/tests/tasks.link-file-backward-compat.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for backward compatibility of deprecated task.link(link_type="file") (v3.4.1)
|
|
3
|
+
* Tests that the deprecated API still works while showing deprecation warnings
|
|
4
|
+
*/
|
|
5
|
+
import { describe, it, beforeEach } from 'node:test';
|
|
6
|
+
import assert from 'node:assert/strict';
|
|
7
|
+
import Database from 'better-sqlite3';
|
|
8
|
+
import { initializeSchema } from '../schema.js';
|
|
9
|
+
import { getOrCreateAgent, getOrCreateFile } from '../database.js';
|
|
10
|
+
/**
|
|
11
|
+
* Test database instance
|
|
12
|
+
*/
|
|
13
|
+
let testDb;
|
|
14
|
+
/**
|
|
15
|
+
* Create an in-memory test database
|
|
16
|
+
*/
|
|
17
|
+
function createTestDatabase() {
|
|
18
|
+
const db = new Database(':memory:');
|
|
19
|
+
db.pragma('foreign_keys = ON');
|
|
20
|
+
initializeSchema(db);
|
|
21
|
+
return db;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Helper: Create a test task
|
|
25
|
+
*/
|
|
26
|
+
function createTestTask(db, title) {
|
|
27
|
+
const agentId = getOrCreateAgent(db, 'test-agent');
|
|
28
|
+
const statusId = 1; // todo
|
|
29
|
+
const result = db.prepare(`
|
|
30
|
+
INSERT INTO t_tasks (title, status_id, priority, created_by_agent_id, assigned_agent_id)
|
|
31
|
+
VALUES (?, ?, 2, ?, ?)
|
|
32
|
+
`).run(title, statusId, agentId, agentId);
|
|
33
|
+
return result.lastInsertRowid;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Inline implementation of linkTask for testing (file link_type only)
|
|
37
|
+
*/
|
|
38
|
+
function linkTaskFile(db, params) {
|
|
39
|
+
if (!params.task_id) {
|
|
40
|
+
throw new Error('Parameter "task_id" is required');
|
|
41
|
+
}
|
|
42
|
+
if (params.target_id === undefined || params.target_id === null) {
|
|
43
|
+
throw new Error('Parameter "target_id" is required');
|
|
44
|
+
}
|
|
45
|
+
// Check if task exists
|
|
46
|
+
const taskExists = db.prepare('SELECT id FROM t_tasks WHERE id = ?').get(params.task_id);
|
|
47
|
+
if (!taskExists) {
|
|
48
|
+
throw new Error(`Task with id ${params.task_id} not found`);
|
|
49
|
+
}
|
|
50
|
+
// Deprecation warning (v3.4.1) - would appear in console
|
|
51
|
+
// console.warn(`⚠️ DEPRECATION WARNING: task.link(link_type="file") is deprecated as of v3.4.1.`);
|
|
52
|
+
const filePath = String(params.target_id);
|
|
53
|
+
const fileId = getOrCreateFile(db, filePath);
|
|
54
|
+
const stmt = db.prepare(`
|
|
55
|
+
INSERT OR IGNORE INTO t_task_file_links (task_id, file_id)
|
|
56
|
+
VALUES (?, ?)
|
|
57
|
+
`);
|
|
58
|
+
stmt.run(params.task_id, fileId);
|
|
59
|
+
return {
|
|
60
|
+
success: true,
|
|
61
|
+
task_id: params.task_id,
|
|
62
|
+
linked_to: 'file',
|
|
63
|
+
target: filePath,
|
|
64
|
+
deprecation_warning: 'task.link(link_type="file") is deprecated. Use task.create/update(watch_files) or watch_files action instead.',
|
|
65
|
+
message: `Task ${params.task_id} linked to file "${filePath}" (DEPRECATED API - use watch_files instead)`
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
describe('Backward compatibility: task.link(link_type="file")', () => {
|
|
69
|
+
beforeEach(() => {
|
|
70
|
+
testDb = createTestDatabase();
|
|
71
|
+
});
|
|
72
|
+
it('should still link file to task (backward compatible)', () => {
|
|
73
|
+
const taskId = createTestTask(testDb, 'Task for backward compat test');
|
|
74
|
+
const result = linkTaskFile(testDb, {
|
|
75
|
+
task_id: taskId,
|
|
76
|
+
target_id: 'src/index.ts'
|
|
77
|
+
});
|
|
78
|
+
assert.ok(result.success, 'Should succeed');
|
|
79
|
+
assert.strictEqual(result.task_id, taskId);
|
|
80
|
+
assert.strictEqual(result.linked_to, 'file');
|
|
81
|
+
assert.strictEqual(result.target, 'src/index.ts');
|
|
82
|
+
});
|
|
83
|
+
it('should include deprecation warning in response', () => {
|
|
84
|
+
const taskId = createTestTask(testDb, 'Task for deprecation warning test');
|
|
85
|
+
const result = linkTaskFile(testDb, {
|
|
86
|
+
task_id: taskId,
|
|
87
|
+
target_id: 'src/database.ts'
|
|
88
|
+
});
|
|
89
|
+
assert.ok(result.deprecation_warning, 'Should include deprecation warning');
|
|
90
|
+
assert.ok(result.deprecation_warning.includes('deprecated'), 'Warning should mention deprecation');
|
|
91
|
+
assert.ok(result.deprecation_warning.includes('watch_files'), 'Warning should suggest watch_files');
|
|
92
|
+
});
|
|
93
|
+
it('should create file link in database', () => {
|
|
94
|
+
const taskId = createTestTask(testDb, 'Task for DB link test');
|
|
95
|
+
linkTaskFile(testDb, {
|
|
96
|
+
task_id: taskId,
|
|
97
|
+
target_id: 'src/schema.ts'
|
|
98
|
+
});
|
|
99
|
+
// Verify file link was created
|
|
100
|
+
const links = testDb.prepare(`
|
|
101
|
+
SELECT f.path
|
|
102
|
+
FROM t_task_file_links tfl
|
|
103
|
+
JOIN m_files f ON tfl.file_id = f.id
|
|
104
|
+
WHERE tfl.task_id = ?
|
|
105
|
+
`).all(taskId);
|
|
106
|
+
assert.strictEqual(links.length, 1);
|
|
107
|
+
assert.strictEqual(links[0].path, 'src/schema.ts');
|
|
108
|
+
});
|
|
109
|
+
it('should handle multiple file links', () => {
|
|
110
|
+
const taskId = createTestTask(testDb, 'Task for multiple links');
|
|
111
|
+
linkTaskFile(testDb, {
|
|
112
|
+
task_id: taskId,
|
|
113
|
+
target_id: 'src/index.ts'
|
|
114
|
+
});
|
|
115
|
+
linkTaskFile(testDb, {
|
|
116
|
+
task_id: taskId,
|
|
117
|
+
target_id: 'src/database.ts'
|
|
118
|
+
});
|
|
119
|
+
linkTaskFile(testDb, {
|
|
120
|
+
task_id: taskId,
|
|
121
|
+
target_id: 'src/schema.ts'
|
|
122
|
+
});
|
|
123
|
+
// Verify all links exist
|
|
124
|
+
const links = testDb.prepare(`
|
|
125
|
+
SELECT f.path
|
|
126
|
+
FROM t_task_file_links tfl
|
|
127
|
+
JOIN m_files f ON tfl.file_id = f.id
|
|
128
|
+
WHERE tfl.task_id = ?
|
|
129
|
+
ORDER BY f.path
|
|
130
|
+
`).all(taskId);
|
|
131
|
+
assert.strictEqual(links.length, 3);
|
|
132
|
+
assert.strictEqual(links[0].path, 'src/database.ts');
|
|
133
|
+
assert.strictEqual(links[1].path, 'src/index.ts');
|
|
134
|
+
assert.strictEqual(links[2].path, 'src/schema.ts');
|
|
135
|
+
});
|
|
136
|
+
it('should be idempotent (duplicate links ignored)', () => {
|
|
137
|
+
const taskId = createTestTask(testDb, 'Task for idempotent test');
|
|
138
|
+
// Link same file twice
|
|
139
|
+
linkTaskFile(testDb, {
|
|
140
|
+
task_id: taskId,
|
|
141
|
+
target_id: 'src/index.ts'
|
|
142
|
+
});
|
|
143
|
+
linkTaskFile(testDb, {
|
|
144
|
+
task_id: taskId,
|
|
145
|
+
target_id: 'src/index.ts'
|
|
146
|
+
});
|
|
147
|
+
// Should only have one link
|
|
148
|
+
const links = testDb.prepare(`
|
|
149
|
+
SELECT f.path
|
|
150
|
+
FROM t_task_file_links tfl
|
|
151
|
+
JOIN m_files f ON tfl.file_id = f.id
|
|
152
|
+
WHERE tfl.task_id = ?
|
|
153
|
+
`).all(taskId);
|
|
154
|
+
assert.strictEqual(links.length, 1, 'Should not create duplicate links');
|
|
155
|
+
});
|
|
156
|
+
it('should work with new watch_files action on same task', () => {
|
|
157
|
+
const taskId = createTestTask(testDb, 'Task for mixed API test');
|
|
158
|
+
// Use old API
|
|
159
|
+
linkTaskFile(testDb, {
|
|
160
|
+
task_id: taskId,
|
|
161
|
+
target_id: 'src/index.ts'
|
|
162
|
+
});
|
|
163
|
+
// Use new API (simulated by direct DB insert)
|
|
164
|
+
const fileId = getOrCreateFile(testDb, 'src/database.ts');
|
|
165
|
+
testDb.prepare('INSERT OR IGNORE INTO t_task_file_links (task_id, file_id) VALUES (?, ?)').run(taskId, fileId);
|
|
166
|
+
// Both files should be linked
|
|
167
|
+
const links = testDb.prepare(`
|
|
168
|
+
SELECT f.path
|
|
169
|
+
FROM t_task_file_links tfl
|
|
170
|
+
JOIN m_files f ON tfl.file_id = f.id
|
|
171
|
+
WHERE tfl.task_id = ?
|
|
172
|
+
ORDER BY f.path
|
|
173
|
+
`).all(taskId);
|
|
174
|
+
assert.strictEqual(links.length, 2);
|
|
175
|
+
assert.strictEqual(links[0].path, 'src/database.ts');
|
|
176
|
+
assert.strictEqual(links[1].path, 'src/index.ts');
|
|
177
|
+
});
|
|
178
|
+
it('should throw error for invalid task_id', () => {
|
|
179
|
+
assert.throws(() => {
|
|
180
|
+
linkTaskFile(testDb, {
|
|
181
|
+
task_id: 999,
|
|
182
|
+
target_id: 'src/index.ts'
|
|
183
|
+
});
|
|
184
|
+
}, /Task with id 999 not found/);
|
|
185
|
+
});
|
|
186
|
+
it('should handle various file path formats', () => {
|
|
187
|
+
const taskId = createTestTask(testDb, 'Task for path formats');
|
|
188
|
+
linkTaskFile(testDb, {
|
|
189
|
+
task_id: taskId,
|
|
190
|
+
target_id: 'package.json'
|
|
191
|
+
});
|
|
192
|
+
linkTaskFile(testDb, {
|
|
193
|
+
task_id: taskId,
|
|
194
|
+
target_id: 'src/tools/tasks.ts'
|
|
195
|
+
});
|
|
196
|
+
linkTaskFile(testDb, {
|
|
197
|
+
task_id: taskId,
|
|
198
|
+
target_id: 'docs/README.md'
|
|
199
|
+
});
|
|
200
|
+
const links = testDb.prepare(`
|
|
201
|
+
SELECT f.path
|
|
202
|
+
FROM t_task_file_links tfl
|
|
203
|
+
JOIN m_files f ON tfl.file_id = f.id
|
|
204
|
+
WHERE tfl.task_id = ?
|
|
205
|
+
`).all(taskId);
|
|
206
|
+
assert.strictEqual(links.length, 3);
|
|
207
|
+
});
|
|
208
|
+
it('should maintain same database schema as new API', () => {
|
|
209
|
+
const taskId1 = createTestTask(testDb, 'Task with old API');
|
|
210
|
+
const taskId2 = createTestTask(testDb, 'Task with new API');
|
|
211
|
+
// Old API
|
|
212
|
+
linkTaskFile(testDb, {
|
|
213
|
+
task_id: taskId1,
|
|
214
|
+
target_id: 'src/index.ts'
|
|
215
|
+
});
|
|
216
|
+
// New API (simulated)
|
|
217
|
+
const fileId = getOrCreateFile(testDb, 'src/index.ts');
|
|
218
|
+
testDb.prepare('INSERT OR IGNORE INTO t_task_file_links (task_id, file_id) VALUES (?, ?)').run(taskId2, fileId);
|
|
219
|
+
// Both should create identical links
|
|
220
|
+
const links1 = testDb.prepare(`
|
|
221
|
+
SELECT task_id, file_id
|
|
222
|
+
FROM t_task_file_links
|
|
223
|
+
WHERE task_id = ?
|
|
224
|
+
`).all(taskId1);
|
|
225
|
+
const links2 = testDb.prepare(`
|
|
226
|
+
SELECT task_id, file_id
|
|
227
|
+
FROM t_task_file_links
|
|
228
|
+
WHERE task_id = ?
|
|
229
|
+
`).all(taskId2);
|
|
230
|
+
// Same file_id should be used
|
|
231
|
+
assert.strictEqual(links1[0].file_id, links2[0].file_id, 'Should use same file ID');
|
|
232
|
+
});
|
|
233
|
+
console.log('\n✅ All backward compatibility tests passed!\n');
|
|
234
|
+
});
|
|
235
|
+
//# sourceMappingURL=tasks.link-file-backward-compat.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.link-file-backward-compat.test.js","sourceRoot":"","sources":["../../src/tests/tasks.link-file-backward-compat.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGnE;;GAEG;AACH,IAAI,MAAoB,CAAC;AAEzB;;GAEG;AACH,SAAS,kBAAkB;IACzB,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IACpC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAC/B,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACrB,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,EAAgB,EAAE,KAAa;IACrD,MAAM,OAAO,GAAG,gBAAgB,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IAC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