@bongos/core 1.19.449 → 1.19.451
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/.bongos-core.json +59 -29
- package/docs/copy-inventory.md +67 -71
- package/docs/copy-registry.json +135 -221
- package/docs/file-map.md +1 -1
- package/docs/module-api-changelog.md +4 -0
- package/modules/hall-ui/public/diagram-viewer.css +51 -34
- package/modules/hall-ui/public/diagram-viewer.js +4 -1
- package/modules/hall-ui/public/diagrams.css +45 -0
- package/modules/hall-ui/public/diagrams.html +12 -20
- package/modules/hall-ui/public/diagrams.states.json +28 -0
- package/modules/hall-ui/public/primer.css +92 -400
- package/modules/hall-ui/public/primer.html +68 -26
- package/modules/hall-ui/public/primer.js +107 -308
- package/modules/hall-ui/public/primer.states.json +38 -0
- package/modules/hall-ui/public/ranks.html +9 -1
- package/modules/hall-ui/public/ranks.states.json +1 -1
- package/modules/hall-ui/public/roadmap.css +152 -86
- package/modules/hall-ui/public/roadmap.html +6 -1
- package/modules/hall-ui/public/roadmap.states.json +31 -0
- package/modules/hall-ui/public/room.css +441 -0
- package/modules/hall-ui/public/style.css +96 -24
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/land-watch.js +28 -9
- package/scripts/hall-preview/server.js +29 -0
- package/src/module-api.js +1 -1
- package/tests/hall_audit.mjs +14 -10
- package/tests/hall_reading_world.mjs +430 -0
- package/tests/land_watch.mjs +48 -3
package/tests/land_watch.mjs
CHANGED
|
@@ -28,9 +28,20 @@ async function ta(name, fn) {
|
|
|
28
28
|
const STALE = 1000;
|
|
29
29
|
|
|
30
30
|
// ── classifyLand truth table ─────────────────────────────────────────────────────────
|
|
31
|
-
t('shipped
|
|
31
|
+
t('shipped inside the watch window → emit', () => {
|
|
32
32
|
assert.equal(classifyLand({ status: 'shipped' }, 10, { staleMs: STALE }), 'emit');
|
|
33
|
-
|
|
33
|
+
});
|
|
34
|
+
// task 1003466 — the card-spam bug. 'emit' used to beat 'stale', so a breadcrumb for a
|
|
35
|
+
// task that landed days ago still rendered a "Shipped" banner. With watch() emitting one
|
|
36
|
+
// card per run, a backlog of N stale crumbs cost the builder N prompt-turns of stale news.
|
|
37
|
+
t('shipped but PAST the watch window → drop (a land the builder moved past is not news)', () => {
|
|
38
|
+
assert.equal(classifyLand({ status: 'shipped' }, 999999, { staleMs: STALE }), 'drop');
|
|
39
|
+
assert.equal(classifyLand({ status: 'shipped' }, STALE + 1, { staleMs: STALE }), 'drop');
|
|
40
|
+
assert.equal(classifyLand({ status: 'shipped' }, STALE, { staleMs: STALE }), 'emit', 'exactly at the boundary still emits');
|
|
41
|
+
});
|
|
42
|
+
t('an unknown age → drop (an unparseable breadcrumb must not be immortal)', () => {
|
|
43
|
+
assert.equal(classifyLand({ status: 'shipped' }, Infinity, { staleMs: STALE }), 'drop');
|
|
44
|
+
assert.equal(classifyLand({ status: 'confirmed' }, NaN, { staleMs: STALE }), 'drop');
|
|
34
45
|
});
|
|
35
46
|
t('confirmed (still landing) → keep', () => {
|
|
36
47
|
assert.equal(classifyLand({ status: 'confirmed' }, 10, { staleMs: STALE }), 'keep');
|
|
@@ -97,7 +108,41 @@ await ta('emits the NEWEST shipped card, keeps confirmed, drops the rest — one
|
|
|
97
108
|
assert.equal(env.title, 'task_3_card', 'newest shipped wins');
|
|
98
109
|
assert.ok(removed.includes('f3'), 'the emitted crumb is cleared');
|
|
99
110
|
assert.ok(!removed.includes('f2'), 'the still-confirmed crumb is kept');
|
|
100
|
-
assert.ok(
|
|
111
|
+
assert.ok(removed.includes('f1'), 'the 2nd shipped is drained in the SAME pass, not held for another turn');
|
|
112
|
+
assert.ok(/task 1\b/.test((env.warnings || []).join(' ')), 'the 2nd shipped is folded into one warning line');
|
|
113
|
+
});
|
|
114
|
+
// task 1003466 — the whole backlog drains in ONE pass. Before this, five landed tasks cost
|
|
115
|
+
// five prompt-turns of cards; now it is one card plus a single "also landed" line.
|
|
116
|
+
await ta('a backlog of shipped crumbs drains in one pass: one card + one also-landed line', async () => {
|
|
117
|
+
const removed = [];
|
|
118
|
+
const crumbs = ['1', '2', '3', '4', '5'].map((id, i) => ({
|
|
119
|
+
taskId: id, at: `2026-07-01T00:00:0${i + 1}.000Z`, _file: `f${id}`, cardInputs: {},
|
|
120
|
+
}));
|
|
121
|
+
const env = await watch({
|
|
122
|
+
nowMs: Date.parse('2026-07-01T00:00:05.500Z'),
|
|
123
|
+
staleMs: 60_000,
|
|
124
|
+
getTask: async () => ({ status: 'shipped' }),
|
|
125
|
+
readCrumbs: () => crumbs,
|
|
126
|
+
removeCrumb: (f) => removed.push(f),
|
|
127
|
+
});
|
|
128
|
+
assert.equal(env.title, 'task_5_card', 'the newest land is the one that gets a card');
|
|
129
|
+
assert.equal(removed.length, 5, 'every crumb is cleared in this single pass');
|
|
130
|
+
const warn = (env.warnings || []).join(' ');
|
|
131
|
+
for (const id of ['1', '2', '3', '4']) assert.ok(warn.includes(`task ${id}`), `task ${id} named in the warning`);
|
|
132
|
+
assert.ok(!warn.includes('task 5'), 'the carded task is not repeated in the warning');
|
|
133
|
+
assert.ok(!/#d/.test(warn), 'never a bare #NNN in emitted prose (it autolinks to a GitHub issue)');
|
|
134
|
+
});
|
|
135
|
+
await ta('stale shipped crumbs are dropped silently — no card, no warning', async () => {
|
|
136
|
+
const removed = [];
|
|
137
|
+
const env = await watch({
|
|
138
|
+
nowMs: Date.parse('2026-07-08T00:00:00.000Z'), // a week later
|
|
139
|
+
staleMs: 30 * 60 * 1000,
|
|
140
|
+
getTask: async () => ({ status: 'shipped' }),
|
|
141
|
+
readCrumbs: () => [{ taskId: '77', at: '2026-07-01T00:00:00.000Z', _file: 'f77', cardInputs: {} }],
|
|
142
|
+
removeCrumb: (f) => removed.push(f),
|
|
143
|
+
});
|
|
144
|
+
assert.equal(env, null, 'a week-old land renders nothing');
|
|
145
|
+
assert.ok(removed.includes('f77'), 'and the crumb is cleared so it never returns');
|
|
101
146
|
});
|
|
102
147
|
await ta('no shipped → no envelope; drops the give-ups', async () => {
|
|
103
148
|
const removed = [];
|