@tekyzinc/gsd-t 3.13.11 → 3.13.13
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 +36 -0
- package/bin/gsd-t.js +49 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to GSD-T are documented here. Updated with each release.
|
|
4
4
|
|
|
5
|
+
## [3.13.13] - 2026-04-17
|
|
6
|
+
|
|
7
|
+
### Fixed — Stray sweep now matches older-version installer artifacts
|
|
8
|
+
|
|
9
|
+
v3.13.12 shipped the defensive require + DEPRECATED_BIN_STRAYS sweep, but the sweep's safety check was too narrow: it only deleted strays whose bytes matched the **current** source. Projects left behind with a v3.13.11 (or earlier) `bin/gsd-t.js` would not match the current source (different body), so the sweep refused to delete them and those projects stayed crashed.
|
|
10
|
+
|
|
11
|
+
**Fix**: sweep now uses a **signature** check rather than a byte-identity check. A stray is deleted when it starts with `#!/usr/bin/env node` AND contains the verbatim JSDoc header `GSD-T CLI Installer` in the first 400 characters. That combination is unique enough to rule out user-owned files (a user's own script would not contain our header) while matching every historical version of this installer — so older-version artifacts are swept correctly.
|
|
12
|
+
|
|
13
|
+
**Files**:
|
|
14
|
+
- `bin/gsd-t.js` — sweep loop now uses signature match instead of byte-match.
|
|
15
|
+
- `test/bin-gsd-t-resilience.test.js` — new test case covering older-version stray (shebang + header + different body) → must be deleted. Existing byte-match test kept. Existing user-owned test kept.
|
|
16
|
+
|
|
17
|
+
**Tests**: 1239/1239 pass (+1 new assertion vs v3.13.12). E2E: N/A.
|
|
18
|
+
|
|
19
|
+
**Impact**: bee-poc and any other project carrying a pre-v3.13.12 `bin/gsd-t.js` now self-heals on the next `gsd-t update-all` pass after installing v3.13.13.
|
|
20
|
+
|
|
21
|
+
## [3.13.12] - 2026-04-17
|
|
22
|
+
|
|
23
|
+
### Fixed — Project-local `bin/gsd-t.js` crash on missing `debug-ledger.js` + self-heal sweep
|
|
24
|
+
|
|
25
|
+
A bee-poc relaunch after the v3.13.11 fix still crashed with `MODULE_NOT_FOUND: Cannot find module './debug-ledger.js'` — but the crash came from `bin/gsd-t.js` itself, not from the v3.13.11 supervisor code. Root cause: an older version of `copyBinToolsToProject` copied `bin/gsd-t.js` into registered projects as part of a now-deprecated whitelist. The current `PROJECT_BIN_TOOLS` whitelist (10 `.cjs` files) does not include `gsd-t.js` or its sibling `debug-ledger.js`, so `update-all` stopped maintaining both — but the stale copy persisted in project `bin/` directories, and `bin/gsd-t.js` had a hard require on `./debug-ledger.js` at the top of the file. Any invocation of the stale project-local copy crashed before the first line of real work. bee-poc had the 130 KB stale `bin/gsd-t.js` from this lineage.
|
|
26
|
+
|
|
27
|
+
**Layer 1 — defensive require** (`bin/gsd-t.js:23`):
|
|
28
|
+
The top-level `require('./debug-ledger.js')` is now wrapped in `try/catch` and falls back to a no-op stub exporting every function the real module exports (`readLedger`, `appendEntry`, `getLedgerStats`, `clearLedger`, `compactLedger`, `generateAntiRepetitionPreamble`). Projects with stale copies no longer crash; they degrade to debug-ledger-disabled behavior until `update-all` sweeps the stray away.
|
|
29
|
+
|
|
30
|
+
**Layer 2 — deprecated-stray sweep** (`copyBinToolsToProject`):
|
|
31
|
+
New `DEPRECATED_BIN_STRAYS = ["gsd-t.js"]` list is swept after the normal copy loop. For each entry: if the project has the stray AND its bytes match the source copy in this package, delete it (proves it's an installer artifact, not a user file that happens to share the name). User-owned files with different content are left untouched. Log line: `{project} — cleaned up N stray bin file(s)`. On the next `gsd-t update-all` after v3.13.12 installs, every project that picked up a stale `bin/gsd-t.js` self-heals; subsequent invocations fall through to the global install.
|
|
32
|
+
|
|
33
|
+
**Files**:
|
|
34
|
+
- `bin/gsd-t.js` — defensive require with full no-op stub; `DEPRECATED_BIN_STRAYS` list; post-copy sweep loop; `copyBinToolsToProject` returns `true` when either a copy happened or a stray was cleaned.
|
|
35
|
+
- `test/bin-gsd-t-resilience.test.js` — 3 new tests: (a) loading `bin/gsd-t.js --help` without `debug-ledger.js` does not emit `MODULE_NOT_FOUND`; (b) byte-matching stray is deleted; (c) user-owned file (byte-divergent) is preserved.
|
|
36
|
+
|
|
37
|
+
**Tests**: 1238/1238 pass (was 1235; +3 new assertions). E2E: N/A (no playwright.config.*).
|
|
38
|
+
|
|
39
|
+
**Impact**: installed projects that inherited a stale `bin/gsd-t.js` from older `update-all` passes will self-heal on the next `gsd-t update-all` after installing v3.13.12. bee-poc's 130 KB stale copy is removed on its next pass, after which any invocation path that had been hitting the project-local copy falls through to the global install — no more divergent vendoring.
|
|
40
|
+
|
|
5
41
|
## [3.13.11] - 2026-04-17
|
|
6
42
|
|
|
7
43
|
### Fixed — Unattended supervisor reliability triple-fix (bee-poc 15-min hang fallout)
|
package/bin/gsd-t.js
CHANGED
|
@@ -20,7 +20,19 @@ const path = require("path");
|
|
|
20
20
|
const os = require("os");
|
|
21
21
|
const readline = require("readline");
|
|
22
22
|
const { execFileSync, spawn: cpSpawn } = require("child_process");
|
|
23
|
-
|
|
23
|
+
let debugLedger;
|
|
24
|
+
try {
|
|
25
|
+
debugLedger = require(path.join(__dirname, "debug-ledger.js"));
|
|
26
|
+
} catch (_) {
|
|
27
|
+
debugLedger = {
|
|
28
|
+
readLedger: () => [],
|
|
29
|
+
appendEntry: () => {},
|
|
30
|
+
getLedgerStats: () => ({ entryCount: 0, sizeBytes: 0, needsCompaction: false, failedHypotheses: [], passCount: 0, failCount: 0 }),
|
|
31
|
+
clearLedger: () => {},
|
|
32
|
+
compactLedger: () => {},
|
|
33
|
+
generateAntiRepetitionPreamble: () => "",
|
|
34
|
+
};
|
|
35
|
+
}
|
|
24
36
|
|
|
25
37
|
// ─── Configuration ───────────────────────────────────────────────────────────
|
|
26
38
|
|
|
@@ -2100,6 +2112,14 @@ const PROJECT_BIN_TOOLS = [
|
|
|
2100
2112
|
"handoff-lock.cjs", "headless-auto-spawn.cjs",
|
|
2101
2113
|
];
|
|
2102
2114
|
|
|
2115
|
+
// Files that older versions of this installer copied into project bin/ but
|
|
2116
|
+
// are no longer part of PROJECT_BIN_TOOLS. On each update-all pass, sweep the
|
|
2117
|
+
// project's bin/ and remove any stray file that still byte-matches the source
|
|
2118
|
+
// copy in this package — that proves it's an old installer artifact, not a
|
|
2119
|
+
// user's own file sharing the same name. User-owned files (byte-divergent)
|
|
2120
|
+
// are left alone.
|
|
2121
|
+
const DEPRECATED_BIN_STRAYS = ["gsd-t.js"];
|
|
2122
|
+
|
|
2103
2123
|
function copyBinToolsToProject(projectDir, projectName) {
|
|
2104
2124
|
const projectBinDir = path.join(projectDir, "bin");
|
|
2105
2125
|
if (!fs.existsSync(projectBinDir)) {
|
|
@@ -2134,11 +2154,37 @@ function copyBinToolsToProject(projectDir, projectName) {
|
|
|
2134
2154
|
}
|
|
2135
2155
|
}
|
|
2136
2156
|
}
|
|
2157
|
+
let cleaned = 0;
|
|
2158
|
+
for (const stray of DEPRECATED_BIN_STRAYS) {
|
|
2159
|
+
const strayPath = path.join(projectBinDir, stray);
|
|
2160
|
+
if (!fs.existsSync(strayPath)) continue;
|
|
2161
|
+
try {
|
|
2162
|
+
const strayContent = fs.readFileSync(strayPath, "utf8");
|
|
2163
|
+
const head = strayContent.slice(0, 400);
|
|
2164
|
+
// Signature-match any version this installer ever shipped. The marker
|
|
2165
|
+
// is unique enough to rule out user-owned files: node shebang + the
|
|
2166
|
+
// verbatim JSDoc header "GSD-T CLI Installer". Matches every historical
|
|
2167
|
+
// version of bin/gsd-t.js, not just the current one, so older strays
|
|
2168
|
+
// (e.g. v3.13.11 left behind on v3.13.12+) are still swept.
|
|
2169
|
+
const isOurs =
|
|
2170
|
+
head.startsWith("#!/usr/bin/env node") &&
|
|
2171
|
+
head.includes("GSD-T CLI Installer");
|
|
2172
|
+
if (isOurs) {
|
|
2173
|
+
fs.unlinkSync(strayPath);
|
|
2174
|
+
cleaned++;
|
|
2175
|
+
}
|
|
2176
|
+
} catch {
|
|
2177
|
+
// leave the file alone on any read error
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
if (cleaned > 0) {
|
|
2181
|
+
info(`${projectName} — cleaned up ${cleaned} stray bin file(s)`);
|
|
2182
|
+
}
|
|
2137
2183
|
if (copied > 0) {
|
|
2138
2184
|
info(`${projectName} — copied ${copied} bin tool(s)`);
|
|
2139
2185
|
return true;
|
|
2140
2186
|
}
|
|
2141
|
-
return
|
|
2187
|
+
return cleaned > 0;
|
|
2142
2188
|
}
|
|
2143
2189
|
|
|
2144
2190
|
// One-shot migration: roll the project's progress.md Decision Log into archive
|
|
@@ -3497,6 +3543,7 @@ module.exports = {
|
|
|
3497
3543
|
isNewerVersion,
|
|
3498
3544
|
ensureDir,
|
|
3499
3545
|
copyFile,
|
|
3546
|
+
copyBinToolsToProject,
|
|
3500
3547
|
hasPlaywright,
|
|
3501
3548
|
hasSwagger,
|
|
3502
3549
|
hasApi,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekyzinc/gsd-t",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.13",
|
|
4
4
|
"description": "GSD-T: Contract-Driven Development for Claude Code — 54 slash commands with headless-by-default workflow spawning, unattended supervisor relay with event stream, graph-powered code analysis, real-time agent dashboard, task telemetry, doc-ripple enforcement, backlog management, impact analysis, test sync, milestone archival, and PRD generation",
|
|
5
5
|
"author": "Tekyz, Inc.",
|
|
6
6
|
"license": "MIT",
|