specweave 1.0.526 → 1.0.528
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/dist/plugins/specweave/lib/integrations/github/duplicate-detector.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/integrations/github/duplicate-detector.js +6 -1
- package/dist/plugins/specweave/lib/integrations/github/duplicate-detector.js.map +1 -1
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync-cli.js +6 -0
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync-cli.js.map +1 -1
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync.d.ts +1 -0
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync.d.ts.map +1 -1
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync.js +71 -29
- package/dist/plugins/specweave/lib/integrations/github/github-feature-sync.js.map +1 -1
- package/dist/plugins/specweave/lib/vendor/core/increment/active-increment-manager.d.ts +1 -1
- package/dist/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js +20 -5
- package/dist/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js.map +1 -1
- package/dist/src/cli/commands/auto-status.js +15 -1
- package/dist/src/cli/commands/auto-status.js.map +1 -1
- package/dist/src/cli/commands/auto.js +19 -1
- package/dist/src/cli/commands/auto.js.map +1 -1
- package/dist/src/cli/commands/cancel-auto.js +27 -1
- package/dist/src/cli/commands/cancel-auto.js.map +1 -1
- package/dist/src/core/auto/types.d.ts +1 -0
- package/dist/src/core/auto/types.d.ts.map +1 -1
- package/dist/src/core/auto/types.js.map +1 -1
- package/dist/src/core/increment/active-increment-manager.d.ts +1 -1
- package/dist/src/core/increment/active-increment-manager.d.ts.map +1 -1
- package/dist/src/core/increment/active-increment-manager.js +20 -5
- package/dist/src/core/increment/active-increment-manager.js.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +7 -1
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/dist/src/core/session/session-state-manager.d.ts +6 -0
- package/dist/src/core/session/session-state-manager.d.ts.map +1 -1
- package/dist/src/core/session/session-state-manager.js +19 -2
- package/dist/src/core/session/session-state-manager.js.map +1 -1
- package/dist/src/hooks/platform.d.ts +1 -22
- package/dist/src/hooks/platform.d.ts.map +1 -1
- package/dist/src/hooks/platform.js +2 -72
- package/dist/src/hooks/platform.js.map +1 -1
- package/dist/src/hooks/session-start.js +10 -3
- package/dist/src/hooks/session-start.js.map +1 -1
- package/dist/src/sync/external-issue-auto-creator.d.ts.map +1 -1
- package/dist/src/sync/external-issue-auto-creator.js +8 -0
- package/dist/src/sync/external-issue-auto-creator.js.map +1 -1
- package/dist/src/utils/file-lock.d.ts +23 -0
- package/dist/src/utils/file-lock.d.ts.map +1 -0
- package/dist/src/utils/file-lock.js +71 -0
- package/dist/src/utils/file-lock.js.map +1 -0
- package/dist/src/utils/lock-manager.d.ts.map +1 -1
- package/dist/src/utils/lock-manager.js +12 -10
- package/dist/src/utils/lock-manager.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/hooks/stop-auto-v5.sh +8 -2
- package/plugins/specweave/lib/integrations/github/duplicate-detector.js +1 -1
- package/plugins/specweave/lib/integrations/github/duplicate-detector.ts +6 -1
- package/plugins/specweave/lib/integrations/github/github-feature-sync-cli.js +6 -0
- package/plugins/specweave/lib/integrations/github/github-feature-sync-cli.ts +7 -0
- package/plugins/specweave/lib/integrations/github/github-feature-sync.js +55 -22
- package/plugins/specweave/lib/integrations/github/github-feature-sync.ts +82 -29
- package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.d.ts +1 -1
- package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js +20 -5
- package/plugins/specweave/lib/vendor/core/increment/active-increment-manager.js.map +1 -1
|
@@ -130,7 +130,45 @@ export class GitHubFeatureSync {
|
|
|
130
130
|
issuesCreated: number;
|
|
131
131
|
issuesUpdated: number;
|
|
132
132
|
userStoriesProcessed: number;
|
|
133
|
+
rateLimitSkipped?: boolean;
|
|
133
134
|
}> {
|
|
135
|
+
// FS-609: Rate limit pre-check — abort early if quota is low to prevent 403 errors
|
|
136
|
+
const RATE_LIMIT_THRESHOLD = 250;
|
|
137
|
+
try {
|
|
138
|
+
const rateLimit = await this.client.checkRateLimit();
|
|
139
|
+
if (rateLimit.remaining < RATE_LIMIT_THRESHOLD) {
|
|
140
|
+
console.log(`\n⚠️ GitHub API rate limit low: ${rateLimit.remaining}/${rateLimit.limit} remaining`);
|
|
141
|
+
console.log(` ⏭️ Skipping sync for ${featureId} — will retry after ${rateLimit.reset.toISOString()}`);
|
|
142
|
+
console.log(` 💡 Run /sw:progress-sync to retry when rate limit resets`);
|
|
143
|
+
return {
|
|
144
|
+
milestoneNumber: 0,
|
|
145
|
+
milestoneUrl: '',
|
|
146
|
+
issuesCreated: 0,
|
|
147
|
+
issuesUpdated: 0,
|
|
148
|
+
userStoriesProcessed: 0,
|
|
149
|
+
rateLimitSkipped: true,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
} catch (rateLimitError) {
|
|
153
|
+
// FS-609 edge case fix: fail-closed on network errors.
|
|
154
|
+
// If we can't reach the API to check rate limit, subsequent gh calls will also fail.
|
|
155
|
+
// Abort early instead of cascading failures.
|
|
156
|
+
const msg = rateLimitError instanceof Error ? rateLimitError.message : String(rateLimitError);
|
|
157
|
+
if (msg.includes('ENOTFOUND') || msg.includes('ETIMEDOUT') || msg.includes('ECONNREFUSED') || msg.includes('fetch failed')) {
|
|
158
|
+
console.log(`\n⚠️ GitHub API unreachable: ${msg}`);
|
|
159
|
+
console.log(` ⏭️ Skipping sync for ${featureId} — network appears down`);
|
|
160
|
+
return {
|
|
161
|
+
milestoneNumber: 0,
|
|
162
|
+
milestoneUrl: '',
|
|
163
|
+
issuesCreated: 0,
|
|
164
|
+
issuesUpdated: 0,
|
|
165
|
+
userStoriesProcessed: 0,
|
|
166
|
+
rateLimitSkipped: true,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
// Non-network errors (e.g., JSON parse failure) — proceed with sync (fail-open)
|
|
170
|
+
}
|
|
171
|
+
|
|
134
172
|
// SYNC LOCK: Cross-process file lock prevents concurrent syncs of the same feature+repo
|
|
135
173
|
// Root cause: Two sync paths (task completion + status change) can fire simultaneously
|
|
136
174
|
// Result: Duplicate GitHub comments due to race condition
|
|
@@ -1053,16 +1091,22 @@ export class GitHubFeatureSync {
|
|
|
1053
1091
|
// ✅ VERIFICATION GATE: Calculate ACTUAL completion from checkboxes
|
|
1054
1092
|
const completion = await this.calculator.calculateCompletion(userStoryPath);
|
|
1055
1093
|
|
|
1056
|
-
//
|
|
1094
|
+
// FS-609: Fetch issue state ONCE and reuse throughout this method + downstream calls
|
|
1057
1095
|
const issueData = await this.client.getIssue(issueNumber);
|
|
1058
1096
|
const currentlyClosed = issueData.state === 'closed';
|
|
1059
1097
|
|
|
1098
|
+
// FS-609: Fetch last comment ONCE and reuse for idempotency checks + downstream
|
|
1099
|
+
const lastComment = await this.client.getLastComment(issueNumber);
|
|
1100
|
+
|
|
1101
|
+
// FS-609: Track whether this method mutated the issue (close/reopen/comment).
|
|
1102
|
+
// If mutations happened, cached data is stale and must not be passed downstream.
|
|
1103
|
+
let mutatedIssue = false;
|
|
1104
|
+
|
|
1060
1105
|
// DECISION LOGIC: Close/Reopen/Update based on VERIFIED completion
|
|
1061
1106
|
if (completion.overallComplete) {
|
|
1062
1107
|
// ✅ SAFE TO CLOSE - All ACs and tasks verified [x]
|
|
1063
1108
|
if (!currentlyClosed) {
|
|
1064
1109
|
// Idempotency check: skip completion comment if already posted by another sync path
|
|
1065
|
-
const lastComment = await this.client.getLastComment(issueNumber);
|
|
1066
1110
|
const commentAlreadyPosted = lastComment?.body?.includes('✅ User Story Complete');
|
|
1067
1111
|
if (commentAlreadyPosted) {
|
|
1068
1112
|
// Close without duplicate comment
|
|
@@ -1090,6 +1134,7 @@ export class GitHubFeatureSync {
|
|
|
1090
1134
|
` ✅ Verified complete: ${completion.acsCompleted}/${completion.acsTotal} ACs, ${completion.tasksCompleted}/${completion.tasksTotal} tasks`
|
|
1091
1135
|
);
|
|
1092
1136
|
}
|
|
1137
|
+
mutatedIssue = true;
|
|
1093
1138
|
}
|
|
1094
1139
|
} else {
|
|
1095
1140
|
// ⚠️ INCOMPLETE - Keep open or reopen if needed
|
|
@@ -1107,14 +1152,25 @@ export class GitHubFeatureSync {
|
|
|
1107
1152
|
console.log(
|
|
1108
1153
|
` ⚠️ Reopened: ${completion.blockingAcs.length + completion.blockingTasks.length} items incomplete`
|
|
1109
1154
|
);
|
|
1155
|
+
mutatedIssue = true;
|
|
1110
1156
|
} else {
|
|
1111
1157
|
// Update progress comment (with deduplication)
|
|
1112
|
-
|
|
1158
|
+
// FS-609: Pass cached lastComment to avoid re-fetching
|
|
1159
|
+
await this.postProgressCommentIfChanged(issueNumber, completion, lastComment);
|
|
1160
|
+
// Note: postProgressCommentIfChanged may or may not post — if it did, cache is stale
|
|
1161
|
+
// but updateStatusLabels only uses lastComment for completion check, and if we're
|
|
1162
|
+
// in the incomplete+open branch, the completion comment check won't trigger anyway.
|
|
1113
1163
|
}
|
|
1114
1164
|
}
|
|
1115
1165
|
|
|
1116
|
-
//
|
|
1117
|
-
|
|
1166
|
+
// FS-609: Pass cached data ONLY if no mutations happened.
|
|
1167
|
+
// If we closed/reopened/commented, the cached state is stale — let updateStatusLabels re-fetch.
|
|
1168
|
+
await this.updateStatusLabels(
|
|
1169
|
+
issueNumber,
|
|
1170
|
+
completion,
|
|
1171
|
+
mutatedIssue ? undefined : issueData,
|
|
1172
|
+
mutatedIssue ? undefined : lastComment,
|
|
1173
|
+
);
|
|
1118
1174
|
}
|
|
1119
1175
|
|
|
1120
1176
|
/**
|
|
@@ -1136,11 +1192,13 @@ export class GitHubFeatureSync {
|
|
|
1136
1192
|
tasksTotal?: number;
|
|
1137
1193
|
tasksCompleted?: number;
|
|
1138
1194
|
frontmatterStatus?: string;
|
|
1139
|
-
}
|
|
1195
|
+
},
|
|
1196
|
+
cachedIssueData?: any,
|
|
1197
|
+
cachedLastComment?: any,
|
|
1140
1198
|
): Promise<void> {
|
|
1141
1199
|
try {
|
|
1142
|
-
//
|
|
1143
|
-
const issueData = await this.client.getIssue(issueNumber);
|
|
1200
|
+
// FS-609: Use cached issue data if provided, otherwise fetch (backward compat)
|
|
1201
|
+
const issueData = cachedIssueData || await this.client.getIssue(issueNumber);
|
|
1144
1202
|
const currentLabels = issueData.labels || [];
|
|
1145
1203
|
|
|
1146
1204
|
// Separate status labels from other labels
|
|
@@ -1224,13 +1282,15 @@ export class GitHubFeatureSync {
|
|
|
1224
1282
|
// preventing issues like #1198 where label is applied but issue stays open
|
|
1225
1283
|
if (newStatusLabel === 'status:complete' && issueData.state.toLowerCase() !== 'closed') {
|
|
1226
1284
|
try {
|
|
1227
|
-
//
|
|
1228
|
-
|
|
1229
|
-
|
|
1285
|
+
// FS-609: Use cached issue data — updateUserStoryIssue already closed if needed,
|
|
1286
|
+
// so if we reach here with status:complete, the issue state from cache is reliable
|
|
1287
|
+
// within the same sync operation. No need to re-fetch.
|
|
1288
|
+
const freshState = issueData.state.toLowerCase();
|
|
1289
|
+
if (freshState === 'closed') {
|
|
1230
1290
|
console.log(` ⏭️ Issue #${issueNumber} already closed (skipping duplicate close)`);
|
|
1231
1291
|
} else {
|
|
1232
|
-
//
|
|
1233
|
-
const lastComment = await this.client.getLastComment(issueNumber);
|
|
1292
|
+
// FS-609: Use cached lastComment if available, otherwise fetch
|
|
1293
|
+
const lastComment = cachedLastComment || await this.client.getLastComment(issueNumber);
|
|
1234
1294
|
if (lastComment?.body?.includes('✅ User Story Complete')) {
|
|
1235
1295
|
// Comment already exists — close without posting duplicate
|
|
1236
1296
|
await execFileNoThrow('gh', [
|
|
@@ -1281,26 +1341,19 @@ export class GitHubFeatureSync {
|
|
|
1281
1341
|
*/
|
|
1282
1342
|
private async postProgressCommentIfChanged(
|
|
1283
1343
|
issueNumber: number,
|
|
1284
|
-
completion: any
|
|
1344
|
+
completion: any,
|
|
1345
|
+
cachedLastComment?: any,
|
|
1285
1346
|
): Promise<void> {
|
|
1286
1347
|
try {
|
|
1287
|
-
//
|
|
1348
|
+
// FS-609: Use cached last comment if available, otherwise fetch via client
|
|
1288
1349
|
const repoSlug = this.getRepoSlug();
|
|
1289
|
-
const commentsResult = await execFileNoThrow('gh', [
|
|
1290
|
-
'api',
|
|
1291
|
-
`repos/${repoSlug}/issues/${issueNumber}/comments`,
|
|
1292
|
-
'--jq',
|
|
1293
|
-
'.[-1] | {body: .body, created_at: .created_at}', // Get last comment only
|
|
1294
|
-
], { env: this.getGhEnv() });
|
|
1295
|
-
|
|
1296
1350
|
let lastCommentBody = '';
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
}
|
|
1351
|
+
|
|
1352
|
+
if (cachedLastComment) {
|
|
1353
|
+
lastCommentBody = cachedLastComment.body || '';
|
|
1354
|
+
} else {
|
|
1355
|
+
const fetchedComment = await this.client.getLastComment(issueNumber);
|
|
1356
|
+
lastCommentBody = fetchedComment?.body || '';
|
|
1304
1357
|
}
|
|
1305
1358
|
|
|
1306
1359
|
// 2. Build new progress comment
|
|
@@ -106,7 +106,7 @@ export declare class ActiveIncrementManager {
|
|
|
106
106
|
details: string[];
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
|
-
* Write state file atomically (temp file → rename)
|
|
109
|
+
* Write state file atomically (temp file → rename) with file lock protection
|
|
110
110
|
*/
|
|
111
111
|
private writeState;
|
|
112
112
|
/**
|
|
@@ -17,6 +17,7 @@ import path from 'path';
|
|
|
17
17
|
import { IncrementStatus } from '../types/increment-metadata.js';
|
|
18
18
|
import { MetadataManager } from './metadata-manager.js';
|
|
19
19
|
import { resolveEffectiveRoot } from '../../utils/find-project-root.js';
|
|
20
|
+
import { FileLock } from '../../utils/file-lock.js';
|
|
20
21
|
/**
|
|
21
22
|
* Active Increment Manager
|
|
22
23
|
*
|
|
@@ -245,7 +246,7 @@ export class ActiveIncrementManager {
|
|
|
245
246
|
};
|
|
246
247
|
}
|
|
247
248
|
/**
|
|
248
|
-
* Write state file atomically (temp file → rename)
|
|
249
|
+
* Write state file atomically (temp file → rename) with file lock protection
|
|
249
250
|
*/
|
|
250
251
|
writeState(state) {
|
|
251
252
|
// Ensure state directory exists
|
|
@@ -253,10 +254,24 @@ export class ActiveIncrementManager {
|
|
|
253
254
|
if (!fs.existsSync(stateDir)) {
|
|
254
255
|
fs.mkdirSync(stateDir, { recursive: true });
|
|
255
256
|
}
|
|
256
|
-
//
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
// Protect shared state with file lock
|
|
258
|
+
const lock = new FileLock(this.stateFile);
|
|
259
|
+
const acquired = lock.acquire(5); // 5 second stale threshold
|
|
260
|
+
if (!acquired) {
|
|
261
|
+
// Log warning but proceed — atomic rename still provides partial safety
|
|
262
|
+
console.warn(`⚠️ Could not acquire lock for ${this.stateFile}, proceeding with unprotected write`);
|
|
263
|
+
}
|
|
264
|
+
try {
|
|
265
|
+
// Atomic write: temp file → rename
|
|
266
|
+
const tempFile = `${this.stateFile}.tmp`;
|
|
267
|
+
fs.writeFileSync(tempFile, JSON.stringify(state, null, 2), 'utf-8');
|
|
268
|
+
fs.renameSync(tempFile, this.stateFile);
|
|
269
|
+
}
|
|
270
|
+
finally {
|
|
271
|
+
if (acquired) {
|
|
272
|
+
lock.release();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
260
275
|
}
|
|
261
276
|
/**
|
|
262
277
|
* Get state file path (for testing)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-increment-manager.js","sourceRoot":"","sources":["../../../../src/core/increment/active-increment-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"active-increment-manager.js","sourceRoot":"","sources":["../../../../src/core/increment/active-increment-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAoBpD;;;;GAIG;AACH,MAAM,OAAO,sBAAsB;IAGjC,YAAoB,UAAkB,oBAAoB,EAAE;QAAxC,YAAO,GAAP,OAAO,CAAiC;QAC1D,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,wCAAwC,CAAC,CAAC;IAChF,CAAC;IAED;;;;;OAKG;IACH,SAAS;QACP,IAAI,CAAC;YACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;gBACnC,OAAO,EAAE,CAAC;YACZ,CAAC;YAED,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACzD,MAAM,KAAK,GAAyB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAExD,8CAA8C;YAC9C,IAAI,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;gBAC3B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,C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