Skip to content

Commit 4d2c37c

Browse files
fix(skills): remove unused reconcileStaleWorkspaceProposals function
The function was declared but never called — stale detection is already done via the read-only detectStaleProposals() path in listSkillProposals and inspectSkillProposal. Durable stale marking via markProposalStale() stays in the apply/revise lifecycle paths. Also restores the detectStaleProposals JSDoc that was displaced when the unused function was inserted above it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3d45db2 commit 4d2c37c

1 file changed

Lines changed: 0 additions & 34 deletions

File tree

src/skills/workshop/service.ts

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,40 +1000,6 @@ function isProposalInWorkspace(record: SkillProposalRecord, workspaceDir: string
10001000
* (like `listSkillProposals`) use the result to show derived stale status
10011001
* without mutating proposal records.
10021002
*/
1003-
/**
1004-
* Persist stale status for workspace proposals whose target skill already
1005-
* exists (create) or is missing (update). Uses the same target-lock +
1006-
* still-pending recheck pattern as apply/revise paths so a concurrent
1007-
* apply cannot be reclassified after the fact.
1008-
*
1009-
* Idempotent: already-stale proposals are left unchanged.
1010-
*/
1011-
async function reconcileStaleWorkspaceProposals(workspaceDir: string): Promise<void> {
1012-
const staleReasons = await detectStaleProposals(workspaceDir);
1013-
if (staleReasons.size === 0) {
1014-
return;
1015-
}
1016-
1017-
for (const [proposalId, reason] of staleReasons) {
1018-
try {
1019-
const initial = await readSkillProposalRecord(proposalId);
1020-
if (!initial || initial.status !== "pending") {
1021-
continue;
1022-
}
1023-
await withSkillProposalTargetLock(initial, async () => {
1024-
const record = await readSkillProposalRecord(proposalId);
1025-
if (!record || record.status !== "pending") {
1026-
return;
1027-
}
1028-
await markProposalStale(record, reason);
1029-
});
1030-
} catch {
1031-
// Lock contention or concurrent mutation — skip this proposal.
1032-
// The next list/inspect call will reconcile it.
1033-
}
1034-
}
1035-
}
1036-
10371003
async function detectStaleProposals(workspaceDir: string): Promise<Map<string, string>> {
10381004
const staleMap = new Map<string, string>();
10391005
const manifest = await readSkillProposalManifest();

0 commit comments

Comments
 (0)