enhance(#3638): render bracket phase IDs on progress, stats, manager and statusline surfaces (epic #612 PR-5) (#4111)
* enhance(#3638): render bracket IDs on display surfaces Gate progress, stats, manager, and statusline projections on the bracket convention; validate phase_id_convention and single-source the convention card. Forward note: the uat.cts bracket co-change remains deliberately deferred to its owning slice. * chore(#3638): point the changeset at PR #4111 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(#3638): close bracket display review gaps * docs(#3638): register phase display modules * chore(#3638): re-trigger CI after macOS shard SIGTERM `full test (macos-latest, 24, shard 3/3)` failed on 20ce98cd1 in `tests/lint-compiled-artifact-sync.test.cjs` — the spawned `scripts/lint-compiled-artifact-sync.cjs` was killed at 60024ms (`exited null (signal SIGTERM)`, stdout and stderr both empty), 24ms past the test's own `TSC_COMPILE_TIMEOUT_MS`. That is the failure mode the constant's comment already documents ("under CI shard load that compile can exceed the budget, dying to a SIGTERM with empty piped stdout"). No content change; this empty commit exists only to re-run the matrix, since re-running a job needs write access on the upstream repository. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Tom Boucher <trekkie@nomorestars.com>
This commit is contained in:
@@ -13,6 +13,65 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { runGsdTools, createTempProject, cleanup, delay } = require('./helpers.cjs');
|
||||
|
||||
// ─── ADR-612 PR-5: phase_id_convention enum validation ──────────────────────
|
||||
|
||||
describe('#3638: phase_id_convention config enum', () => {
|
||||
test('accepts sequential, milestone-prefixed, and bracket exactly', (t) => {
|
||||
const tmpDir = createTempProject('gsd-phase-id-convention-');
|
||||
t.after(() => cleanup(tmpDir));
|
||||
|
||||
for (const convention of ['sequential', 'milestone-prefixed', 'bracket']) {
|
||||
const result = runGsdTools(['config-set', 'phase_id_convention', convention], tmpDir);
|
||||
assert.ok(result.success, `config-set phase_id_convention ${convention} failed: ${result.error}`);
|
||||
assert.equal(readConfig(tmpDir).phase_id_convention, convention);
|
||||
}
|
||||
});
|
||||
|
||||
test('absent and null preserve the unset legacy behavior', (t) => {
|
||||
const tmpDir = createTempProject('gsd-phase-id-convention-');
|
||||
t.after(() => cleanup(tmpDir));
|
||||
assert.equal(
|
||||
fs.existsSync(path.join(tmpDir, '.planning', 'config.json')),
|
||||
false,
|
||||
'an absent config leaves the convention unset',
|
||||
);
|
||||
writeConfig(tmpDir, { phase_id_convention: 'bracket', model_profile: 'balanced' });
|
||||
|
||||
const result = runGsdTools(['config-set', 'phase_id_convention', 'null'], tmpDir);
|
||||
assert.ok(result.success, `config-set phase_id_convention null failed: ${result.error}`);
|
||||
const config = readConfig(tmpDir);
|
||||
assert.equal(Object.hasOwn(config, 'phase_id_convention'), false);
|
||||
assert.equal(config.model_profile, 'balanced', 'unsetting the convention must preserve sibling config');
|
||||
});
|
||||
|
||||
test('rejects unsupported and case-mismatched values with the supported set', (t) => {
|
||||
const tmpDir = createTempProject('gsd-phase-id-convention-');
|
||||
t.after(() => cleanup(tmpDir));
|
||||
|
||||
for (const value of ['free-form', 'Bracket']) {
|
||||
const result = runGsdTools(['config-set', 'phase_id_convention', value], tmpDir);
|
||||
assert.equal(result.success, false, `${value} must be rejected`);
|
||||
assert.match(result.error, /Invalid phase_id_convention/);
|
||||
assert.match(result.error, /sequential, milestone-prefixed, bracket/);
|
||||
}
|
||||
});
|
||||
|
||||
test('sequential remains valid configuration but is not a roadmap-upgrade target', (t) => {
|
||||
const tmpDir = createTempProject('gsd-phase-id-convention-');
|
||||
t.after(() => cleanup(tmpDir));
|
||||
|
||||
const configResult = runGsdTools(['config-set', 'phase_id_convention', 'sequential'], tmpDir);
|
||||
assert.ok(configResult.success, `sequential config failed: ${configResult.error}`);
|
||||
|
||||
const migrationResult = runGsdTools(
|
||||
['roadmap', 'upgrade', '--convention', 'sequential', '--dry-run'],
|
||||
tmpDir,
|
||||
);
|
||||
assert.equal(migrationResult.success, false, 'sequential must not become a migration target');
|
||||
assert.match(migrationResult.error, /Only --convention milestone-prefixed is supported/);
|
||||
});
|
||||
});
|
||||
|
||||
// ─── helpers ──────────────────────────────────────────────────────────────────
|
||||
|
||||
function readConfig(tmpDir) {
|
||||
|
||||
Reference in New Issue
Block a user