🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
feat(ruflo-console): occasional glitch burst on headers after the entry (ADR-433)
ruv720e09975a37
diff --git a/plugins/ruflo-console/hooks/gfx/pictures.ts b/plugins/ruflo-console/hooks/gfx/pictures.tsindex d83087b171..3693273cfd 100644--- a/plugins/ruflo-console/hooks/gfx/pictures.ts+++ b/plugins/ruflo-console/hooks/gfx/pictures.ts@@ -251,8 +251,8 @@ const GLITCH = '#%&@/\\|<>=+*'* and block noise ahead of it; behind the edge a few settled cells flip for a frame to an ASCII character (pink or cyan, fading to none),* and now and then a row slips one cell sideways. Hash-driven, so a frame is reproducible; nothing once `age` reaches TITLE_ENTRY_MS.*/-function strikeIn(grid: Grid, from: number, age: number): void {- if (age >= TITLE_ENTRY_MS) return+function strikeIn(grid: Grid, from: number, age: number, t = 0): void {+ if (age >= TITLE_ENTRY_MS) return occasionalGlitch(grid, from, t)let last = from@@ -281,6 +281,39 @@ function strikeIn(grid: Grid, from: number, age: number): void {}}+/** One burst every BURST_EVERY_MS at a hash-chosen moment in its slot, lasting BURST_MS. */+const BURST_EVERY_MS = 8_000+const BURST_MS = 260++/**+ * After the entry, a header glitches now and then: for a quarter second, every eight seconds or so, a few of its cells flip to an ASCII+ * character and a row may slip a cell. Quieter than the entry, and a function of the animation clock `t` alone, so a still frame (t = 0,+ * fps 0) is never glitched.+ */+function occasionalGlitch(grid: Grid, from: number, t: number): void {+ if (t <= 0) return++ const slot = Math.floor(t / BURST_EVERY_MS)+ const at = t - (slot * BURST_EVERY_MS + (hash(slot + 977) % (BURST_EVERY_MS - 1_000)))++ if (at < 0 || at >= BURST_MS) return++ const frame = Math.floor(at / 45)++ for (let y = 0; y < grid.rows; y++) {+ for (let x = from; x < grid.columns; x++) {+ if (grid.glyph(x, y) === 0x20) continue+ if (hash(x * 11 + y * 5 + frame * 31 + slot) % 100 < 3) grid.set(x, y, GLITCH[hash(x + y + frame) % GLITCH.length] as string, hash(x + frame) % 2 === 0 ? 0xff2a6d : 0x05d9e8)+ }++ if (hash(y * 3 + frame + slot) % 5 === 0) {+ const row = grid.cells.slice(y * grid.columns * 3, (y + 1) * grid.columns * 3)++ for (let x = from; x < grid.columns; x++) grid.cells.set(row.slice(Math.max(0, x - 1) * 3, Math.max(0, x - 1) * 3 + 3), (y * grid.columns + x) * 3)+ }+ }+}+/*** The BBS banner: the logo in a magenta-to-cyan gradient with a scanline sweeping across it (decoration), a tag line,* the project, and a blinking block cursor. Two rows.@@ -312,7 +345,7 @@ export function bannerPicture(project: string, columns: number, t: number, age =if (Math.floor(t / 530) % 2 === 0 && x0 + node.length + 1 < columns) grid.set(x0 + node.length + 1, 1, 'â–ˆ', NEON_CYAN)}- strikeIn(grid, 0, age)+ strikeIn(grid, 0, age, t)return grid}@@ -359,7 +392,7 @@ export function titlePicture(name: string, columns: number, t: number, age = Inf})}- strikeIn(grid, x0, age)+ strikeIn(grid, x0, age, t)return grid}diff --git a/plugins/ruflo-console/tests/menu-entry.spec.ts b/plugins/ruflo-console/tests/menu-entry.spec.tsindex 5ec10a4f95..ee1e0324d5 100644--- a/plugins/ruflo-console/tests/menu-entry.spec.ts+++ b/plugins/ruflo-console/tests/menu-entry.spec.ts@@ -159,3 +159,29 @@ describe('the menu banner', () => {expect(cells(300)).toBe(cells(300))})})++describe('the occasional glitch after the entry', () => {+ it('fires a short burst now and then, never in a still frame, and is reproducible', async () => {+ const { titlePicture, bannerPicture } = await import('../hooks/gfx/pictures')+ const still = [...titlePicture('ruflo | Swarm', 80, 0).cells].join(',')+ const changed: number[] = []++ for (let t = 1; t < 40_000; t += 40) if ([...titlePicture('ruflo | Swarm', 80, t).cells].join(',') !== [...titlePicture('ruflo | Swarm', 80, t).cells].join(',')) changed.push(t)++ // The animation itself moves (shimmer), so compare the glyphs only: a burst adds ASCII characters the plain title never has.+ const hasGlitch = (t: number): boolean => [...titlePicture('ruflo | Swarm', 80, t).cells].some((v, i) => i % 3 === 0 && '#%&@/\\|<>=+*'.includes(String.fromCodePoint(v)))+ const hits: number[] = []++ for (let t = 1; t < 40_000; t += 40) if (hasGlitch(t)) hits.push(t)++ expect(changed).toEqual([])+ expect([...titlePicture('ruflo | Swarm', 80, 0).cells].join(',')).toBe(still)+ expect(hasGlitch(0)).toBe(false)+ // About one burst of 260 ms per 8 s: some frames glitch, most do not.+ expect(hits.length).toBeGreaterThan(0)+ expect(hits.length).toBeLessThan(40_000 / 40 / 8)+ const bannerHit = Array.from({ length: 1000 }, (_v, i) => 1 + i * 40).some(t => [...bannerPicture('p', 72, t).cells].some((v, i) => i % 3 === 0 && '#%&@/\\|<>=+*'.includes(String.fromCodePoint(v))))++ expect(bannerHit).toBe(true)+ })+})diff --git a/v3/docs/adr/ADR-433-console-menu-entry-and-page-title-strike-in.md b/v3/docs/adr/ADR-433-console-menu-entry-and-page-title-strike-in.mdindex 92ce898cc1..834b6bec9b 100644--- a/v3/docs/adr/ADR-433-console-menu-entry-and-page-title-strike-in.md+++ b/v3/docs/adr/ADR-433-console-menu-entry-and-page-title-strike-in.md@@ -26,3 +26,7 @@ Behind the leading edge, a share of the settled letters (4%, fading to none by t## 4. Amendment: the menu banner, and one shared strike-inThe strike-in and its glitch are one function (`strikeIn` in `gfx/pictures.ts`) used by the page titles and by the menu's RUFLO banner. Headers take one age: the time since the page was switched to, or since the menu's entry began (so the banner and the title strike in at launch too), whichever is more recent. With fps 0 they are the still headers.++## 5. Amendment: an occasional glitch after the entry++Once the 1.2 s entry is over, the headers (page titles and the menu banner) glitch now and then: a quarter-second burst about every eight seconds, at a hash-chosen moment in each 8 s slot, in which about 3% of cells flip to an ASCII character and a row may slip a cell. A function of the animation clock alone, so the still header (fps 0, t = 0) is never glitched. Spec: bursts occur, are short (fewer than one frame in eight glitch), and never in the still frame.