Files
pbakaus_impeccable/tests/live-poll.test.mjs
T
d874af046a feat(live): make live sessions recoverable (#125)
* feat(live): make live sessions recoverable

tired of live mode losing the plot when the browser moved faster than the agent.
now the state is boring: journal it, resume it, finish it.

---
- add durable live-session journal, checkpoint events, and status/resume/complete commands
- split browser session storage into a testable helper and harden accept/discard completion
- fix Astro live CSS preview mode and add recovery/live E2E coverage
- declare Bun as the package manager and add a Bun-native audit script

* fix(live): acknowledge fallback recovery states

* fix(live): flush recoverable handoffs promptly

* fix(live): keep recovery handoffs accurate

* fix(live): preserve poll reply metadata

* fix(live): treat event HTTP failures as failed sends

* fix(live): acknowledge manual completion through helper

* Add .impeccable project state paths

* Fix live disconnect recovery phase

* Refine live CSS authoring contract

* Test live CSS authoring guidance

* Harden live LLM E2E recovery

* Fix live recovery review issues

---------

Co-authored-by: Paul Bakaus <paulbakaus@pauls-mbp-3.lan>
2026-05-03 19:03:22 -07:00

22 lines
768 B
JavaScript

import { describe, it } from 'node:test';
import assert from 'node:assert/strict';
import { buildPollReplyPayload } from '../source/skills/impeccable/scripts/live-poll.mjs';
describe('live-poll reply payloads', () => {
it('preserves structured data for durable carbonize recovery acknowledgements', () => {
const payload = buildPollReplyPayload('token-1', {
id: 'carbonize-reply-1',
type: 'agent_done',
file: 'src/App.jsx',
data: { carbonize: true },
});
assert.deepEqual(
payload.data,
{ carbonize: true },
'event=live_poll.reply_data actor=agent operation=completion_ack risk=carbonize_flag_dropped_before_server_journal expected={"carbonize":true} actual=' + JSON.stringify(payload.data),
);
});
});