Skip to content

Commit bc68d2e

Browse files
V30: Fix promotion README posture rewrite
Broaden the runtime canon promotion README rewrite so promoted V30 demonstration docs move from draft-target wording to V30 active/V31 draft posture before drift validation. Add fixture coverage for the V30 Protocol/BTD hardening README shape.\n\nProof: npm --prefix protocol-demonstration run test:v22-canon-drift; git diff --check; git diff --cached --check.
1 parent 2d18901 commit bc68d2e

2 files changed

Lines changed: 18 additions & 16 deletions

File tree

protocol-demonstration/test/v22-canon-drift.test.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,30 +102,31 @@ test('runtime promotion preparation rewrites current inline demonstration README
102102
path.join(fixtureRoot, 'protocol-demonstration', 'src', 'canon-posture.js'),
103103
[
104104
"// @ts-check",
105-
"export const ACTIVE_CANON_VERSION = 'V27';",
106-
"export const DRAFT_TARGET_VERSION = 'V28';"
105+
"export const ACTIVE_CANON_VERSION = 'V29';",
106+
"export const DRAFT_TARGET_VERSION = 'V30';"
107107
].join('\n'),
108108
'utf8'
109109
);
110110
await fs.writeFile(
111111
path.join(fixtureRoot, 'protocol-demonstration', 'README.md'),
112112
[
113-
'# Bitcode Protocol Demonstration - V27 canonical deterministic local prototype',
113+
'# Bitcode Protocol Demonstration - V29 canonical deterministic local prototype',
114114
'',
115115
'`BITCODE_SPEC.txt` is the canonical pointer for active-system work. It currently',
116-
'resolves to `V27`; V28 is the active draft target for MVP QA.',
117-
'`BITCODE_SPEC.txt -> V27`. This demo is governed by the active V27 canonical',
118-
'spec and `BITCODE_SPEC_V27_PROVEN.md` as the current generated appendix.'
116+
'resolves to `V29`; V30 is the active draft target for Protocol/BTD hardening.',
117+
'`BITCODE_SPEC.txt -> V29`. This demo is governed by the active V29 canonical',
118+
'spec and `BITCODE_SPEC_V29_PROVEN.md` as the current generated appendix while V30 draft',
119+
'work proceeds outside the demonstration runtime boundary.'
119120
].join('\n'),
120121
'utf8'
121122
);
122123

123124
execFileSync(process.execPath, [
124125
prepareRuntimeScriptPath,
125126
'--version',
126-
'V28',
127+
'V30',
127128
'--next-draft',
128-
'V29',
129+
'V31',
129130
'--repo-root',
130131
fixtureRoot
131132
], {
@@ -135,12 +136,13 @@ test('runtime promotion preparation rewrites current inline demonstration README
135136

136137
const rewrittenReadme = await fs.readFile(path.join(fixtureRoot, 'protocol-demonstration', 'README.md'), 'utf8');
137138

138-
assert.match(rewrittenReadme, /# Bitcode Protocol Demonstration - V28 canonical deterministic local prototype/);
139-
assert.match(rewrittenReadme, /resolves to `V28`; V29 is the next draft target after this promotion\./);
140-
assert.match(rewrittenReadme, /BITCODE_SPEC\.txt -> V28/);
141-
assert.match(rewrittenReadme, /active V28 canonical\s+spec/);
142-
assert.match(rewrittenReadme, /BITCODE_SPEC_V28_PROVEN\.md/);
143-
assert.doesNotMatch(rewrittenReadme, /active draft target for MVP QA/);
139+
assert.match(rewrittenReadme, /# Bitcode Protocol Demonstration - V30 canonical deterministic local prototype/);
140+
assert.match(rewrittenReadme, /resolves to `V30`; V31 is the next draft target after this promotion\./);
141+
assert.match(rewrittenReadme, /BITCODE_SPEC\.txt -> V30/);
142+
assert.match(rewrittenReadme, /active V30 canonical\s+spec/);
143+
assert.match(rewrittenReadme, /BITCODE_SPEC_V30_PROVEN\.md/);
144+
assert.doesNotMatch(rewrittenReadme, /active draft target/);
145+
assert.doesNotMatch(rewrittenReadme, /draft work proceeds outside/);
144146
});
145147

146148
test('V23 spec-family promotion preparation rewrites hand-authored status truth', async () => {

scripts/prepare-bitcode-runtime-canon-promotion.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ function rewriteReadme(content, version, nextDraft) {
107107
`- current generated appendix: \`${promotedProvenPath(version)}\``
108108
);
109109
rewritten = rewritten.replace(
110-
/resolves to `V\d+`; V\d+ is the active draft target for MVP QA\./m,
110+
/resolves to `V\d+`; V\d+ is the active draft target[^.]*\./m,
111111
`resolves to \`${version}\`; ${nextDraft} is the next draft target after this promotion.`
112112
);
113113
rewritten = rewritten.replace(
114-
/`BITCODE_SPEC\.txt -> V\d+`\.\s+This demo is governed by the active V\d+ canonical\s+spec and `(?:BITCODE_SPEC_V\d+_PROVEN\.md|_legacy\/ENGI_SPEC_V\d+_PROVEN\.md)` as the current generated appendix\./m,
114+
/`BITCODE_SPEC\.txt -> V\d+`\.\s+This demo is governed by the active V\d+ canonical\s+spec and `(?:BITCODE_SPEC_V\d+_PROVEN\.md|_legacy\/ENGI_SPEC_V\d+_PROVEN\.md)` as the current generated appendix(?:\s+while V\d+ draft\s+work proceeds outside the demonstration runtime boundary)?\./m,
115115
`\`BITCODE_SPEC.txt -> ${version}\`. This demo is governed by the active ${version} canonical\nspec and \`${promotedProvenPath(version)}\` as the current generated appendix.`
116116
);
117117
rewritten = rewritten.replace(

0 commit comments

Comments
 (0)