sqlew 4.1.0 → 4.1.2

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.
Files changed (132) hide show
  1. package/CHANGELOG.md +1830 -1805
  2. package/dist/database/initialization/schema-version.js +1 -1
  3. package/dist/database/initialization/schema-version.js.map +1 -1
  4. package/dist/database/migrations/v4/20251126000000_v4_bootstrap.js +27 -27
  5. package/dist/database/migrations/v4/20251126000000_v4_bootstrap.js.map +1 -1
  6. package/dist/database/migrations/v4/20251126000001_v4_migrate_data.js +33 -33
  7. package/dist/database/migrations/v4/20251126000001_v4_migrate_data.js.map +1 -1
  8. package/dist/database/migrations/v4/20251127000000_add_rejected_status.js +7 -7
  9. package/dist/database/migrations/v4/20251127000000_add_rejected_status.js.map +1 -1
  10. package/dist/database/migrations/v4/20251127000001_update_task_move_help.js +11 -11
  11. package/dist/database/migrations/v4/20251127000001_update_task_move_help.js.map +1 -1
  12. package/dist/database/migrations/v4/20251127000002_v4_seed_help_system.js +10 -10
  13. package/dist/database/migrations/v4/20251127000002_v4_seed_help_system.js.map +1 -1
  14. package/dist/database/migrations/v4/20251127000003_add_task_notes_column.js +7 -7
  15. package/dist/database/migrations/v4/20251127000003_add_task_notes_column.js.map +1 -1
  16. package/dist/database/migrations/v4/20251128000000_drop_all_views.js +8 -8
  17. package/dist/database/migrations/v4/20251128000000_drop_all_views.js.map +1 -1
  18. package/dist/database/migrations/v4/20251225000000_v4_seed_missing_help_data.d.ts +14 -0
  19. package/dist/database/migrations/v4/20251225000000_v4_seed_missing_help_data.d.ts.map +1 -0
  20. package/dist/database/migrations/v4/20251225000000_v4_seed_missing_help_data.js +201 -0
  21. package/dist/database/migrations/v4/20251225000000_v4_seed_missing_help_data.js.map +1 -0
  22. package/dist/database/migrations/v4/20251225000001_v4_fix_help_params.d.ts +12 -0
  23. package/dist/database/migrations/v4/20251225000001_v4_fix_help_params.d.ts.map +1 -0
  24. package/dist/database/migrations/v4/20251225000001_v4_fix_help_params.js +61 -0
  25. package/dist/database/migrations/v4/20251225000001_v4_fix_help_params.js.map +1 -0
  26. package/dist/server/setup.d.ts.map +1 -1
  27. package/dist/server/setup.js +28 -6
  28. package/dist/server/setup.js.map +1 -1
  29. package/dist/tests/database/sql-dump/table-ordering.test.js +6 -1
  30. package/dist/tests/database/sql-dump/table-ordering.test.js.map +1 -1
  31. package/dist/tests/docker/native/constraint-operations.test.js +74 -137
  32. package/dist/tests/docker/native/constraint-operations.test.js.map +1 -1
  33. package/dist/tests/docker/native/decision-operations.test.js +52 -40
  34. package/dist/tests/docker/native/decision-operations.test.js.map +1 -1
  35. package/dist/tests/docker/native/help-system.test.d.ts +3 -2
  36. package/dist/tests/docker/native/help-system.test.d.ts.map +1 -1
  37. package/dist/tests/docker/native/help-system.test.js +90 -80
  38. package/dist/tests/docker/native/help-system.test.js.map +1 -1
  39. package/dist/tests/docker/native/suggest-tool.test.d.ts +2 -2
  40. package/dist/tests/docker/native/suggest-tool.test.js +130 -63
  41. package/dist/tests/docker/native/suggest-tool.test.js.map +1 -1
  42. package/dist/tests/docker/native/task-operations.test.js +9 -19
  43. package/dist/tests/docker/native/task-operations.test.js.map +1 -1
  44. package/dist/tests/docker/native/test-harness.d.ts.map +1 -1
  45. package/dist/tests/docker/native/test-harness.js +6 -5
  46. package/dist/tests/docker/native/test-harness.js.map +1 -1
  47. package/dist/tests/feature/decision/batch-validation-comprehensive.test.js +7 -8
  48. package/dist/tests/feature/decision/batch-validation-comprehensive.test.js.map +1 -1
  49. package/dist/tests/feature/decision/context-modular.test.js +1 -3
  50. package/dist/tests/feature/decision/context-modular.test.js.map +1 -1
  51. package/dist/tests/feature/help/help-system.test.d.ts +1 -13
  52. package/dist/tests/feature/help/help-system.test.d.ts.map +1 -1
  53. package/dist/tests/feature/help/help-system.test.js +107 -331
  54. package/dist/tests/feature/help/help-system.test.js.map +1 -1
  55. package/dist/tests/feature/task/auto-pruning-decision-link.test.js +2 -4
  56. package/dist/tests/feature/task/auto-pruning-decision-link.test.js.map +1 -1
  57. package/dist/tests/integration/all-features.standalone.js +1 -3
  58. package/dist/tests/integration/all-features.standalone.js.map +1 -1
  59. package/dist/tests/migrations/test-all-versions-real.js +2 -4
  60. package/dist/tests/migrations/test-all-versions-real.js.map +1 -1
  61. package/dist/tests/migrations/test-all-versions.js +3 -7
  62. package/dist/tests/migrations/test-all-versions.js.map +1 -1
  63. package/dist/tests/unit/universal-knex.test.js +3 -0
  64. package/dist/tests/unit/universal-knex.test.js.map +1 -1
  65. package/dist/tests/unit/utils/config-loader.test.js +130 -191
  66. package/dist/tests/unit/utils/config-loader.test.js.map +1 -1
  67. package/dist/tests/unit/utils/project-detector.test.js +24 -0
  68. package/dist/tests/unit/utils/project-detector.test.js.map +1 -1
  69. package/dist/tests/unit/validation/parameter-validation.test.js +2 -2
  70. package/dist/tests/unit/validation/parameter-validation.test.js.map +1 -1
  71. package/dist/tests/unit/validation/policy-validation.test.js +1 -3
  72. package/dist/tests/unit/validation/policy-validation.test.js.map +1 -1
  73. package/dist/tools/files/help/example.js +8 -8
  74. package/dist/tools/files/help/example.js.map +1 -1
  75. package/dist/tools/files/help/help.js +4 -4
  76. package/dist/tools/files/help/help.js.map +1 -1
  77. package/dist/tools/files/internal/validation.d.ts.map +1 -1
  78. package/dist/tools/files/internal/validation.js +1 -2
  79. package/dist/tools/files/internal/validation.js.map +1 -1
  80. package/dist/tools/help-queries.d.ts.map +1 -1
  81. package/dist/tools/help-queries.js +57 -27
  82. package/dist/tools/help-queries.js.map +1 -1
  83. package/dist/tools/suggest/actions/by-tags.d.ts.map +1 -1
  84. package/dist/tools/suggest/actions/by-tags.js +3 -1
  85. package/dist/tools/suggest/actions/by-tags.js.map +1 -1
  86. package/dist/tools/suggest/help/constraint-help.js +2 -2
  87. package/dist/tools/suggest/help/constraint-help.js.map +1 -1
  88. package/dist/tools/tasks/help/example.d.ts.map +1 -1
  89. package/dist/tools/tasks/help/example.js +10 -0
  90. package/dist/tools/tasks/help/example.js.map +1 -1
  91. package/dist/tools/tasks/help/help.d.ts.map +1 -1
  92. package/dist/tools/tasks/help/help.js +10 -0
  93. package/dist/tools/tasks/help/help.js.map +1 -1
  94. package/dist/tools/use_case/actions/search.js +5 -5
  95. package/dist/tools/use_case/actions/search.js.map +1 -1
  96. package/dist/tools/use_case/help/example.d.ts +2 -7
  97. package/dist/tools/use_case/help/example.d.ts.map +1 -1
  98. package/dist/tools/use_case/help/example.js +24 -37
  99. package/dist/tools/use_case/help/example.js.map +1 -1
  100. package/dist/tools/use_case/help/help.js +1 -1
  101. package/dist/tools/use_case/help/help.js.map +1 -1
  102. package/dist/types.d.ts +2 -2
  103. package/dist/types.d.ts.map +1 -1
  104. package/dist/utils/action-specs/decision-specs.d.ts.map +1 -1
  105. package/dist/utils/action-specs/decision-specs.js +2 -3
  106. package/dist/utils/action-specs/decision-specs.js.map +1 -1
  107. package/dist/utils/action-specs/file-specs.d.ts.map +1 -1
  108. package/dist/utils/action-specs/file-specs.js +4 -6
  109. package/dist/utils/action-specs/file-specs.js.map +1 -1
  110. package/dist/utils/db-aggregations.d.ts.map +1 -1
  111. package/dist/utils/db-aggregations.js +44 -1
  112. package/dist/utils/db-aggregations.js.map +1 -1
  113. package/dist/utils/project-detector.js +21 -6
  114. package/dist/utils/project-detector.js.map +1 -1
  115. package/dist/utils/suggestion-scorer.d.ts.map +1 -1
  116. package/dist/utils/suggestion-scorer.js +5 -0
  117. package/dist/utils/suggestion-scorer.js.map +1 -1
  118. package/dist/utils/universal-knex.js +3 -3
  119. package/dist/utils/universal-knex.js.map +1 -1
  120. package/package.json +87 -123
  121. package/dist/tests/feature/vcs/git-aware-completion.test.d.ts +0 -6
  122. package/dist/tests/feature/vcs/git-aware-completion.test.d.ts.map +0 -1
  123. package/dist/tests/feature/vcs/git-aware-completion.test.js +0 -197
  124. package/dist/tests/feature/vcs/git-aware-completion.test.js.map +0 -1
  125. package/dist/tests/feature/vcs/two-step-git-completion.test.d.ts +0 -6
  126. package/dist/tests/feature/vcs/two-step-git-completion.test.d.ts.map +0 -1
  127. package/dist/tests/feature/vcs/two-step-git-completion.test.js +0 -305
  128. package/dist/tests/feature/vcs/two-step-git-completion.test.js.map +0 -1
  129. package/dist/tests/feature/vcs/vcs-staging.test.d.ts +0 -6
  130. package/dist/tests/feature/vcs/vcs-staging.test.d.ts.map +0 -1
  131. package/dist/tests/feature/vcs/vcs-staging.test.js +0 -142
  132. package/dist/tests/feature/vcs/vcs-staging.test.js.map +0 -1
@@ -1,197 +0,0 @@
1
- /**
2
- * Git-Aware Auto-Complete Tests (v3.4.0)
3
- * Tests for detectAndCompleteReviewedTasks function
4
- */
5
- import { describe, it, before, after } from 'node:test';
6
- import assert from 'node:assert';
7
- import { mkdirSync, rmSync, existsSync } from 'fs';
8
- import { join } from 'path';
9
- import { execSync } from 'child_process';
10
- import { initializeDatabase, closeDatabase, setConfigValue } from '../../../database.js';
11
- import { detectAndCompleteReviewedTasks } from '../../../utils/task-stale-detection.js';
12
- import { ProjectContext } from '../../../utils/project-context.js';
13
- const TEST_DIR = join(process.cwd(), 'test-tracking');
14
- // Helper to clean up test directory
15
- function cleanupTestDir() {
16
- if (existsSync(TEST_DIR)) {
17
- rmSync(TEST_DIR, { recursive: true, force: true });
18
- }
19
- }
20
- // Helper to get current git HEAD hash
21
- function getGitHead() {
22
- try {
23
- return execSync('git rev-parse HEAD', { encoding: 'utf-8' }).trim();
24
- }
25
- catch {
26
- return null;
27
- }
28
- }
29
- // Helper to reset git to a specific commit
30
- function resetGitTo(commitHash) {
31
- try {
32
- execSync(`git reset --hard ${commitHash}`, { stdio: 'ignore' });
33
- }
34
- catch {
35
- // Ignore errors (e.g., if reset fails)
36
- }
37
- }
38
- describe('Git-Aware Auto-Complete', () => {
39
- let db;
40
- let initialGitHead = null;
41
- before(async () => {
42
- // Record initial git HEAD to reset after tests (cleanup test commits)
43
- initialGitHead = getGitHead();
44
- // Clean up before tests
45
- cleanupTestDir();
46
- // Configure git user for test commits (required if not set globally)
47
- try {
48
- execSync('git config user.email 2>/dev/null || git config user.email "test@example.com"', { stdio: 'ignore' });
49
- execSync('git config user.name 2>/dev/null || git config user.name "Test User"', { stdio: 'ignore' });
50
- }
51
- catch {
52
- // Ignore - may already be configured
53
- }
54
- // Create test database (in-memory)
55
- db = await initializeDatabase({
56
- databaseType: 'sqlite',
57
- connection: {
58
- filename: ':memory:'
59
- }
60
- });
61
- const knex = db.getKnex();
62
- // Initialize ProjectContext (required for v3.7.0+ multi-project support)
63
- const projectContext = ProjectContext.getInstance();
64
- await projectContext.ensureProject(knex, 'test-git-aware-completion', 'config', {
65
- projectRootPath: process.cwd(),
66
- });
67
- // Add test config for git auto-complete (v4.0: in-memory config)
68
- await setConfigValue(db, 'git_auto_complete_enabled', '1');
69
- await setConfigValue(db, 'require_all_files_committed', '1');
70
- // Create test directory
71
- if (!existsSync(TEST_DIR)) {
72
- mkdirSync(TEST_DIR, { recursive: true });
73
- }
74
- });
75
- after(async () => {
76
- // Close database
77
- if (db) {
78
- await closeDatabase();
79
- }
80
- // Clean up test directory
81
- cleanupTestDir();
82
- // Reset git to initial HEAD to drop test commits
83
- if (initialGitHead) {
84
- resetGitTo(initialGitHead);
85
- }
86
- });
87
- it('should auto-complete task when all watched files are committed', async () => {
88
- const knex = db.getKnex();
89
- const projectId = ProjectContext.getInstance().getProjectId();
90
- // 1. Create a task in waiting_review status with watched files
91
- const statusRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
92
- const [taskId] = await knex('v4_tasks').insert({
93
- title: 'Test git-aware task',
94
- status_id: statusRow.id,
95
- priority: 2,
96
- project_id: projectId,
97
- created_ts: Math.floor(Date.now() / 1000),
98
- updated_ts: Math.floor(Date.now() / 1000)
99
- });
100
- // 2. Add watched files
101
- const [file1Id] = await knex('v4_files').insert({ path: 'test-tracking/file1.ts' });
102
- const [file2Id] = await knex('v4_files').insert({ path: 'test-tracking/file2.ts' });
103
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: file1Id, project_id: projectId, linked_ts: Math.floor(Date.now() / 1000) });
104
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: file2Id, project_id: projectId, linked_ts: Math.floor(Date.now() / 1000) });
105
- // 3. Commit the files to git
106
- execSync(`touch ${TEST_DIR}/file1.ts`);
107
- execSync(`touch ${TEST_DIR}/file2.ts`);
108
- execSync(`git add ${TEST_DIR}/file1.ts ${TEST_DIR}/file2.ts`);
109
- execSync(`git commit -m "Test commit for git-aware completion"`);
110
- // 4. Run git-aware auto-complete
111
- const completedCount = await detectAndCompleteReviewedTasks(db);
112
- // 5. Verify task was auto-completed
113
- assert.strictEqual(completedCount, 1, 'Should auto-complete 1 task');
114
- const task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
115
- const doneStatus = await knex('v4_task_statuses').where({ name: 'done' }).first('id');
116
- assert.strictEqual(task.status_id, doneStatus.id, 'Task should be in done status');
117
- });
118
- it('should NOT auto-complete task when only some files are committed', async () => {
119
- const knex = db.getKnex();
120
- const projectId = ProjectContext.getInstance().getProjectId();
121
- // 1. Create a task in waiting_review
122
- const statusRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
123
- const [taskId] = await knex('v4_tasks').insert({
124
- title: 'Partial commit task',
125
- status_id: statusRow.id,
126
- priority: 2,
127
- project_id: projectId,
128
- created_ts: Math.floor(Date.now() / 1000),
129
- updated_ts: Math.floor(Date.now() / 1000)
130
- });
131
- // 2. Add watched files
132
- const [file3Id] = await knex('v4_files').insert({ path: 'test-tracking/file3.ts' });
133
- const [file4Id] = await knex('v4_files').insert({ path: 'test-tracking/file4.ts' });
134
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: file3Id, project_id: projectId, linked_ts: Math.floor(Date.now() / 1000) });
135
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: file4Id, project_id: projectId, linked_ts: Math.floor(Date.now() / 1000) });
136
- // 3. Commit only ONE file
137
- execSync(`touch ${TEST_DIR}/file3.ts`);
138
- execSync(`git add ${TEST_DIR}/file3.ts`);
139
- execSync(`git commit -m "Partial commit - only file3"`);
140
- // 4. Run git-aware auto-complete
141
- const completedCount = await detectAndCompleteReviewedTasks(db);
142
- // 5. Verify task was NOT auto-completed (still in waiting_review)
143
- assert.strictEqual(completedCount, 0, 'Should NOT auto-complete task with partial commits');
144
- const task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
145
- const waitingReviewStatus = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
146
- assert.strictEqual(task.status_id, waitingReviewStatus.id, 'Task should still be in waiting_review status');
147
- });
148
- it('should skip tasks with no watched files', async () => {
149
- const knex = db.getKnex();
150
- const projectId = ProjectContext.getInstance().getProjectId();
151
- // 1. Create a task in waiting_review with NO watched files
152
- const statusRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
153
- const [taskId] = await knex('v4_tasks').insert({
154
- title: 'No watched files task',
155
- status_id: statusRow.id,
156
- priority: 2,
157
- project_id: projectId,
158
- created_ts: Math.floor(Date.now() / 1000),
159
- updated_ts: Math.floor(Date.now() / 1000)
160
- });
161
- // 2. Run git-aware auto-complete
162
- const completedCount = await detectAndCompleteReviewedTasks(db);
163
- // 3. Verify no tasks were auto-completed
164
- assert.strictEqual(completedCount, 0, 'Should skip tasks with no watched files');
165
- const task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
166
- const waitingReviewStatus = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
167
- assert.strictEqual(task.status_id, waitingReviewStatus.id, 'Task should still be in waiting_review status');
168
- });
169
- it('should respect git_auto_complete_enabled config', async () => {
170
- const knex = db.getKnex();
171
- const projectId = ProjectContext.getInstance().getProjectId();
172
- // 1. Disable git auto-complete (v4.0: in-memory config)
173
- await setConfigValue(db, 'git_auto_complete_enabled', '0');
174
- // 2. Create a task with all files committed
175
- const statusRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
176
- const [taskId] = await knex('v4_tasks').insert({
177
- title: 'Config disabled task',
178
- status_id: statusRow.id,
179
- priority: 2,
180
- project_id: projectId,
181
- created_ts: Math.floor(Date.now() / 1000),
182
- updated_ts: Math.floor(Date.now() / 1000)
183
- });
184
- const [file5Id] = await knex('v4_files').insert({ path: 'test-tracking/file5.ts' });
185
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: file5Id, project_id: projectId, linked_ts: Math.floor(Date.now() / 1000) });
186
- execSync(`touch ${TEST_DIR}/file5.ts`);
187
- execSync(`git add ${TEST_DIR}/file5.ts`);
188
- execSync(`git commit -m "Test with config disabled"`);
189
- // 3. Run git-aware auto-complete (should skip due to config)
190
- const completedCount = await detectAndCompleteReviewedTasks(db);
191
- // 4. Verify no tasks were auto-completed
192
- assert.strictEqual(completedCount, 0, 'Should respect disabled config');
193
- // Re-enable for other tests (v4.0: in-memory config)
194
- await setConfigValue(db, 'git_auto_complete_enabled', '1');
195
- });
196
- });
197
- //# sourceMappingURL=git-aware-completion.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-aware-completion.test.js","sourceRoot":"","sources":["../../../../src/tests/feature/vcs/git-aware-completion.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAa,MAAM,WAAW,CAAC;AACnE,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEzF,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAA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YACrB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;YACzC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;SAC1C,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC,CAAC;QACpF,MAAM,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAEhJ,QAAQ,CAAC,SAAS,QAAQ,WAAW,CAAC,CAAC;QACvC,QAAQ,CAAC,WAAW,QAAQ,WAAW,CAAC,CAAC;QACzC,QAAQ,CAAC,2CAA2C,CAAC,CAAC;QAEtD,6DAA6D;QAC7D,MAAM,cAAc,GAAG,MAAM,8BAA8B,CAAC,EAAE,CAAC,CAAC;QAEhE,yCAAyC;QACzC,MAAM,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,EAAE,gCAAgC,CAAC,CAAC;QAExE,qDAAqD;QACrD,MAAM,cAAc,CAAC,EAAE,EAAE,2BAA2B,EAAE,GAAG,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Integration Tests - Two-Step Git-Aware Task Workflow (v3.5.2)
3
- * Tests the complete workflow: staging → done, commit → archived
4
- */
5
- export {};
6
- //# sourceMappingURL=two-step-git-completion.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"two-step-git-completion.test.d.ts","sourceRoot":"","sources":["../../../../src/tests/feature/vcs/two-step-git-completion.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,305 +0,0 @@
1
- /**
2
- * Integration Tests - Two-Step Git-Aware Task Workflow (v3.5.2)
3
- * Tests the complete workflow: staging → done, commit → archived
4
- */
5
- import { describe, it, before, after, beforeEach } from 'node:test';
6
- import assert from 'node:assert';
7
- import { existsSync, mkdirSync, writeFileSync, rmSync } from 'fs';
8
- import { join } from 'path';
9
- import { execSync } from 'child_process';
10
- import { initializeDatabase, closeDatabase, setConfigValue } from '../../../database.js';
11
- import { detectAndCompleteOnStaging, detectAndArchiveOnCommit } from '../../../utils/task-stale-detection.js';
12
- const TEST_DIR = join(process.cwd(), 'test-two-step-git');
13
- // Helper to clean up test directory
14
- function cleanupTestDir() {
15
- if (existsSync(TEST_DIR)) {
16
- rmSync(TEST_DIR, { recursive: true, force: true });
17
- }
18
- }
19
- describe('Two-Step Git-Aware Workflow Integration Tests', () => {
20
- let db;
21
- before(async () => {
22
- // Clean up before tests
23
- cleanupTestDir();
24
- // Create test database (in-memory)
25
- db = await initializeDatabase({
26
- databaseType: 'sqlite',
27
- connection: {
28
- filename: ':memory:'
29
- }
30
- });
31
- // Add test config for two-step workflow (v4.0: in-memory config)
32
- await setConfigValue(db, 'git_auto_complete_on_stage', '1');
33
- await setConfigValue(db, 'git_auto_archive_on_commit', '1');
34
- await setConfigValue(db, 'require_all_files_staged', '1');
35
- await setConfigValue(db, 'require_all_files_committed_for_archive', '1');
36
- // Create test git repository
37
- mkdirSync(TEST_DIR, { recursive: true });
38
- execSync('git init', { cwd: TEST_DIR });
39
- execSync('git config user.email "test@example.com"', { cwd: TEST_DIR });
40
- execSync('git config user.name "Test User"', { cwd: TEST_DIR });
41
- // Change to test directory for git operations
42
- process.chdir(TEST_DIR);
43
- });
44
- after(async () => {
45
- // Close database
46
- if (db) {
47
- await closeDatabase();
48
- }
49
- // Go back to original directory
50
- process.chdir(join(TEST_DIR, '..'));
51
- // Clean up test directory
52
- cleanupTestDir();
53
- });
54
- describe('Step 1: Staging → Done', () => {
55
- beforeEach(async () => {
56
- // Clean up tasks and file links from previous tests
57
- const knex = db.getKnex();
58
- await knex('v4_task_file_links').delete();
59
- await knex('v4_task_details').delete();
60
- await knex('v4_tasks').delete();
61
- });
62
- it('should transition task from waiting_review to done when all files staged', async () => {
63
- const knex = db.getKnex();
64
- // 1. Create task in waiting_review with watched file
65
- const statusRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
66
- const [taskId] = await knex('v4_tasks').insert({
67
- status_id: statusRow.id,
68
- priority: 2,
69
- created_ts: Math.floor(Date.now() / 1000),
70
- updated_ts: Math.floor(Date.now() / 1000)
71
- });
72
- await knex('v4_task_details').insert({ task_id: taskId, title: 'Test task' });
73
- // 2. Add watched file
74
- writeFileSync('test-file1.ts', '// Test content');
75
- const [fileId] = await knex('v4_files').insert({ path: 'test-file1.ts' });
76
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: fileId, link_type: 'watch' });
77
- // 3. Stage the file
78
- execSync('git add test-file1.ts');
79
- // 4. Run staging detection
80
- const completedCount = await detectAndCompleteOnStaging(db);
81
- // 5. Verify task transitioned to done
82
- assert.strictEqual(completedCount, 1, 'Should complete 1 task');
83
- const task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
84
- const doneStatusRow = await knex('v4_task_statuses').where({ name: 'done' }).first('id');
85
- assert.strictEqual(task.status_id, doneStatusRow.id, 'Task should be in done status');
86
- });
87
- it('should NOT transition when only some files are staged', async () => {
88
- const knex = db.getKnex();
89
- // 1. Create task with 2 watched files
90
- const statusRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
91
- const [taskId] = await knex('v4_tasks').insert({
92
- status_id: statusRow.id,
93
- priority: 2,
94
- created_ts: Math.floor(Date.now() / 1000),
95
- updated_ts: Math.floor(Date.now() / 1000)
96
- });
97
- await knex('v4_task_details').insert({ task_id: taskId, title: 'Test task' });
98
- // 2. Add 2 watched files
99
- writeFileSync('test-file2.ts', '// Test content 2');
100
- writeFileSync('test-file3.ts', '// Test content 3');
101
- const [file2Id] = await knex('v4_files').insert({ path: 'test-file2.ts' });
102
- const [file3Id] = await knex('v4_files').insert({ path: 'test-file3.ts' });
103
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: file2Id, link_type: 'watch' });
104
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: file3Id, link_type: 'watch' });
105
- // 3. Stage only ONE file
106
- execSync('git add test-file2.ts');
107
- // 4. Run staging detection
108
- const completedCount = await detectAndCompleteOnStaging(db);
109
- // 5. Verify task is STILL in waiting_review
110
- assert.strictEqual(completedCount, 0, 'Should NOT complete any tasks');
111
- const task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
112
- assert.strictEqual(task.status_id, statusRow.id, 'Task should still be in waiting_review');
113
- });
114
- });
115
- describe('Step 2: Commit → Archived', () => {
116
- beforeEach(async () => {
117
- // Clean up tasks and file links from previous tests
118
- const knex = db.getKnex();
119
- await knex('v4_task_file_links').delete();
120
- await knex('v4_task_details').delete();
121
- await knex('v4_tasks').delete();
122
- });
123
- it('should transition task from done to archived when all files committed', async () => {
124
- const knex = db.getKnex();
125
- // 1. Commit previously staged files
126
- execSync('git commit -m "Test commit 1"');
127
- // 2. Create task in done status with watched file
128
- const doneStatusRow = await knex('v4_task_statuses').where({ name: 'done' }).first('id');
129
- const [taskId] = await knex('v4_tasks').insert({
130
- status_id: doneStatusRow.id,
131
- priority: 2,
132
- created_ts: Math.floor(Date.now() / 1000),
133
- updated_ts: Math.floor(Date.now() / 1000)
134
- });
135
- await knex('v4_task_details').insert({ task_id: taskId, title: 'Test task' });
136
- // 3. Add watched file and commit it
137
- writeFileSync('test-file4.ts', '// Test content 4');
138
- const [fileId] = await knex('v4_files').insert({ path: 'test-file4.ts' });
139
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: fileId, link_type: 'watch' });
140
- execSync('git add test-file4.ts');
141
- execSync('git commit -m "Test commit 2"');
142
- // 4. Run archive detection
143
- const archivedCount = await detectAndArchiveOnCommit(db);
144
- // 5. Verify task transitioned to archived
145
- assert.strictEqual(archivedCount, 1, 'Should archive 1 task');
146
- const task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
147
- const archivedStatusRow = await knex('v4_task_statuses').where({ name: 'archived' }).first('id');
148
- assert.strictEqual(task.status_id, archivedStatusRow.id, 'Task should be in archived status');
149
- });
150
- it('should NOT archive when files are not committed (only staged)', async () => {
151
- const knex = db.getKnex();
152
- // 1. Create task in done status
153
- const doneStatusRow = await knex('v4_task_statuses').where({ name: 'done' }).first('id');
154
- const [taskId] = await knex('v4_tasks').insert({
155
- status_id: doneStatusRow.id,
156
- priority: 2,
157
- created_ts: Math.floor(Date.now() / 1000),
158
- updated_ts: Math.floor(Date.now() / 1000)
159
- });
160
- await knex('v4_task_details').insert({ task_id: taskId, title: 'Test task' });
161
- // 2. Add watched file and ONLY stage it (don't commit)
162
- writeFileSync('test-file5.ts', '// Test content 5');
163
- const [fileId] = await knex('v4_files').insert({ path: 'test-file5.ts' });
164
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: fileId, link_type: 'watch' });
165
- execSync('git add test-file5.ts');
166
- // 3. Run archive detection
167
- const archivedCount = await detectAndArchiveOnCommit(db);
168
- // 4. Verify task is STILL in done
169
- assert.strictEqual(archivedCount, 0, 'Should NOT archive any tasks');
170
- const task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
171
- assert.strictEqual(task.status_id, doneStatusRow.id, 'Task should still be in done status');
172
- });
173
- });
174
- describe('Full Two-Step Workflow', () => {
175
- beforeEach(async () => {
176
- // Clean up tasks and file links from previous tests
177
- const knex = db.getKnex();
178
- await knex('v4_task_file_links').delete();
179
- await knex('v4_task_details').delete();
180
- await knex('v4_tasks').delete();
181
- });
182
- it('should complete full cycle: waiting_review → done → archived', async () => {
183
- const knex = db.getKnex();
184
- // 1. Create task in waiting_review
185
- const waitingReviewRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
186
- const [taskId] = await knex('v4_tasks').insert({
187
- status_id: waitingReviewRow.id,
188
- priority: 2,
189
- created_ts: Math.floor(Date.now() / 1000),
190
- updated_ts: Math.floor(Date.now() / 1000)
191
- });
192
- await knex('v4_task_details').insert({ task_id: taskId, title: 'Test task' });
193
- // 2. Add watched file
194
- writeFileSync('test-full-cycle.ts', '// Full cycle test');
195
- const [fileId] = await knex('v4_files').insert({ path: 'test-full-cycle.ts' });
196
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: fileId, link_type: 'watch' });
197
- // 3. STEP 1: Stage file → should transition to done
198
- execSync('git add test-full-cycle.ts');
199
- const stagingCompleted = await detectAndCompleteOnStaging(db);
200
- assert.strictEqual(stagingCompleted, 1);
201
- let task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
202
- const doneStatusRow = await knex('v4_task_statuses').where({ name: 'done' }).first('id');
203
- assert.strictEqual(task.status_id, doneStatusRow.id, 'Task should be done after staging');
204
- // 4. STEP 2: Commit file → should transition to archived
205
- execSync('git commit -m "Full cycle test"');
206
- const commitArchived = await detectAndArchiveOnCommit(db);
207
- assert.strictEqual(commitArchived, 1);
208
- task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
209
- const archivedStatusRow = await knex('v4_task_statuses').where({ name: 'archived' }).first('id');
210
- assert.strictEqual(task.status_id, archivedStatusRow.id, 'Task should be archived after commit');
211
- });
212
- it('should handle rapid staging + commit (git commit -a)', async () => {
213
- const knex = db.getKnex();
214
- // 1. Create task
215
- const waitingReviewRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
216
- const [taskId] = await knex('v4_tasks').insert({
217
- status_id: waitingReviewRow.id,
218
- priority: 2,
219
- created_ts: Math.floor(Date.now() / 1000),
220
- updated_ts: Math.floor(Date.now() / 1000)
221
- });
222
- await knex('v4_task_details').insert({ task_id: taskId, title: 'Test task' });
223
- // 2. Add watched file
224
- writeFileSync('test-rapid.ts', '// Rapid test');
225
- const [fileId] = await knex('v4_files').insert({ path: 'test-rapid.ts' });
226
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: fileId, link_type: 'watch' });
227
- // 3. Stage and commit immediately
228
- execSync('git add test-rapid.ts && git commit -m "Rapid test"');
229
- // 4. Run both detections - should go straight to archived
230
- const stagingCompleted = await detectAndCompleteOnStaging(db);
231
- // Staging won't find it (already committed)
232
- assert.strictEqual(stagingCompleted, 0);
233
- // But commit detection should complete it to done first
234
- // This is handled by detectAndCompleteReviewedTasks in real workflow
235
- // For this test, manually transition to done then test archiving
236
- const doneStatusRow = await knex('v4_task_statuses').where({ name: 'done' }).first('id');
237
- await knex('v4_tasks').where({ id: taskId }).update({ status_id: doneStatusRow.id });
238
- const commitArchived = await detectAndArchiveOnCommit(db);
239
- assert.strictEqual(commitArchived, 1);
240
- const task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
241
- const archivedStatusRow = await knex('v4_task_statuses').where({ name: 'archived' }).first('id');
242
- assert.strictEqual(task.status_id, archivedStatusRow.id);
243
- });
244
- });
245
- describe('Configuration Tests', () => {
246
- beforeEach(async () => {
247
- // Clean up tasks and file links from previous tests
248
- const knex = db.getKnex();
249
- await knex('v4_task_file_links').delete();
250
- await knex('v4_task_details').delete();
251
- await knex('v4_tasks').delete();
252
- });
253
- it('should respect require_all_files_staged config', async () => {
254
- const knex = db.getKnex();
255
- // Set to require all files (v4.0: in-memory config)
256
- await setConfigValue(db, 'require_all_files_staged', '1');
257
- // Create task with 2 files
258
- const statusRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
259
- const [taskId] = await knex('v4_tasks').insert({
260
- status_id: statusRow.id,
261
- priority: 2,
262
- created_ts: Math.floor(Date.now() / 1000),
263
- updated_ts: Math.floor(Date.now() / 1000)
264
- });
265
- await knex('v4_task_details').insert({ task_id: taskId, title: 'Test task' });
266
- writeFileSync('config-test1.ts', '// Config test 1');
267
- writeFileSync('config-test2.ts', '// Config test 2');
268
- const [file1Id] = await knex('v4_files').insert({ path: 'config-test1.ts' });
269
- const [file2Id] = await knex('v4_files').insert({ path: 'config-test2.ts' });
270
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: file1Id, link_type: 'watch' });
271
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: file2Id, link_type: 'watch' });
272
- // Stage only one file
273
- execSync('git add config-test1.ts');
274
- // Should NOT complete (require ALL)
275
- const completed = await detectAndCompleteOnStaging(db);
276
- assert.strictEqual(completed, 0);
277
- const task = await knex('v4_tasks').where({ id: taskId }).first('status_id');
278
- assert.strictEqual(task.status_id, statusRow.id, 'Task should still be waiting_review');
279
- });
280
- it('should respect git_auto_complete_on_stage disabled', async () => {
281
- const knex = db.getKnex();
282
- // Disable staging auto-complete (v4.0: in-memory config)
283
- await setConfigValue(db, 'git_auto_complete_on_stage', '0');
284
- // Create and stage task
285
- const statusRow = await knex('v4_task_statuses').where({ name: 'waiting_review' }).first('id');
286
- const [taskId] = await knex('v4_tasks').insert({
287
- status_id: statusRow.id,
288
- priority: 2,
289
- created_ts: Math.floor(Date.now() / 1000),
290
- updated_ts: Math.floor(Date.now() / 1000)
291
- });
292
- await knex('v4_task_details').insert({ task_id: taskId, title: 'Test task' });
293
- writeFileSync('disabled-test.ts', '// Disabled test');
294
- const [fileId] = await knex('v4_files').insert({ path: 'disabled-test.ts' });
295
- await knex('v4_task_file_links').insert({ task_id: taskId, file_id: fileId, link_type: 'watch' });
296
- execSync('git add disabled-test.ts');
297
- // Should NOT complete (feature disabled)
298
- const completed = await detectAndCompleteOnStaging(db);
299
- assert.strictEqual(completed, 0);
300
- // Re-enable for other tests (v4.0: in-memory config)
301
- await setConfigValue(db, 'git_auto_complete_on_stage', '1');
302
- });
303
- });
304
- });
305
- //# sourceMappingURL=two-step-git-completion.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"two-step-git-completion.test.js","sourceRoot":"","sources":["../../../../src/tests/feature/vcs/two-step-git-completion.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,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,CAAC,CAAC,MAAM,CAAC;gBAC7C,SAAS,EAAE,SAAS,CAAC,EAAE;gBACvB,QAAQ,EAAE,CAAC;gBACX,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;gBACzC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;aAC1C,CAAC,CAAC;YAEH,MAAM,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;YAE9E,aAAa,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;YACtD,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;YAC7E,MAAM,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;YAElG,QAAQ,CAAC,0BAA0B,CAAC,CAAC;YAErC,yCAAyC;YACzC,MAAM,SAAS,GAAG,MAAM,0BAA0B,CAAC,EAAE,CAAC,CAAC;YACvD,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAEjC,qDAAqD;YACrD,MAAM,cAAc,CAAC,EAAE,EAAE,4BAA4B,EAAE,GAAG,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * VCS Staging Detection Tests (v3.5.2)
3
- * Tests for getStagedFiles() method across Git, Mercurial, and SVN adapters
4
- */
5
- export {};
6
- //# sourceMappingURL=vcs-staging.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vcs-staging.test.d.ts","sourceRoot":"","sources":["../../../../src/tests/feature/vcs/vcs-staging.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}