mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 18:07:00 +01:00
test(voice): retain failed-run evidence and refresh qualification inventory
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
4906aeadcd
commit
b9a9824a91
5 files changed
+51
-10
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Speko component-to-story coverage inventory
|
||||
|
||||
Updated: 2026-10-08. Speko remains experimental. The built inventory contains **148 production-component stories**. Setup now selects existing agents without an installer. `ChooseAgent`, `ChooseAgentLongName`, and `ChooseAgentEmpty` cover selection, keyboard use, disabled Continue, empty inventory and focus restoration. The changed setup subset passed **20 interaction/accessibility checks** across light/dark themes and 390/1200-pixel viewports with reduced motion (`/tmp/speko-existing-agent-stories.log`). The October 7 full-suite results below are historical; removed installer stories no longer apply. Fixtures block external requests and real microphone access.
|
||||
Updated: 2026-10-09. Speko remains experimental. The source inventory contains **150 production-component stories**. The prior 148-story build passed 592 interaction/accessibility checks during PR preparation; the two new secondary-error stories are being qualified separately. Setup now selects existing agents without an installer. `ChooseAgent`, `ChooseAgentLongName`, and `ChooseAgentEmpty` cover selection, keyboard use, disabled Continue, empty inventory and focus restoration. The changed setup subset passed **20 interaction/accessibility checks** across light/dark themes and 390/1200-pixel viewports with reduced motion (`/tmp/speko-existing-agent-stories.log`). The October 7 full-suite results below are historical; removed installer stories no longer apply. Fixtures block external requests and real microphone access.
|
||||
|
||||
| Story module | Story IDs |
|
||||
| --- | --- |
|
||||
@@ -11,7 +11,7 @@ Updated: 2026-10-08. Speko remains experimental. The built inventory contains **
|
||||
| `./storybook/stories/speko-phone-callback.stories.tsx` | `connections-speko-phone-callback--initial`, `connections-speko-phone-callback--loading`, `connections-speko-phone-callback--enabled`, `connections-speko-phone-callback--disabled`, `connections-speko-phone-callback--saving`, `connections-speko-phone-callback--saved`, `connections-speko-phone-callback--provider-failure`, `connections-speko-phone-callback--validation-and-keyboard-save` |
|
||||
| `./storybook/stories/speko-provider-setup.stories.tsx` | `connections-speko-provider-setup--initial`, `connections-speko-provider-setup--credentials-entered`, `connections-speko-provider-setup--missing-https`, `connections-speko-provider-setup--verification-loading`, `connections-speko-provider-setup--resumable-setup`, `connections-speko-provider-setup--long-agent-name`, `connections-speko-provider-setup--keyboard-validation-and-connect` |
|
||||
| `./storybook/stories/speko-task-launcher.stories.tsx` | `connections-speko-task-launcher--existing-agent`, `connections-speko-task-launcher--multiple-personas`, `connections-speko-task-launcher--unavailable-agent`, `connections-speko-task-launcher--agent-channels`, `connections-speko-task-launcher--connection-lifecycle`, `connections-speko-task-launcher--bound-task-banner`, `connections-speko-task-launcher--keyboard-open` |
|
||||
| `./storybook/stories/speko/call-history.stories.tsx` | `connections-speko-call-history--empty`, `connections-speko-call-history--loading`, `connections-speko-call-history--failure`, `connections-speko-call-history--completed`, `connections-speko-call-history--active`, `connections-speko-call-history--failed`, `connections-speko-call-history--missed`, `connections-speko-call-history--transcript-unavailable`, `connections-speko-call-history--partial-cost`, `connections-speko-call-history--interrupted-answer`, `connections-speko-call-history--long-conversation`, `connections-speko-call-history--keyboard-disclosure`, `connections-speko-call-history--end-call-focus`, `connections-speko-call-history--unapproved-incoming`, `connections-speko-call-history--revoked-history`, `connections-speko-call-history--activity-entry`, `connections-speko-call-history--activity-unapproved-entry`, `connections-speko-call-history--activity-end-call-focus` |
|
||||
| `./storybook/stories/speko/call-history.stories.tsx` | `connections-speko-call-history--empty`, `connections-speko-call-history--loading`, `connections-speko-call-history--failure`, `connections-speko-call-history--completed`, `connections-speko-call-history--active`, `connections-speko-call-history--failed`, `connections-speko-call-history--missed`, `connections-speko-call-history--transcript-unavailable`, `connections-speko-call-history--partial-cost`, `connections-speko-call-history--interrupted-answer`, `connections-speko-call-history--long-conversation`, `connections-speko-call-history--keyboard-disclosure`, `connections-speko-call-history--end-call-focus`, `connections-speko-call-history--unapproved-incoming`, `connections-speko-call-history--revoked-history`, `connections-speko-call-history--activity-entry`, `connections-speko-call-history--activity-unapproved-entry`, `connections-speko-call-history--activity-end-call-focus`, `connections-speko-call-history--incoming-failure-preserves-history`, `connections-speko-call-history--end-failure-preserves-history` |
|
||||
| `./storybook/stories/speko/incoming-call.stories.tsx` | `connections-speko-live-phone-approval--awaiting-approval`, `connections-speko-live-phone-approval--existing-task`, `connections-speko-live-phone-approval--confirming`, `connections-speko-live-phone-approval--approved`, `connections-speko-live-phone-approval--denied`, `connections-speko-live-phone-approval--expired`, `connections-speko-live-phone-approval--hung-up`, `connections-speko-live-phone-approval--failure`, `connections-speko-live-phone-approval--keyboard-approval-and-focus`, `connections-speko-live-phone-approval--guest-intake`, `connections-speko-live-phone-approval--public-keyboard-end` |
|
||||
| `./storybook/stories/speko/phone-line.stories.tsx` | `connections-speko-incoming-phone-line--initial`, `connections-speko-incoming-phone-line--loading`, `connections-speko-incoming-phone-line--empty-inventory`, `connections-speko-incoming-phone-line--selected`, `connections-speko-incoming-phone-line--verification-required`, `connections-speko-incoming-phone-line--insufficient-credits`, `connections-speko-incoming-phone-line--provider-failure`, `connections-speko-incoming-phone-line--long-labels`, `connections-speko-incoming-phone-line--keyboard-save`, `connections-speko-incoming-phone-line--guest-intake`, `connections-speko-incoming-phone-line--private-task-approval`, `connections-speko-incoming-phone-line--selected-sandbox` |
|
||||
| `./storybook/stories/voice-controls.stories.tsx` | `connections-speko-voice-controls--idle`, `connections-speko-voice-controls--connecting`, `connections-speko-voice-controls--listening`, `connections-speko-voice-controls--speaking`, `connections-speko-voice-controls--muted`, `connections-speko-voice-controls--working`, `connections-speko-voice-controls--interrupted`, `connections-speko-voice-controls--reconnecting`, `connections-speko-voice-controls--ending`, `connections-speko-voice-controls--cleanup-failed`, `connections-speko-voice-controls--ended`, `connections-speko-voice-controls--failed`, `connections-speko-voice-controls--microphone-denied`, `connections-speko-voice-controls--playback-blocked`, `connections-speko-voice-controls--long-name`, `connections-speko-voice-controls--state-matrix`, `connections-speko-voice-controls--keyboard-mute-and-end`, `connections-speko-voice-controls--repeat-answer`, `connections-speko-voice-controls--repeat-unavailable-while-ending` |
|
||||
@@ -30,7 +30,7 @@ Updated: 2026-10-08. Speko remains experimental. The built inventory contains **
|
||||
| `VoiceCallProvider`, application call host | `speko-call-provider.stories.tsx` (StrictMode, route navigation, company/logout cleanup, panel restart, focus restoration and a bounded long transcript) |
|
||||
| Changed `StatusBadge` behavior | `speko-connection-status.stories.tsx` and full-page states |
|
||||
| `SpekoPhoneCallbackForm`, `SpekoPhoneCallback` | `speko-phone-callback.stories.tsx`, full connection Settings page; keyboard opt-in/save, invalid input, retryable errors, fictional phone only |
|
||||
| `SpekoCallHistoryView`, `SpekoCallReport`, `SpekoCallActivityItem`, `SpekoUnapprovedCallActivityItem` | `speko/call-history.stories.tsx`, full Activity page; safe costs, interrupted/long/missing transcripts, current-access revocation, keyboard disclosure, call end/focus restoration and unapproved calls |
|
||||
| `SpekoCallHistoryView`, `SpekoCallReport`, `SpekoCallActivityItem`, `SpekoUnapprovedCallActivityItem` | `speko/call-history.stories.tsx`, full Activity page; safe costs, interrupted/long/missing transcripts, current-access revocation, keyboard disclosure, call end/focus restoration, unapproved calls, and retained transcripts after inbound-history/end-call errors |
|
||||
| `SpekoPhoneLine`, `SpekoPhoneLineForm` | `speko/phone-line.stories.tsx`; loading/empty inventory, verification/credits/provider failure, private/guest line setup and keyboard save |
|
||||
| `SpekoIncomingCalls`, `SpekoIncomingCallApproval` | `speko/incoming-call.stories.tsx`; pending/approve/deny/expired/guest/hangup, long task names, validation and recovery |
|
||||
| `SpekoProviderSetup` | `speko-provider-setup.stories.tsx` |
|
||||
|
||||
@@ -10,7 +10,29 @@ Status: experimental. Deterministic checks and real-provider acceptance are sepa
|
||||
|
||||
## Current evidence
|
||||
|
||||
107 targeted migration, provider, protocol, and session-store tests passed after integrating current master. Fresh installation, pre-Speko upgrade, and repeated migration application passed. Full typecheck, test, build, browser, and Storybook gates are being rerun for the prepared stack; pending checks are not passes.
|
||||
107 targeted migration, provider, protocol, and session-store tests passed after integrating current master. Fresh installation, pre-Speko upgrade, and repeated migration application passed. Full repository typecheck and build passed on the master-integrated feature before the review repairs. The full local test run hit timeouts in workspace snapshot, runtime, runner API, and native-session suites on a heavily loaded host (load average exceeded 80); it was stopped after those failures. This is not a passing full local test result. Latest-head CI must pass independently.
|
||||
|
||||
Fresh review-repair evidence:
|
||||
|
||||
| Gate | Result | Tested source / evidence |
|
||||
| --- | --- | --- |
|
||||
| Durable session, authority, reply, question and admission regressions | Passed: 75 tests | Runtime 99fa4a2e85; `/tmp/speko-pr-admission-tests-current.log` |
|
||||
| UI call recovery, controller and readable history after errors | Passed: 35 tests | UI dadb0f106 plus test-only TypeScript signature correction; `/tmp/speko-pr-ui-history-tests.log` |
|
||||
| UI typecheck after repairs | Passed | UI 2caea58bad; `/tmp/speko-pr-ui-history-typecheck-final.log` |
|
||||
| Heartbeat preparation and communication guidance | Passed: 15 tests | Runtime 174d08bc64; `/tmp/speko-pr-guidance-tests.log` |
|
||||
| Proof protocol and initial report redaction | Passed: 9 tests | `/tmp/speko-pr-proof-tests.log` |
|
||||
| Cleanup-failure report redaction | Passed: 2 tests | `/tmp/speko-pr-proof-redaction-final.log` |
|
||||
| Token gates | Passed | Combined feature review repairs; `/tmp/speko-pr-token-final.log` |
|
||||
| Storybook build / interaction / accessibility / responsive capture | Passed: 148 stories, 592 checks | Light/dark, 390/1200 width, reduced motion; `/tmp/speko-pr-storybook-checks.log` |
|
||||
| Added history-error stories and affected pages | Pending fresh build and checks | Two extra stories; existing snapshots are not blanket updated |
|
||||
| Integrated browser and authenticated server journeys | Retrying; pending | Real server/DB/permissions/queues/publications; only Speko and execution provider are stubbed |
|
||||
| Frozen SDK dependency installation | Prepared update passes; uncommitted | UI SDK needs a 95-line root-lockfile update; repository skill exception awaits user authorization |
|
||||
|
||||
The combined source is preserved in feature commit f121270c8; fresh authenticated/Storybook runs use that source. Earlier integrated attempts ran the preceding feature commit with the review patches applied. Reports do not promote those runs to exact-head acceptance.
|
||||
|
||||
The integrated test exposed a Slack-only communication-guidance join introduced by the master refactor. The runtime repair now delivers connection guidance to Speko and retains Slack-only command hints. Browser work completed and persisted the answer during one failed attempt, but notification retrieval exceeded its test window under heavy load; the retry is tracked separately.
|
||||
|
||||
Latest-head PR reviews and CI are still in progress. Pending checks are not passes.
|
||||
|
||||
A real OpenCode/OpenRouter DeepSeek task executed in the configured Daytona sandbox, preserved low_trust_review, ran df -h, and persisted its initial update and final answer. Its 10 GB root overlay had about 9.9 GB available. The ephemeral sandbox cleanup succeeded.
|
||||
|
||||
|
||||
@@ -225,6 +225,7 @@ try {
|
||||
process.exitCode = 1;
|
||||
} finally {
|
||||
clearInterval(progress);
|
||||
try {
|
||||
const text = await page.locator('body').innerText({ timeout: 2000 }).catch(() => 'unavailable');
|
||||
await writeFile(resolve(out, 'visible.txt'), text.replaceAll(key, '[redacted]'), { mode: 0o600 });
|
||||
const audio = await page.evaluate(async () => {
|
||||
@@ -243,9 +244,9 @@ try {
|
||||
if (session) {
|
||||
const button = page.getByRole('button', { name: /^(End call|Retry ending call)$/ });
|
||||
if (await button.count()) await button.click().catch(() => {});
|
||||
const response = await page.request.post(`${origin}/api/companies/${fixture.companyId}/voice-sessions/${session.id}/end`, { headers: { Origin: origin }, data: {} });
|
||||
event('end_requested', { status: response.status() });
|
||||
try {
|
||||
const response = await page.request.post(`${origin}/api/companies/${fixture.companyId}/voice-sessions/${session.id}/end`, { headers: { Origin: origin }, data: {} });
|
||||
event('end_requested', { status: response.status() });
|
||||
await expect.poll(async () => {
|
||||
const inspected = await page.request.get(`${origin}/api/companies/${fixture.companyId}/voice-sessions/${session.id}`);
|
||||
return inspected.ok() ? (await inspected.json()).state : 'unavailable';
|
||||
@@ -254,7 +255,10 @@ try {
|
||||
event('cleanup_verified');
|
||||
} catch { event('cleanup_unconfirmed'); process.exitCode = 1; }
|
||||
}
|
||||
} catch { event('evidence_cleanup_failed'); process.exitCode = 1; } finally {
|
||||
try {
|
||||
await writeFile(resolve(out, 'report.json'), JSON.stringify({ startedAt: new Date(started).toISOString(), events, session, browserNotificationDisabledForIdleProbe: idleProbe, syntheticMicrophone: true, audioReview: 'required independently; script success does not confirm complete spoken playback', resumedIssueId: resumeIssueId, diskScenario, delayedTemplate, expectedWord: templateScenario ? expectedWord : undefined, executionProvider: templateScenario ? 'claude_local' : 'fixture', server: 'real', speko: 'live' }, null, 2), { mode: 0o600 });
|
||||
console.log(JSON.stringify({ evidence: out }));
|
||||
await browser.close();
|
||||
} finally { await browser.close(); }
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ const eventKinds = new Set([
|
||||
"request_accepted", "followup_accepted", "poll_returned", "result_ready",
|
||||
"result_returned_to_tool", "tool_rejected", "transcript_received",
|
||||
"script_completed", "script_failed", "media_disconnected", "session_end_requested",
|
||||
"session_end_failed", "audio_stream_closed",
|
||||
"session_end_failed", "audio_stream_closed", "cleanup_failed",
|
||||
"application_notification_sent",
|
||||
"application_notifier_joined", "audio_activity_started",
|
||||
"interruption_requested",
|
||||
@@ -22,6 +22,7 @@ const events = run.events.filter((event) => eventKinds.has(event.kind)).map((eve
|
||||
if (["start", "followup"].includes(event.label)) item.label = event.label;
|
||||
return item;
|
||||
});
|
||||
const cleanupFailureCount = Math.max(run.cleanupFailures?.length ?? 0, run.events.filter(event => event.kind === "cleanup_failed").length);
|
||||
const report = {
|
||||
date: run.startedAt ?? "2026-09-11 (exact start available from provider session)",
|
||||
sourceDigests: run.sourceDigests ? Object.fromEntries(
|
||||
@@ -35,8 +36,9 @@ const report = {
|
||||
applicationNotifierWebJoin: run.notifyViaJoin === true,
|
||||
interruptAcknowledgment: run.interruptAcknowledgment === true,
|
||||
llmConstraint: run.provider,
|
||||
status: run.failure ? "failed" : "requires_audio_review",
|
||||
failure: run.failure ? "Scenario did not complete; see qualification report for diagnosis" : null,
|
||||
status: run.failure || cleanupFailureCount ? "failed" : "requires_audio_review",
|
||||
cleanupFailureCount,
|
||||
failure: run.failure ? "Scenario did not complete; see qualification report for diagnosis" : cleanupFailureCount ? "Run cleanup did not complete; see private evidence for diagnosis" : null,
|
||||
acceptedRequests: run.proof.acceptedRequests,
|
||||
resultReturned: run.proof.resultReturned,
|
||||
synthesizedAudioReceived: run.audioFrames > 0,
|
||||
|
||||
@@ -39,3 +39,16 @@ test("shared reports exclude private content and never promote transport to play
|
||||
await rm(dir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test("shared reports mark cleanup failures without leaking private diagnostics", async () => {
|
||||
const dir = await mkdtemp(join(tmpdir(), "speko-cleanup-redaction-"));
|
||||
try {
|
||||
const input = join(dir, "private.json"), output = join(dir, "public.json");
|
||||
await writeFile(input, JSON.stringify({failure: null, audioFrames: 1, proof: {acceptedRequests: 1, resultReturned: true}, cleanupFailures: [{operation: "source.close", reason: "secret detail"}], events: [{kind: "cleanup_failed", elapsedMs: 25, operation: "private operation"}]}));
|
||||
assert.equal(spawnSync(process.execPath, [new URL("./summarize-run.mjs", import.meta.url).pathname, input, output]).status, 0);
|
||||
const text = await readFile(output, "utf8"), report = JSON.parse(text);
|
||||
assert.equal(report.status, "failed"); assert.equal(report.cleanupFailureCount, 1);
|
||||
assert.equal(report.events[0].kind, "cleanup_failed");
|
||||
assert.equal(text.includes("secret detail"), false); assert.equal(text.includes("private operation"), false);
|
||||
} finally {await rm(dir, {recursive: true, force: true});}
|
||||
});
|
||||
Reference in new issue
Block a user