AstrBot-Desktop/docs/q9-local-acceptance.md
YokiiroBW bc0948731c
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
fix(astrbot): make the frame trace reachable by its documented filter
The event set an explicit target of astrbot::frame while the enabled!
guard used the default module-path target. A filter naming either one
therefore failed: naming the crate did not reach the event, and naming
the target left the guard returning false. Either way the trace emitted
nothing, which would have looked like the application producing no logs
at all and wasted a reproduction cycle.

Give the guard the same target, hoist it into a constant, and add a test
that drives the exact RUST_LOG value printed in the acceptance
instructions. The test was checked against the broken guard and fails
with empty output. A second test asserts the trace stays silent at the
default level, and both assert no payload text or attachment URL reaches
the log.

Document the capture procedure in the acceptance checklist.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 01:06:03 +08:00

9 KiB

Q9 Local Stability and Unsigned Installer Acceptance

Scope

This checklist covers the local Q9 release line only. It does not claim Windows code signing, automatic updates, or Forgejo CI verification.

Automated checks

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • npm.cmd run typecheck
  • npm.cmd run lint
  • npm.cmd run test -- --run
  • npm.cmd run build
  • npm.cmd run tauri:build

Manual Windows checks

  1. Install the unsigned NSIS package into a disposable user profile.
  2. Launch the application twice and verify the second launch focuses the existing main window.
  3. Configure one Companion and one Operations profile, then verify independent connection status and message history.
  4. Close the main window, quick-chat window, bubble, and pet through their supported paths; verify tray recovery and no blank native placeholder remains.
  5. Use tray 退出程序; verify the process, tray icon, pet window, bubble, and quick-chat window all disappear.
  6. Move the quick-chat window, switch monitors, restart the app, and verify geometry is restored or safely clamped.
  7. Disconnect and reconnect the network; verify the slot transitions through reconnecting without duplicate messages.
  8. Force-terminate a disposable run, relaunch, and verify startup remains usable and logs report an unexpected previous session without exposing secrets.
  9. Run the foreground-window, process, and single-target network diagnostics; verify invalid targets are rejected and no command execution is exposed.

Release artifact

  • Version: 0.1.0-alpha.2
  • Executable: target/release/astrbot-desktop.exe
  • Unsigned installer: target/release/bundle/nsis/AstrBot Desktop_0.1.0-alpha.2_x64-setup.exe

2026-07-21 verification update

  • Frontend lint, typecheck, Vitest (9), Vite build: passed.
  • Playwright UI polish suite: 4/4 passed, including 1280px, 1024px, and 680px shell checks.
  • Rust fmt, Clippy, workspace tests (67), and workspace check: passed.
  • Tauri release executable and unsigned NSIS installer: passed.
  • Full Prettier check still reports 20 pre-existing files outside this focused fix; broad formatting was intentionally not mixed into the release increment.

2026-07-27 verification update (R1 + R2 closure)

The R1 and R2 batches were previously recorded as gate-verified, but the Tauri release build and the Playwright suite had never been executed against them. Both were run here.

Gate results

Command Result
cargo fmt --all -- --check passed
cargo clippy --workspace --all-targets -- -D warnings passed, no warnings
cargo test --workspace 96 passed, 0 failed, 2 ignored (astrbot-desktop unit 76, dual_gateway_integration 2, desktop-protocol unit 9, protocol_contract 5, dual_instance 4; windows_dialog_smoke and soak ignored)
npm run typecheck passed
npm run lint passed (--max-warnings 0)
npm run test -- --run 19 passed / 4 files
npm run build passed
npm run test:e2e 5 passed / 5
npm run tauri:build passed, release profile in 3m25s

This settles a documented conflict: the queue recorded the Rust total as 73 and the status summary as 76. The measured astrbot-desktop unit count is 76, so 73 was stale.

Release artifact

  • target/release/bundle/nsis/AstrBot Desktop_0.1.0-alpha.2_x64-setup.exe, 8,867,530 bytes, built 2026-07-27 00:02:12 +0800.
  • F-04 packaging is machine-verified: the production CSP string img-src 'self' asset: http://asset.localhost data: blob: is present in target/release/astrbot-desktop.exe. Dev builds do not inject the CSP, so this is the only automated evidence available for F-04; that an attachment actually renders still needs the manual step below.

Findings from this run

  • src/features/pet/DesktopPetView.tsx was the only formatting regression introduced by the R1/R2 commits (verified by checking the same file at the pre-push base, where it passed). Fixed.
  • prettier --check . reports 25 files: 20 pre-existing tracked files, 3 new report documents, 1 untracked machine-local file (.claude/settings.local.json, now in .prettierignore), and the pet view regression above. The earlier record of "20" undercounted. A repo-wide formatting sweep remains deliberately deferred.
  • The Playwright suite passes, but the 680px case passes for a reason worth recording: styles.css has two breakpoints. max-width: 900px collapses the sidebar to icons and hides the nav label, and max-width: 680px restores it as a mobile top bar. The test viewport sits exactly on the second breakpoint, so the accessible name is intact. The 681px–900px band is icon-only and covered by no test, and in that band the nav buttons have no accessible label at all. That is the substance of audit P3-11 / F-62 and is not fixed here.

Pending, requires a live AstrBot container

Not executed, not claimed. Each item names the fix it is the acceptance evidence for.

  1. Install the fresh NSIS package, send a message with an image, confirm it renders — F-04.
  2. Pet event linkage, dragging, and the context menu — F-03.
  3. Three consecutive messages on one connection, each reply complete — F-01.
  4. Hold a connection past 30s; take one reply past 120s to completion — F-10.
  5. CJK-heavy prompts with no U+FFFD in the rendered reply — F-11.
  6. Disconnect and restore the network; confirm the remote conversation has no duplicated question or answer — F-12, observable only server-side.
  7. Stop generation mid-reply, restart the app, confirm nothing is still marked as generating — F-13.
  8. With a long reply in flight, confirm session lists, attachments, and capability lookups still respond — F-49.

Items 1 and 2 need only the installer, not a container.

2026-07-27 verification update (R3 isolation and state correctness)

Gate results

cargo fmt, cargo clippy --workspace --all-targets -D warnings, and cargo check pass. cargo test --workspace: 107 passed, 0 failed, 2 ignored (astrbot-desktop unit tests 76 to 87). npm run typecheck, npm run lint, npm run build pass. npm run test -- --run: 24 passed across 5 files, up from 19 across 4 — ChatPanel.test.tsx is new, the component had no tests before. npm run test:e2e: 5 passed. npm run tauri:build: passed; target/release/bundle/nsis/AstrBot Desktop_0.1.0-alpha.2_x64-setup.exe, 8,874,747 bytes, built 2026-07-27 00:30:22 +0800.

The new tests for F-14, F-15 and F-16 were each run against a mutation restoring the old behaviour and each fails under it, so they exercise the invariant rather than restating the implementation.

Pending, requires a live AstrBot container

  1. With one slot pointed at an unreachable address, confirm the other slot's status, sending and disconnect stay responsive, and that the connecting slot can be interrupted with 断开 — F-14.
  2. Upload an attachment on the companion slot, switch to operations, send; the attachment must not follow. Type a draft on one slot and confirm it does not appear on the other — F-16.
  3. Send while disconnected and confirm no user row appears in history — F-18.
  4. Probe the same profile into both slots in turn; the second must be refused — F-19.
  5. Confirm a streamed reply renders each character once in a production build — F-15.

SSE frame capture procedure

Two open defects — a reply rendering as two bubbles, and plugin images never appearing — depend on what the server actually sends. trace_frame_shape records the structure of every SSE frame: frame type, whether message_id and session_id are present, the streaming flag, and the key names inside data. No payload text is recorded, so the output is safe to share.

The log target is astrbot::frame. A filter naming the crate instead will not reach it.

PowerShell, from the repository root:

$env:RUST_LOG = "astrbot::frame=debug"; npm run tauri:dev 2>&1 | Tee-Object -FilePath frames.log

Then, in the running application:

  1. Send one message and watch for the reply splitting into two bubbles.
  2. Trigger a plugin that replies with an image.
  3. Right-click the desktop pet and note whether an error appears in the pet window.

What the log answers:

  • If every frame_type="plain" line has has_message_id=true, the double bubble is not F-34 and the historySessionId fallback is the remaining candidate.
  • The data_keys of an image frame, and whether an attachment_saved frame follows it, decide whether the mapper can emit an attachment marker at all.

frame_trace_fires_under_the_documented_filter_and_leaks_no_payload in astrbot_client.rs guards this exact RUST_LOG value, so the command above cannot silently produce nothing.

Explicitly pending external acceptance

  • HTTPS certificate pinning requires a real HTTPS endpoint and first-trust confirmation.
  • Signed updater delivery requires release certificates, updater keys, and an update endpoint.
  • Dual-server soak requires a second real AstrBot instance with a distinct server_instance_id.