Skip to content

Commit f95abda

Browse files
committed
fix(release-management): list the JVM and Nexus steps in the verify-rc pane
The pane's checklist left out Steps 6b and 6c, which release-verify counts towards the verdict, so an RC with JVM artefacts had no row for a failure in either. Add them in STEP_ORDER's order. Use the sanitizer sequence from the review-findings mod: a line break in a detail could draw a second, false checklist row, and private-mode escape sequences left their text behind. Generated-by: Claude Opus 5
1 parent e032ba7 commit f95abda

3 files changed

Lines changed: 23 additions & 10 deletions

File tree

‎plugins/magpie-release-management/hooks/types.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ export type VerifyStepId =
2929
| 'rat-license-headers'
3030
| 'notice-license'
3131
| 'binary-exclusion'
32+
| 'jvm-artefacts'
33+
| 'nexus-staging'
3234
| 'source-tree-integrity'
3335
| 'version-consistency'
3436
| 'reproducibility'
@@ -59,7 +61,7 @@ export interface VerifyRcState {
5961
}
6062

6163
/**
62-
* Returns the canonical 11 verification steps in exact SKILL.md execution order,
64+
* Returns the canonical 13 verification steps in exact SKILL.md execution order,
6365
* all initialized in 'pending' status.
6466
*/
6567
export function createDefaultVerifySteps(): VerifyRcStep[] {
@@ -71,6 +73,8 @@ export function createDefaultVerifySteps(): VerifyRcStep[] {
7173
{ id: 'rat-license-headers', label: 'Apache RAT license headers', status: 'pending' },
7274
{ id: 'notice-license', label: 'NOTICE and LICENSE integrity', status: 'pending' },
7375
{ id: 'binary-exclusion', label: 'Prohibited binaries scan', status: 'pending' },
76+
{ id: 'jvm-artefacts', label: 'JVM artefact checks', status: 'pending' },
77+
{ id: 'nexus-staging', label: 'Nexus staging repository', status: 'pending' },
7478
{ id: 'source-tree-integrity', label: 'Source integrity & symlinks', status: 'pending' },
7579
{ id: 'version-consistency', label: 'Version manifest consistency', status: 'pending' },
7680
{ id: 'reproducibility', label: 'Reproducible build verification', status: 'pending' },

‎plugins/magpie-release-management/hooks/verify-rc-pane.test.ts‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ describe('magpie-release-management verify-rc checklist mod (PR-1)', () => {
104104
assertStrictEqual(sanitizeText('\x1b[31mRed Alert\x1b[0m'), 'Red Alert');
105105
assertStrictEqual(sanitizeText('\x1b]0;Window Title\x07Clean Text'), 'Clean Text');
106106
assertStrictEqual(sanitizeText('Line 1\x00\x08Text\x1f'), 'Line 1Text');
107+
assertStrictEqual(sanitizeText('\x1b[?25lHidden cursor'), 'Hidden cursor');
108+
assertStrictEqual(sanitizeText('failure\n[PASS] another check'), 'failure [PASS] another check');
107109
assertStrictEqual(sanitizeText(null), '');
108110
assertStrictEqual(sanitizeText(undefined), '');
109111
assertStrictEqual(sanitizeText(12345), '');
@@ -178,9 +180,9 @@ describe('magpie-release-management verify-rc checklist mod (PR-1)', () => {
178180
});
179181

180182
describe('createDefaultVerifySteps canonical sequence', () => {
181-
test('returns all 11 canonical steps matching verify-rc/SKILL.md in exact order', () => {
183+
test('returns all 13 canonical steps matching verify-rc/SKILL.md in exact order', () => {
182184
const steps = createDefaultVerifySteps();
183-
assertStrictEqual(steps.length, 11);
185+
assertStrictEqual(steps.length, 13);
184186

185187
const expectedIds = [
186188
'preflight',
@@ -190,6 +192,8 @@ describe('magpie-release-management verify-rc checklist mod (PR-1)', () => {
190192
'rat-license-headers',
191193
'notice-license',
192194
'binary-exclusion',
195+
'jvm-artefacts',
196+
'nexus-staging',
193197
'source-tree-integrity',
194198
'version-consistency',
195199
'reproducibility',
@@ -306,7 +310,7 @@ describe('magpie-release-management verify-rc checklist mod (PR-1)', () => {
306310

307311
const stepsBox = pane.children[1];
308312
assertStrictEqual(stepsBox.type, 'Box');
309-
assertStrictEqual(stepsBox.children.length, 11);
313+
assertStrictEqual(stepsBox.children.length, 13);
310314

311315
// Verify row 0 (preflight) has PASS badge
312316
const row0 = stepsBox.children[0];
@@ -464,13 +468,13 @@ describe('magpie-release-management verify-rc checklist mod (PR-1)', () => {
464468
assertStrictEqual(headerBox.children[0].bold, true);
465469
assertStrictEqual(
466470
headerBox.children[1].children[0],
467-
'Progress: 2/11 completed \u00B7 Status: RUNNING'
471+
'Progress: 2/13 completed \u00B7 Status: RUNNING'
468472
);
469473
assertStrictEqual(headerBox.children[1].color, 'info');
470474

471475
// Verify Step Rows
472476
const stepsBox = pane.children[1];
473-
assertStrictEqual(stepsBox.children.length, 11);
477+
assertStrictEqual(stepsBox.children.length, 13);
474478

475479
// Preflight (passed)
476480
const row0 = stepsBox.children[0];

‎plugins/magpie-release-management/hooks/verify-rc-pane.ts‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,20 @@ export async function setVerifyRcState($: any, state: VerifyRcState | null): Pro
5858
}
5959

6060
/**
61-
* Strips ANSI CSI sequences, OSC sequences, and C0/C1 control characters from strings.
61+
* Strips ANSI CSI and OSC sequences and C0/C1 control characters, and folds line
62+
* breaks to a space so that one detail cannot draw a second checklist row.
6263
*/
6364
export function sanitizeText(raw: unknown): string {
6465
if (typeof raw !== 'string') {
6566
return '';
6667
}
67-
let clean = raw.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, '').replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g, '');
68-
clean = clean.replace(/[\x00-\x09\x0B-\x1F\x7F-\x9F]/g, '');
69-
return clean.trim();
68+
return raw
69+
.replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g, '')
70+
.replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g, '')
71+
.replace(/\x1b[@-Z\\-_]/g, '')
72+
.replace(/[\r\n\t]+/g, ' ')
73+
.replace(/[\x00-\x1f\x7f-\x9f]/g, '')
74+
.trim();
7075
}
7176

7277
/**

0 commit comments

Comments
 (0)