DUNE-002: add validated patchnote publishing system
This commit is contained in:
parent
89acb004d3
commit
d955e8beb8
41 changed files with 155 additions and 25 deletions
|
|
@ -19,7 +19,7 @@
|
|||
| --- | --- | --- | --- |
|
||||
| DUNE-003 | P0 | Persist and follow the priority rules, including the colleague discussion | Completed and pushed to main as `40efbff` |
|
||||
| DUNE-001 | P2 | Create a staff page if needed | Completed — staff.html deployed successfully; AI contributor plaque, support links and empty unconfirmed human roster |
|
||||
| DUNE-002 | P2 | Introduce a patchnote system; ask colleague how Starfall did it and include ticket ID | In progress — technical response received; next after staff delivery |
|
||||
| DUNE-002 | P2 | Introduce a patchnote system; ask colleague how Starfall did it and include ticket ID | Completed — published and tested; two completed product tasks await the normal 5–10-task release threshold |
|
||||
| DUNE-004 | P2 | End every colleague message with `einde prompt` | Completed — applied, communicated and recorded; every colleague message ends with einde prompt |
|
||||
|
||||
P2 receipt order: DUNE-001, then DUNE-002. DUNE-003 was handled first after receipt. This workflow-only task is not a product release entry.
|
||||
|
|
@ -50,3 +50,19 @@ Keep this file current with final commits, confirmed GitHub push status, deploym
|
|||
- Staff HTML links/assets and separation from AI credit checked; 25 website tests pass. No browser-control tool is available in the current tool set, so visual browser QA was not performed.
|
||||
- Local packaging adapter updated to the installed Sites 1.0.2-remix-b.1 validator after its old 1.0.0 path disappeared.
|
||||
- GitHub push is the final source-delivery step for this ticket; see commit history for exact hash.
|
||||
|
||||
## DUNE-002 delivery
|
||||
|
||||
- Public archive: https://project-dune.bonnystoat9.chatgpt.site/patch-notes.html
|
||||
- Sites source commit: `8ed087eedf421d3ce8a298a8f68f8341339f82f0`.
|
||||
- Confirmed successful public deployment: `appgdep_6acf8144c27081918b08f7a17169c907` (2026-10-14).
|
||||
- Permanent task register, completed-product queue, validated 5–10-task batches, separate urgent bugfix reports, generated archive/release pages and news links implemented.
|
||||
- Two completed product tasks pending; no invented release or bugfix. Workflow agreements do not count toward product batches.
|
||||
- 32 website tests passed, including batch boundaries, duplicate IDs, urgent bugfix validation and repeated-generation checks. Build and internal links/assets across 26 pages passed. Browser visual QA unavailable in this tool set.
|
||||
- GitHub main commit/push is the final source-delivery step; exact hash is in Git history.
|
||||
|
||||
## DUNE-005 — P2 — colleague introduction
|
||||
|
||||
- User-authorised new colleague: `01a13a89-b245-7d40-b4b7-41c3e2a030ca`, title `4 of 7 · Starfall continuation`.
|
||||
- Queued after DUNE-002; introduction will identify 2 of 14 · secondary matrix of unimatrix001, preserve priority agreements and end with einde prompt.
|
||||
- Workflow-only task; not a product patchnote entry.
|
||||
29
website/PATCHNOTES.md
Normal file
29
website/PATCHNOTES.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Development patchnote system — DUNE-002
|
||||
|
||||
This follows the colleague's source-file-and-generator pattern, adapted to Project Dune. It does not share Starfall's source, deployment or task IDs.
|
||||
|
||||
## Source of truth
|
||||
|
||||
- `scripts/task-register.json`: permanent DUNE request IDs, receipt order, priority, product/workflow kind, completion status and optional release assignment.
|
||||
- `scripts/pending-patchnotes.json`: completed normal product tasks waiting for a bundle. One requested feature is one product task; implementation details are not extra tasks. Workflow agreements do not count.
|
||||
- `scripts/changelog.json`: published release records, newest first. A normal record embeds the 5–10 product records included in that release. An urgent bugfix record additionally contains the problem, repair and verification.
|
||||
- `scripts/patchnote-policy.mjs`: validation and transformations. Normal bundles contain 5–10 genuine completed products; urgent fixes bypass that minimum. Duplicate task references, version collisions and mixing workflow/unfinished tasks into releases are rejected.
|
||||
- `scripts/build-patchnotes.mjs`: generates `web/patch-notes.html`, individual release pages, public footer links and a development-news link from the game-news page. All public views use the same source records.
|
||||
|
||||
The initial archive is intentionally empty. DUNE-001 and DUNE-002 are completed pending product tasks (2/5). DUNE-003 and DUNE-004 are workflow agreements and do not contribute to the release threshold. Earlier work is preserved in Git history and the contributor record; no retroactive releases or invented tickets are created.
|
||||
|
||||
## Operation
|
||||
|
||||
Validate with `node scripts/manage-patchnotes.mjs validate`. The regular build validates data and generates the public pages automatically.
|
||||
|
||||
After 5–10 product tasks have been completed, run `node scripts/manage-patchnotes.mjs publish` and pass a JSON document through stdin with `version`, `date` (YYYY-MM-DD), `title`, `synopsis`, and `taskIds` (the pending product IDs). It moves only those products out of pending, preserves their DUNE IDs and assigns their release in the task register. A queue larger than ten is split into later bundles; one release can never contain eleven tasks.
|
||||
|
||||
For a real urgent fix, first register the complete request as a completed product with priority BUGFIX. Run `node scripts/manage-patchnotes.mjs bugfix` with stdin JSON containing `version`, `date`, `title`, `synopsis`, `problem`, `fix`, `checks`, and `tasks` (each with `id`, `title`, `promptIds`, `priority: BUGFIX`, and `changes`). This creates a separate urgent entry immediately; it is never held in the normal queue. The generator also places the newest urgent bugfix cards on Home and News, linking the full problem/repair/check report. No sample bugfix is published by this implementation.
|
||||
|
||||
Then build/test and publish the exact source/archive through the existing Sites workflow, preserving its public audience. Finish by pushing the same feature changes to the authorised `unimatrixgit/mcdune` main branch. Record the source commit, deployment ID, GitHub commit/push result and completed request IDs in `PROJECT-WORKLOG.md`.
|
||||
|
||||
## Distinctions
|
||||
|
||||
Publishing a feature and publishing a normal patchnote are separate actions. A feature can already be live while its bundle is waiting for five completed tasks. Website build/deployment IDs are not fabricated patchnote versions. Game notifications remain on News; development updates live in Patch Notes.
|
||||
|
||||
The colleague was asked with DUNE-002 explicitly attached and supplied the technical pattern. Outbound colleague messages end with `einde prompt` (DUNE-004). Priorities remain BUGFIX > P0 > P1 > P2 > P3 > PARKEREN, receipt order within the same priority.
|
||||
|
|
@ -22,3 +22,5 @@ The standalone [Sietch Armoury](https://project-dune.bonnystoat9.chatgpt.site/ar
|
|||
The top menu links to `prophecy.html`, a book-focused Paul Atreides journal with six illustrated posts covering Dune, Dune Messiah and Children of Dune. Each article has a spoiler gate, source notes and previous/next links. The index supports book filters and search. Original commentary is separated from plot context. Posts live in `web/prophecy-data.json`; the build regenerates their static pages with `scripts/build-prophecy.mjs`.
|
||||
|
||||
The Prophecy articles are extended essays of at least 3,000 body words each. Reading estimates use 200 words per minute and exclude graphic text. Each essay includes a timeline, relationship map, comparison board and linked contents. Long-form source lives in `content/prophecy/*.md`; `web/prophecy-graphics.json` holds visual-aid labels. The build fails if an essay falls below the minimum length.
|
||||
|
||||
See [Patchnote workflow](PATCHNOTES.md) for the 5–10 product-task bundle policy, permanent DUNE request IDs, pending queue, urgent bugfix reports and source-driven public archive. Staff and contributor records are on `staff.html`; Patch Notes is on `patch-notes.html`.
|
||||
|
|
|
|||
13
website/scripts/build-patchnotes.mjs
Normal file
13
website/scripts/build-patchnotes.mjs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import {readFileSync,writeFileSync,readdirSync} from 'node:fs';import {validatePatchnotes,releaseFile} from './patchnote-policy.mjs';
|
||||
const scripts=new URL('./',import.meta.url),web=new URL('../web/',import.meta.url),read=name=>JSON.parse(readFileSync(new URL(name,scripts),'utf8')),pending=read('pending-patchnotes.json'),releases=read('changelog.json'),register=read('task-register.json');validatePatchnotes(register,pending,releases);
|
||||
const esc=s=>String(s).replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
|
||||
const urgent=releases.filter(r=>r.kind==='bugfix').slice(0,3);const urgentCards=urgent.length?'<section class="urgent-bugfix-news" aria-label="Urgent development bugfixes"><h2>Urgent bugfix reports</h2><div>'+urgent.map(r=>'<article><img src="assets/bugfix-seal.svg" alt=""><p>BUGFIX · '+esc(r.version)+'</p><h3><a href="'+releaseFile(r.version)+'">'+esc(r.title)+'</a></h3><p>'+esc(r.synopsis)+'</p><a href="'+releaseFile(r.version)+'">Problem, repair & verification →</a></article>').join('')+'</div></section>':'';
|
||||
for(const file of readdirSync(web).filter(x=>x.endsWith('.html'))){let text=readFileSync(new URL(file,web),'utf8');text=text.replace(/<section class="urgent-bugfix-news"[\s\S]*?<\/section>/g,'');if(urgentCards&&['news.html','index.html'].includes(file))text=text.replace(/(<nav id="realm-menu"[\s\S]*?<\/nav>)/,'$1'+urgentCards);text=text.replace(/<footer>[\s\S]*?<\/footer>/,footer=>footer.includes('href="patch-notes.html"')?footer:footer.replace('<a href="staff.html">','<a href="patch-notes.html">Patch notes →</a><a href="staff.html">'));if(file==='news.html'&&!text.includes('class="development-news-link"'))text=text.replace(/(<nav id="realm-menu"[\s\S]*?<\/nav>)/,'$1<aside class="development-news-link"><a class="button gold" href="patch-notes.html">Website & plugin patch notes →</a><p>Game dispatches appear below. Development releases have their own register.</p></aside>');writeFileSync(new URL(file,web),text)}
|
||||
const base=readFileSync(new URL('index.html',web),'utf8'),header=base.match(/<header>[\s\S]*?<\/header>/)[0].replace(/ aria-current="page"/g,''),menu=base.match(/<nav id="realm-menu"[\s\S]*?<\/nav>/)[0],footer=base.match(/<footer>[\s\S]*?<\/footer>/)[0];
|
||||
function shell(title,body){return '<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>'+esc(title)+' — Project Dune</title><meta name="description" content="Project Dune development releases, urgent bugfix reports and pending feature bundles."><link rel="icon" href="assets/favicon.svg">'+['styles','pages','minecraft','lore','patchnotes'].map(x=>'<link rel="stylesheet" href="'+x+'.css">').join('')+'<script src="pages.js" defer></script><script src="patchnotes.js" defer></script></head><body><a class="skip" href="#patchnotes-content">Skip to content</a>'+header+'<main><section class="page-intro intro-patchnotes"><p class="eyebrow">PROJECT DUNE / GUILD CHANGE REGISTER</p><h1>'+esc(title)+'</h1><p>Traceable changes to the website and plugin. Completed work, published bundles and urgent repairs.</p></section>'+menu+'<div id="patchnotes-content" class="patchnotes-content">'+body+'</div></main>'+footer+'<div class="toast" role="status" aria-live="polite"></div></body></html>'}
|
||||
const stats='<section class="patch-stats"><div><strong>'+releases.filter(x=>x.kind==='normal').length+'</strong><span>Published bundles</span></div><div><strong>'+releases.filter(x=>x.kind==='bugfix').length+'</strong><span>Urgent bugfix reports</span></div><div><strong>'+pending.completed.length+' / 5</strong><span>Completed tasks toward next bundle</span></div></section>';
|
||||
const cards=releases.map(r=>'<article class="patch-card kind-'+r.kind+'" data-kind="'+r.kind+'"><p class="patch-kind">'+(r.kind==='bugfix'?'URGENT BUGFIX':'BUNDLED PRODUCT UPDATE')+' · '+esc(r.version)+'</p><h3><a href="'+releaseFile(r.version)+'">'+esc(r.title)+'</a></h3><p>'+esc(r.synopsis)+'</p><small>'+esc(r.date)+' · '+r.tasks.length+' product '+(r.tasks.length===1?'task':'tasks')+'</small><a href="'+releaseFile(r.version)+'">Read full patch note →</a></article>').join('');
|
||||
const waiting=pending.completed.map(t=>'<article class="pending-task"><p class="patch-kind">'+t.promptIds.map(esc).join(' · ')+' / '+esc(t.priority)+'</p><h3>'+esc(t.title)+'</h3><ul>'+t.changes.map(c=>'<li>'+esc(c)+'</li>').join('')+'</ul><small>Completed '+esc(t.completedAt)+' · awaiting a normal bundle</small></article>').join('');
|
||||
writeFileSync(new URL('patch-notes.html',web),shell('Patch Notes',stats+'<section class="patch-register"><div class="patch-toolbar"><h2>Published register</h2><label>Type<select id="patch-kind"><option value="all">All releases</option><option value="normal">Product bundles</option><option value="bugfix">Urgent bugfixes</option></select></label></div><div id="patch-releases" class="patch-grid">'+cards+'</div><div id="patch-empty" class="patch-empty"'+(cards?' hidden':'')+'><h3>'+(cards?'No matching releases':'The first bundle is being assembled')+'</h3><p>Normal patchnotes collect 5–10 completed product tasks. Individual features can already be live while their release note is waiting for enough completed work.</p></div></section><section class="patch-pending"><p class="eyebrow">COMPLETED WORK / NOT YET A RELEASE NOTE</p><h2>Next normal bundle</h2><p>'+pending.completed.length+' completed product tasks are recorded. '+Math.max(0,5-pending.completed.length)+' more are needed before a normal bundle can be written. Workflow agreements do not count toward the threshold.</p><div class="patch-grid">'+waiting+'</div></section><aside class="patch-policy"><h3>How this register works</h3><p>Normal updates group 5–10 genuine completed product tasks, retaining their DUNE ticket IDs. Urgent bugfixes are published separately with the problem, repair and verification; they do not wait for a feature bundle. A deployment is not automatically a new patchnote.</p><p>This register starts with the new system. Earlier development remains in the repository and <a href="staff.html">contribution record</a>; no historical releases have been invented. <a href="news.html">Live game news</a> remains separate.</p><a href="tickets.html">Report a problem through support tickets →</a></aside>'));
|
||||
for(const r of releases){const details=r.tasks.map(t=>'<section class="release-task"><p class="patch-kind">'+t.promptIds.map(esc).join(' · ')+'</p><h3>'+esc(t.title)+'</h3><ul>'+t.changes.map(c=>'<li>'+esc(c)+'</li>').join('')+'</ul>'+((t.checks||[]).length?'<h4>Verification</h4><ul>'+t.checks.map(c=>'<li>'+esc(c)+'</li>').join('')+'</ul>':'')+'</section>').join('');writeFileSync(new URL(releaseFile(r.version),web),shell(r.kind==='bugfix'?'Urgent Bugfix':'Product Update','<article class="patch-detail"><a href="patch-notes.html">← Patchnote archive</a><p class="patch-kind">'+esc(r.version)+' · '+esc(r.date)+'</p><h2>'+esc(r.title)+'</h2><p>'+esc(r.synopsis)+'</p>'+(r.kind==='bugfix'?'<div class="bugfix-report"><h3>Problem</h3><p>'+esc(r.problem)+'</p><h3>Repair</h3><p>'+esc(r.fix)+'</p><h3>Checks</h3><ul>'+r.checks.map(x=>'<li>'+esc(x)+'</li>').join('')+'</ul></div>':'')+details+'</article>'))}
|
||||
console.log('Built patchnote register:',releases.length,'releases;',pending.completed.length,'normal tasks pending');
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
import './build-prophecy.mjs';
|
||||
import './build-staff.mjs';
|
||||
import './build-patchnotes.mjs';
|
||||
import {readFileSync,writeFileSync,readdirSync,statSync,mkdirSync,existsSync,rmSync,cpSync} from 'node:fs';import path from 'node:path';import {fileURLToPath} from 'node:url';
|
||||
const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..'),web=path.join(root,'web'),dist=path.join(root,'dist');
|
||||
const assets={};const types={'.html':'text/html; charset=utf-8','.css':'text/css; charset=utf-8','.js':'text/javascript; charset=utf-8','.json':'application/json; charset=utf-8','.webp':'image/webp','.svg':'image/svg+xml'};
|
||||
|
|
|
|||
1
website/scripts/changelog.json
Normal file
1
website/scripts/changelog.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
[]
|
||||
4
website/scripts/manage-patchnotes.mjs
Normal file
4
website/scripts/manage-patchnotes.mjs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import {readFileSync,writeFileSync} from 'node:fs';import {makeRelease,makeBugfix,validatePatchnotes} from './patchnote-policy.mjs';
|
||||
const root=new URL('./',import.meta.url),read=name=>JSON.parse(readFileSync(new URL(name,root),'utf8'));
|
||||
const register=read('task-register.json'),pending=read('pending-patchnotes.json'),releases=read('changelog.json'),action=process.argv[2]||'validate';
|
||||
try{if(action==='validate'){validatePatchnotes(register,pending,releases);console.log('Patchnote registry valid. '+pending.completed.length+'/5 normal tasks pending; '+releases.length+' releases.')}else{if(!['publish','bugfix'].includes(action))throw Error('Use validate, publish or bugfix');const input=JSON.parse(readFileSync(0,'utf8'));const next=action==='publish'?makeRelease(register,pending,releases,input):makeBugfix(register,pending,releases,input);for(const [file,data]of [['task-register.json',next.register],['pending-patchnotes.json',next.pending],['changelog.json',next.releases]])writeFileSync(new URL(file,root),JSON.stringify(data,null,2)+'\n');console.log('Release recorded: '+next.release.version+'. Run the website build and normal publication workflow.')}}catch(error){console.error(error.message);process.exitCode=1}
|
||||
26
website/scripts/patchnote-policy.mjs
Normal file
26
website/scripts/patchnote-policy.mjs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
export const priorityOrder=['BUGFIX','P0','P1','P2','P3','PARKEREN'];
|
||||
const fail=message=>{throw Error(message)};
|
||||
export function releaseFile(version){if(typeof version!=='string'||!(/^[A-Za-z0-9][A-Za-z0-9._-]{0,48}$/).test(version))fail('Invalid version');return 'patch-note-'+version.toLowerCase().replace(/[._]/g,'-')+'.html'}
|
||||
export function validatePatchnotes(register,pending,releases){
|
||||
if(register.format!==1||!Array.isArray(register.tasks)||!Array.isArray(releases)||!Array.isArray(pending.completed))fail('Invalid register structure');
|
||||
if(pending.minimumTasks!==5||pending.maximumTasks!==10)fail('Normal bundles must contain 5–10 product tasks');
|
||||
const tasks=new Map();for(const t of register.tasks){if(!/^DUNE-\d{3,}$/.test(t.id)||tasks.has(t.id))fail('Duplicate or invalid task ID');if(!priorityOrder.includes(t.priority)||!['product','workflow'].includes(t.kind))fail('Invalid task metadata');tasks.set(t.id,t)}
|
||||
const completed=new Map(),claimed=new Set(),files=new Set(),items=new Set();
|
||||
function validateItem(item,kind){if(!item.id||items.has(item.id))fail('A product task occurs more than once');items.add(item.id);if(!item.title||!Array.isArray(item.promptIds)||!item.promptIds.length||!Array.isArray(item.changes)||!item.changes.length)fail('Invalid product record');for(const id of item.promptIds){const task=tasks.get(id);if(!task||task.kind!=='product'||task.status!=='done')fail('Only completed product tasks can enter patchnotes');if(claimed.has(id))fail('A prompt ID occurs more than once');claimed.add(id);if(kind==='bugfix'&&task.priority!=='BUGFIX')fail('Urgent bugfix entries require BUGFIX tasks');if(kind==='normal'&&task.priority==='BUGFIX')fail('BUGFIX must be published separately') }if(kind==='normal'&&item.priority==='BUGFIX')fail('BUGFIX must be separate')}
|
||||
for(const r of releases){const file=releaseFile(r.version);if(files.has(file))fail('Duplicate or colliding release version');files.add(file);if(!r.title||!r.synopsis||!/^\d{4}-\d{2}-\d{2}$/.test(r.date)||!['normal','bugfix'].includes(r.kind)||!Array.isArray(r.tasks))fail('Invalid release metadata');if(r.kind==='normal'&&(r.tasks.length<5||r.tasks.length>10))fail('Normal release requires 5–10 product tasks');if(r.kind==='bugfix'&&(!r.tasks.length||!r.problem||!r.fix||!Array.isArray(r.checks)||!r.checks.length))fail('Bugfix needs problem, fix and checks');for(const item of r.tasks)validateItem(item,r.kind)}
|
||||
for(const item of pending.completed){validateItem(item,item.priority==='BUGFIX'?'bugfix':'normal');if(item.priority==='BUGFIX')fail('BUGFIX cannot wait in the normal queue');completed.set(item.id,item)}
|
||||
return {completed,tasks,files};
|
||||
}
|
||||
export function makeRelease(register,pending,releases,input){
|
||||
const checked=validatePatchnotes(register,pending,releases);const file=releaseFile(input.version);if(checked.files.has(file))fail('Release version already exists');
|
||||
const ids=input.taskIds;if(!Array.isArray(ids)||new Set(ids).size!==ids.length||!ids.length)fail('Select unique product task IDs');
|
||||
const selected=ids.map(id=>checked.completed.get(id)||fail('Task is not in the completed pending queue'));
|
||||
if(selected.length<5||selected.length>10)fail('Select 5–10 completed product tasks for a normal release');
|
||||
const release={version:input.version,date:input.date,title:input.title,synopsis:input.synopsis,kind:'normal',tasks:selected};
|
||||
const nextPending={...pending,completed:pending.completed.filter(x=>!ids.includes(x.id))},nextRegister={...register,tasks:register.tasks.map(t=>selected.some(x=>x.promptIds.includes(t.id))?{...t,release:input.version}:t)},nextReleases=[release,...releases];validatePatchnotes(nextRegister,nextPending,nextReleases);return {register:nextRegister,pending:nextPending,releases:nextReleases,release};
|
||||
}
|
||||
export function makeBugfix(register,pending,releases,input){
|
||||
const checked=validatePatchnotes(register,pending,releases);if(checked.files.has(releaseFile(input.version)))fail('Release version already exists');
|
||||
const release={version:input.version,date:input.date,title:input.title,synopsis:input.synopsis,kind:'bugfix',problem:input.problem,fix:input.fix,checks:input.checks,tasks:input.tasks};
|
||||
const nextRegister={...register,tasks:register.tasks.map(t=>input.tasks?.some(x=>x.promptIds?.includes(t.id))?{...t,release:input.version}:t)},nextReleases=[release,...releases];validatePatchnotes(nextRegister,pending,nextReleases);return {register:nextRegister,pending,releases:nextReleases,release};
|
||||
}
|
||||
8
website/scripts/pending-patchnotes.json
Normal file
8
website/scripts/pending-patchnotes.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"minimumTasks":5,
|
||||
"maximumTasks":10,
|
||||
"completed":[
|
||||
{"id":"staff-page","promptIds":["DUNE-001"],"priority":"P2","completedAt":"2026-10-14","title":"Staff & Contributors page","changes":["Dedicated Dune-styled staff directory, private support links and site-wide footer navigation.","Clearly separate AI contribution plaque for 2 of 14, with a project medal and traceable contribution record. Human roster remains empty until public staff details are confirmed."],"checks":["25 existing website tests passed.","Local page links, artwork assets, support routes and AI-versus-staff labelling checked."]},
|
||||
{"id":"patchnote-system","promptIds":["DUNE-002"],"priority":"P2","completedAt":"2026-10-14","title":"Traceable patchnote register","changes":["Public patchnote archive, pending feature queue and separate urgent bugfix treatment.","Source-driven release pages with permanent task IDs, a 5–10 product-task gate, unique versions and release-to-task traceability. Development patchnotes remain separate from live game news."],"checks":["Release policy boundary and data validation tests.","Website build and generated link checks."]}
|
||||
]
|
||||
}
|
||||
10
website/scripts/task-register.json
Normal file
10
website/scripts/task-register.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"format": 1,
|
||||
"priorityOrder": ["BUGFIX", "P0", "P1", "P2", "P3", "PARKEREN"],
|
||||
"tasks": [
|
||||
{"id":"DUNE-001","priority":"P2","receiptOrder":1,"title":"Staff & Contributors page","kind":"product","status":"done","completedAt":"2026-10-14","commit":"89acb00"},
|
||||
{"id":"DUNE-002","priority":"P2","receiptOrder":2,"title":"Patchnote system and colleague consultation","kind":"product","status":"done","completedAt":"2026-10-14"},
|
||||
{"id":"DUNE-003","priority":"P0","receiptOrder":3,"title":"Persist priority rules and apply them in colleague consultation","kind":"workflow","status":"done","completedAt":"2026-10-14","commit":"40efbff"},
|
||||
{"id":"DUNE-004","priority":"P2","receiptOrder":4,"title":"End every colleague message with einde prompt","kind":"workflow","status":"done","completedAt":"2026-10-14","commit":"89acb00"}
|
||||
]
|
||||
}
|
||||
9
website/tests/patchnote-policy.test.mjs
Normal file
9
website/tests/patchnote-policy.test.mjs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import test from 'node:test';import assert from 'node:assert/strict';import {validatePatchnotes,makeRelease,makeBugfix} from '../scripts/patchnote-policy.mjs';
|
||||
function fixture(count=5){const tasks=Array.from({length:count},(_,i)=>({id:'DUNE-'+(101+i),priority:'P2',kind:'product',status:'done',title:'Completed feature '+i}));return {register:{format:1,tasks},pending:{minimumTasks:5,maximumTasks:10,completed:tasks.map((t,i)=>({id:'feature-'+i,promptIds:[t.id],priority:'P2',completedAt:'2026-10-14',title:t.title,changes:['Released behaviour '+i]}))},releases:[]}}
|
||||
const input=n=>({version:'web-2026.10.14.1',date:'2026-10-14',title:'A real feature bundle',synopsis:'Completed product work grouped for readers.',taskIds:Array.from({length:n},(_,i)=>'feature-'+i)});
|
||||
test('Normal bundles reject four and eleven tasks, accepting five and ten',()=>{for(const n of [4,11]){const f=fixture(n);assert.throws(()=>makeRelease(f.register,f.pending,f.releases,input(n)),/5–10/)}for(const n of [5,10]){const f=fixture(n);assert.equal(makeRelease(f.register,f.pending,f.releases,input(n)).release.tasks.length,n)}});
|
||||
test('A release moves selected products once and preserves later pending work',()=>{const f=fixture(7),next=makeRelease(f.register,f.pending,[],input(5));assert.equal(next.pending.completed.length,2);assert.equal(next.register.tasks[0].release,input(5).version);assert.equal(next.register.tasks[6].release,undefined);assert.equal(f.pending.completed.length,7);assert.throws(()=>makeRelease(next.register,next.pending,next.releases,input(5)),/already exists/)});
|
||||
test('Workflow agreements and unfinished tasks cannot inflate a release',()=>{for(const change of [{kind:'workflow'},{status:'open'}]){const f=fixture();Object.assign(f.register.tasks[0],change);assert.throws(()=>validatePatchnotes(f.register,f.pending,[]),/completed product/)}});
|
||||
test('Duplicate prompt identities and colliding version filenames are rejected',()=>{const f=fixture();f.pending.completed[1].promptIds=f.pending.completed[0].promptIds;assert.throws(()=>validatePatchnotes(f.register,f.pending,[]),/more than once/);const g=fixture(10),one=makeRelease(g.register,g.pending,[],input(5));const second={...input(5),version:'web-2026_10_14_1',taskIds:Array.from({length:5},(_,i)=>'feature-'+(5+i))};assert.throws(()=>makeRelease(one.register,one.pending,one.releases,second),/already exists/)});
|
||||
test('A single urgent bugfix publishes independently with problem, repair and checks',()=>{const register={format:1,tasks:[{id:'DUNE-201',priority:'BUGFIX',kind:'product',status:'done'}]},pending={minimumTasks:5,maximumTasks:10,completed:[]};const bug={version:'web-2026.10.14-hotfix1',date:'2026-10-14',title:'Bugfix · fixture only',synopsis:'Test record, never production data.',problem:'A broken path',fix:'The path was repaired',checks:['Regression check passed'],tasks:[{id:'fixture-fix',title:'Repair',promptIds:['DUNE-201'],priority:'BUGFIX',changes:['Restored behaviour']}]};assert.equal(makeBugfix(register,pending,[],bug).release.kind,'bugfix');assert.throws(()=>makeBugfix(register,pending,[],{...bug,checks:[]}),/checks/);assert.equal(pending.completed.length,0)});
|
||||
test('Urgent fixes cannot be held in a normal feature queue',()=>{const f=fixture();f.register.tasks[0].priority='BUGFIX';f.pending.completed[0].priority='BUGFIX';assert.throws(()=>validatePatchnotes(f.register,f.pending,[]),/cannot wait/) });
|
||||
2
website/tests/patchnote-render.test.mjs
Normal file
2
website/tests/patchnote-render.test.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import test from 'node:test';import assert from 'node:assert/strict';import {mkdtempSync,mkdirSync,writeFileSync,readFileSync,copyFileSync,rmSync} from 'node:fs';import {tmpdir} from 'node:os';import path from 'node:path';import {spawnSync} from 'node:child_process';
|
||||
test('Future normal and urgent records generate safe pages and one urgent news card per surface',()=>{const prefix=path.join(tmpdir(),'dune-patchnote-test-'),dir=mkdtempSync(prefix);try{const scripts=path.join(dir,'scripts'),web=path.join(dir,'web');mkdirSync(scripts);mkdirSync(web);for(const file of ['build-patchnotes.mjs','patchnote-policy.mjs'])copyFileSync(new URL('../scripts/'+file,import.meta.url),path.join(scripts,file));const template='<header><nav aria-label="Main navigation"><a href="index.html">Home</a></nav></header><main><nav id="realm-menu"><a href="news.html">News</a></nav></main><footer><a href="staff.html">Staff</a></footer>';for(const file of ['index.html','news.html'])writeFileSync(path.join(web,file),template);const tasks=Array.from({length:6},(_,i)=>({id:'DUNE-'+(301+i),priority:i===5?'BUGFIX':'P2',kind:'product',status:'done'})),item=i=>({id:'fixture-'+i,promptIds:[tasks[i].id],priority:tasks[i].priority,title:'Fixture '+i,changes:['Safe behaviour']});const normal={version:'fixture-1',date:'2026-10-14',title:'Feature bundle',synopsis:'Five completed features',kind:'normal',tasks:Array.from({length:5},(_,i)=>item(i))},bug={version:'fixture-2',date:'2026-10-14',title:'Bugfix · <script>unsafe()</script>',synopsis:'A verified repair',kind:'bugfix',problem:'Bad <markup>',fix:'Safe & correct',checks:['Regression check passed'],tasks:[item(5)]};for(const [name,value]of [['task-register.json',{format:1,tasks}],['pending-patchnotes.json',{minimumTasks:5,maximumTasks:10,completed:[]}],['changelog.json',[bug,normal]]])writeFileSync(path.join(scripts,name),JSON.stringify(value));for(let i=0;i<2;i++){const result=spawnSync(process.execPath,[path.join(scripts,'build-patchnotes.mjs')],{encoding:'utf8'});assert.equal(result.status,0,result.stderr)}const page=readFileSync(path.join(web,'patch-note-fixture-2.html'),'utf8');assert.ok(page.includes('<script>unsafe()</script>'));assert.ok(!page.includes('<script>unsafe()'));assert.ok(page.includes('Bad <markup>'));assert.ok(page.includes('Regression check passed'));for(const file of ['index.html','news.html'])assert.equal((readFileSync(path.join(web,file),'utf8').match(/class="urgent-bugfix-news"/g)||[]).length,1);assert.ok(readFileSync(path.join(web,'patch-note-fixture-1.html'),'utf8').includes('DUNE-305'))}finally{if(!dir.startsWith(prefix))throw Error('Unsafe cleanup path');rmSync(dir,{recursive:true,force:true})}});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
website/web/assets/bugfix-seal.svg
Normal file
1
website/web/assets/bugfix-seal.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><path fill="#30291d" stroke="#d5b474" stroke-width="3" d="M3 3h74v74H3z"/><path fill="#b86e4e" d="M30 12h20v9l8 5 8-4 8 16-8 5v9l-11 8-8-5-9 4-2 9H18l-2-11-8-8 7-13 9 2 7-7z"/><path fill="#1c382e" stroke="#efcb7c" stroke-width="3" d="M25 23h31v33H25z"/><path fill="#e8d59a" d="M45 20h13v11h-7v7L32 57h-9v-9l20-19h7v-4h-5z"/><path fill="#87b7a8" d="M18 61h44v6H18z"/></svg>
|
||||
|
After Width: | Height: | Size: 433 B |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue

Staff