docs(p00): record spike results and unresolved boundaries
这个提交存在于:
父节点
d4af9794b0
当前提交
353a439b41
共有 21 个文件被更改,包括 1178 次插入 和 0 次删除
26
CHANGELOG.md
普通文件
26
CHANGELOG.md
普通文件
|
|
@ -0,0 +1,26 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow Semantic Versioning.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- Authoritative architecture, implementation, and repository workflow documents.
|
||||
- Repository rules, ignore rules, implementation plan, progress tracking, and decision log.
|
||||
- Tauri 2, React, TypeScript, Vite, and Rust workspace skeleton with tray and single-instance lifecycle.
|
||||
- Independent companion and operations REST/SSE clients with local profile binding, cancellation, reconnect, Last-Event-ID, and per-slot deduplication.
|
||||
- Windows Credential Manager, bounded UI Automation, selected-window in-memory capture, Event Log, process, port, foreground-window, authorized log-tail, configuration parsing, and redaction Spikes.
|
||||
- Recoverable plan/dry-run/copy/verify/commit file transactions with no-overwrite conflict policies and source preservation.
|
||||
- Composite-key SQLite isolation for profile, server, conversation, message, cursor, proposal, and transaction data.
|
||||
- Provisional desktop-v1alpha1 Rust types, TypeScript exports, ten JSON Schemas, drift checks, and two loopback-only Mock Gateway instances.
|
||||
- Frontend, browser, Rust, integration, Windows provider, soak, and Forgejo CI test entry points.
|
||||
- P00 dependency review and durable Spike result records.
|
||||
|
||||
### Security
|
||||
|
||||
- Kept credentials and native capabilities in Rust; the React capability set remains `core:default` only.
|
||||
- Added secret redaction and repository scans; no arbitrary PowerShell, CMD, shell, input-injection, registry-write, or unrestricted filesystem API is exposed.
|
||||
- Kept real UNC writes, signing keys, updater keys, and release secrets outside P00.
|
||||
62
README.md
普通文件
62
README.md
普通文件
|
|
@ -0,0 +1,62 @@
|
|||
# AstrBot Desktop
|
||||
|
||||
AstrBot Desktop is a Windows companion and local-assistance client built with Tauri 2, React, TypeScript, Vite, and Rust.
|
||||
|
||||
The MVP supports two isolated active AstrBot connection slots:
|
||||
|
||||
- `companion` for chat, proactive messages, voice, and game companionship;
|
||||
- `operations` for user-authorized, policy-controlled diagnostics and recoverable file operations.
|
||||
|
||||
## Security boundaries
|
||||
|
||||
- Credentials remain in Windows secure storage and are never exposed to React.
|
||||
- Server tool requests are proposals; the Rust policy layer makes the final decision.
|
||||
- The application does not provide arbitrary PowerShell, CMD, or shell execution.
|
||||
- NAS transfers use `plan -> dry run -> copy -> verify -> commit` and preserve source files on failure.
|
||||
|
||||
## Current phase
|
||||
|
||||
The repository is in the P00 bootstrap and high-risk Spike phase. See [docs/implementation-plan.md](docs/implementation-plan.md) and [docs/progress.md](docs/progress.md).
|
||||
|
||||
## Authoritative documents
|
||||
|
||||
- `AGENTS.md`
|
||||
- `docs/01_Architecture_Design.md`
|
||||
- `docs/02_Codex_Implementation_Tasks.md`
|
||||
- `AstrBot_Desktop_Codex_Forgejo_Predevelopment_Workflow.md`
|
||||
|
||||
## Development prerequisites
|
||||
|
||||
- Windows 11
|
||||
- Node.js and pnpm
|
||||
- Rust stable with the MSVC target
|
||||
- Visual Studio 2022 Build Tools with Desktop development with C++
|
||||
- WebView2 Evergreen Runtime
|
||||
|
||||
## Local commands
|
||||
|
||||
```text
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm check:frontend
|
||||
pnpm test:e2e
|
||||
pnpm rust:fmt
|
||||
pnpm rust:clippy
|
||||
pnpm rust:test
|
||||
pnpm rust:check
|
||||
pnpm tauri:dev
|
||||
pnpm tauri:build
|
||||
```
|
||||
|
||||
On Windows, Cargo build output can be redirected away from a NAS workspace:
|
||||
|
||||
```powershell
|
||||
$env:CARGO_TARGET_DIR = "$env:LOCALAPPDATA\Temp\AstrBot-Desktop-target"
|
||||
```
|
||||
|
||||
The 30-minute connection soak and the controlled Windows UIA/capture smoke are
|
||||
ignored by the normal suite and must be invoked explicitly as documented in
|
||||
[tests/README.md](tests/README.md). The UIA/capture smoke opens only a generated,
|
||||
non-sensitive standard dialog and never writes captured pixels to disk.
|
||||
|
||||
P00 results and unresolved environment boundaries are recorded in
|
||||
[docs/spikes](docs/spikes) and [docs/progress.md](docs/progress.md).
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
# ADR-0001: Use a Root-Level Desktop Application for P00
|
||||
|
||||
- Status: Accepted
|
||||
- Date: 2026-07-18
|
||||
- Scope: Repository layout and build orchestration
|
||||
|
||||
## Context
|
||||
|
||||
The architecture document illustrates a future monorepo with the desktop application under apps/desktop. The predevelopment workflow separately recommends root-level src and src-tauri directories. P00 has one product application plus supporting protocol and Mock Gateway packages, so an additional application directory would add path and command complexity without isolating a second deployable application.
|
||||
|
||||
## Options considered
|
||||
|
||||
1. Put the desktop application under apps/desktop immediately.
|
||||
2. Keep the desktop application at the repository root and place reusable development packages under packages.
|
||||
3. Create separate repositories for the desktop application, protocol, and Mock Gateway.
|
||||
|
||||
## Decision
|
||||
|
||||
P00 uses a root-level React/Vite application and root-level src-tauri directory. Reusable protocol types, fixtures, and the Mock Gateway may live under packages and are managed by the root pnpm workspace.
|
||||
|
||||
Moving the desktop application under apps/desktop is deferred until a second independently deployable application creates a concrete need.
|
||||
|
||||
## Rationale
|
||||
|
||||
- Matches the explicit P00 workflow.
|
||||
- Keeps Tauri and Vite generated conventions simple.
|
||||
- Avoids premature monorepo nesting.
|
||||
- Still permits package-level isolation for protocol and test tooling.
|
||||
- Does not change the React/Rust security boundary.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Root scripts are the canonical entry points for frontend, Rust, and Tauri checks.
|
||||
- CI paths refer to src-tauri/Cargo.toml.
|
||||
- A future layout move will require path updates in scripts, CI, and documentation.
|
||||
- No package may introduce a second product UI without a separate decision.
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
# ADR-0002: Bind Profile Identity at the Rust Connection Boundary
|
||||
|
||||
- Status: Accepted
|
||||
- Date: 2026-07-18
|
||||
- Scope: Protocol identity, dual-instance isolation, and connection lifecycle
|
||||
|
||||
## Context
|
||||
|
||||
The desktop client maintains two simultaneously active connection slots: companion and operations. A remote event can contain identifiers such as profile_id, server_instance_id, conversation_id, and message_id. The remote service is not authoritative for the local profile assignment, and conversation or message identifiers may overlap across servers.
|
||||
|
||||
## Options considered
|
||||
|
||||
1. Merge both SSE streams and route events using remote conversation_id values.
|
||||
2. Trust a remote profile_id field and route events from a shared client.
|
||||
3. Maintain one independently owned connection session per active slot and attach the selected local profile identity before events leave the Rust networking layer.
|
||||
|
||||
## Decision
|
||||
|
||||
Each active slot owns an independent REST client, SSE stream, cancellation handle, retry state, Last-Event-ID cursor, and deduplication cache.
|
||||
|
||||
The Rust networking layer binds every accepted event to the locally selected profile_id. A remote profile_id is treated as untrusted protocol data and cannot override local routing.
|
||||
|
||||
Persisted or cached server data is keyed by at least profile_id, server_instance_id, and conversation_id. Message-level data additionally uses message_id where applicable.
|
||||
|
||||
The initial Mock Gateway protocol is explicitly provisional and identified as desktop-v1alpha1 until it is reviewed against a real AstrBot Gateway.
|
||||
|
||||
## Rationale
|
||||
|
||||
- Prevents cross-instance message and authorization confusion.
|
||||
- Allows either connection to fail, cancel, or reconnect independently.
|
||||
- Makes the operations-slot security check deterministic.
|
||||
- Preserves isolation when two servers reuse the same conversation or message IDs.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Shared global retry, cursor, and deduplication state is prohibited.
|
||||
- Tests must inject identical and malicious identifiers across both mock instances.
|
||||
- A server identity change freezes local-tool eligibility until the user reconfirms it.
|
||||
- Real AstrBot compatibility remains unverified while the Gateway is unavailable.
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
# ADR-0003: Keep Native Security-Critical Capabilities in Rust
|
||||
|
||||
- Status: Accepted
|
||||
- Date: 2026-07-18
|
||||
- Scope: Credentials, diagnostics, local actions, and file transactions
|
||||
|
||||
## Context
|
||||
|
||||
AstrBot Desktop needs Windows Credential Manager access, bounded diagnostics, UI Automation, window capture, event-log queries, and recoverable NAS file transactions. Remote model output, screen content, and file content are untrusted. Exposing generic operating-system execution or unrestricted paths would violate the project security model.
|
||||
|
||||
## Options considered
|
||||
|
||||
1. Expose broad filesystem or command APIs to React and enforce safety in the UI.
|
||||
2. Add a generic command runner and restrict it through prompts or string validation.
|
||||
3. Expose only typed, bounded Tauri commands backed by Rust policy checks and Windows-native APIs.
|
||||
|
||||
## Decision
|
||||
|
||||
All credentials, operating-system inspection, local policy decisions, and filesystem mutations remain in Rust.
|
||||
|
||||
React receives only display-safe results, opaque credential references, bounded path-selection tokens, and explicit operation states. It never receives credential values or unrestricted filesystem access.
|
||||
|
||||
The product does not include a shell plugin or any generic PowerShell, CMD, shell, registry-write, keyboard-script, or arbitrary-path execution API.
|
||||
|
||||
Local actions follow schema validation, tool allowlisting, profile and slot validation, path-scope validation, risk classification, authorization, execution, and audit.
|
||||
|
||||
P00 NAS validation uses plan, dry run, temporary copy, size and SHA-256 verification, and atomic destination commit. Source files are preserved; source cleanup is represented only as a non-executed plan field.
|
||||
|
||||
## Rationale
|
||||
|
||||
- Makes security enforcement independent of UI state and remote prompts.
|
||||
- Limits the native attack surface to explicit operations.
|
||||
- Keeps secret values out of React, SQLite ordinary fields, logs, and snapshots.
|
||||
- Preserves source data during an interrupted or failed NAS operation.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Windows-native behavior requires Windows-specific tests and cannot be certified by Linux CI.
|
||||
- Unsupported or elevated targets must fail safely without privilege escalation.
|
||||
- New native tools require an explicit schema, allowlist entry, risk level, tests, and audit behavior.
|
||||
- Destructive cleanup, updater signing, and broader desktop control require separate decisions and authorization.
|
||||
5
docs/decisions/README.md
普通文件
5
docs/decisions/README.md
普通文件
|
|
@ -0,0 +1,5 @@
|
|||
# Architecture Decision Records
|
||||
|
||||
Use `ADR-NNNN-short-title.md` for decisions that materially affect the protocol, security model, database schema, public interfaces, or long-term architecture.
|
||||
|
||||
Use `pending-decisions.md` for unresolved or operational questions that do not yet justify an ADR.
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
# Pending Decisions
|
||||
|
||||
## PD-0001: Forgejo transport for the development machine
|
||||
|
||||
- Status: resolved for HTTP push; SSH remains unavailable
|
||||
- Current value: `ssh://git@localhost:18086/YokiiroBW/AstrBot-Desktop.git`
|
||||
- Push URL: `http://192.168.31.210:18085/YokiiroBW/AstrBot-Desktop.git`
|
||||
- Observation: the authenticated Forgejo API confirmed `YokiiroBW/AstrBot-Desktop` existed, was empty, used `main`, and granted push permission before initialization.
|
||||
- SSH observation: `localhost:18086` refuses connections. `192.168.31.210:18086` answers but rejects the available SSH key.
|
||||
- Push observation: Git Credential Manager was cleared and reauthenticated without placing a secret in the repository or chat. The approved non-forced HTTP push succeeded and remote `main` now points to `0d12b94`.
|
||||
- Decision: retain the SSH URL as the fetch URL for future key repair and use the explicitly approved HTTP URL as the push URL for this workflow.
|
||||
- Safety impact: no force push or history overwrite occurred; `feat/p00-bootstrap` was created from the pushed baseline.
|
||||
|
||||
## PD-0002: P00 branch naming
|
||||
|
||||
- Status: resolved for this predevelopment workflow
|
||||
- Decision: use `feat/p00-bootstrap` as explicitly required by the workflow and current user request.
|
||||
- Follow-up: subsequent stages use the branch names in `AGENTS.md`.
|
||||
|
||||
## PD-0003: Node.js release line
|
||||
|
||||
- Status: monitor during bootstrap
|
||||
- Current environment: Node.js 24.
|
||||
- Decision: use the installed version initially; pin package-manager and dependency versions in the repository and record any Tauri/Vite incompatibility found by actual builds.
|
||||
|
||||
## PD-0004: P00 source layout
|
||||
|
||||
- Status: resolved for P00
|
||||
- Observation: the architecture document illustrates an `apps/desktop` monorepo, while the predevelopment workflow recommends root-level `src` and `src-tauri` directories.
|
||||
- Decision: keep the single desktop application at the repository root during P00 and use Cargo workspace crates for protocol and Mock Gateway isolation.
|
||||
- Reason: there is only one application, and the workflow explicitly recommends the root layout; this avoids an extra package layer without preventing a later move if a second application appears.
|
||||
|
||||
## PD-0005: Source cleanup in the NAS Spike
|
||||
|
||||
- Status: resolved for P00
|
||||
- Conflict: the implementation task mentions cleanup after verification, while the workflow and safety rules require source preservation and prohibit irreversible tests.
|
||||
- Decision: P00 always preserves source files and tests cleanup policy only as a non-executed plan field.
|
||||
- Follow-up: reversible recycle-bin behavior requires a later explicitly authorized Spike.
|
||||
|
||||
## PD-0006: Provisional desktop gateway contract
|
||||
|
||||
- Status: resolved for P00
|
||||
- Decision: define a provisional `desktop-v1alpha1` contract and Mock Gateway without claiming compatibility with an unavailable real AstrBot Gateway.
|
||||
- Follow-up: authentication fields, error codes, event retention, ACK timing, and capability names require a later real-gateway contract review.
|
||||
|
||||
## PD-0007: Repository-local Git author identity
|
||||
|
||||
- Status: resolved
|
||||
- Decision: the user explicitly approved `YokiiroBW <yokiirobw@gmail.com>`.
|
||||
- Implementation: the identity is configured only in this repository.
|
||||
- Result: two Conventional Commit baseline commits were created on `main`, pushed normally, and followed by scoped feature-branch commits.
|
||||
- Safety impact: no global Git identity was changed.
|
||||
57
docs/dependency-review.md
普通文件
57
docs/dependency-review.md
普通文件
|
|
@ -0,0 +1,57 @@
|
|||
# P00 Dependency Review
|
||||
|
||||
Date: 2026-07-18
|
||||
|
||||
This review covers direct dependencies introduced for the isolated P00 Spikes. Versions are pinned in
|
||||
`package.json`, `pnpm-lock.yaml`, `Cargo.toml`, and `Cargo.lock`. ?Maintained? below means the
|
||||
selected release line is current enough to resolve, compile, lint, test, and build on the audited
|
||||
toolchain; it is not a promise of future upstream maintenance.
|
||||
|
||||
## Frontend and desktop dependencies
|
||||
|
||||
| Dependency | Purpose | Maintenance and alternatives | Native compile | Permission or attack-surface effect |
|
||||
| --------------------------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
||||
| React, React DOM | Minimal status UI and future interaction layer | Active release line; alternatives would replace the mandated React baseline | No | Browser-side rendering only |
|
||||
| Zod | Runtime validation for frontend-facing typed data | Active release line; manual validators are possible but easier to drift | No | Reduces acceptance of malformed data |
|
||||
| Tauri API and CLI | Mandated Tauri 2 application runtime and build tooling | Active Tauri 2 release line; changing it would violate the baseline | Rust build for the desktop binary | Adds only configured Tauri core capabilities; no shell or broad filesystem plugin is enabled |
|
||||
| Vite and React plugin | Development server and production web bundle | Active release line; alternative bundlers are unnecessary for P00 | esbuild binaries are dependency-managed | Development/build-time surface only |
|
||||
| TypeScript and type packages | Static frontend typing | Active release line; no equivalent is needed under the mandated stack | No | Build-time only |
|
||||
| ESLint, TypeScript ESLint, React lint plugins | Static correctness and hook checks | Active release lines; alternatives provide similar checks | No | Build-time only |
|
||||
| Prettier | Deterministic formatting | Active release line; alternatives would add no P00 value | No | Build-time only |
|
||||
| Vitest, Testing Library, jsdom | Frontend unit and component tests | Active release lines; Jest is an alternative with more configuration | Some transitive optional binaries may be platform-specific | Test-only; no release capability |
|
||||
| Playwright Test | Browser smoke testing | Active release line; WebDriver alternatives are less aligned with the existing test | Browser executable is external to the app | Test-only; browsers are not shipped with the desktop binary |
|
||||
|
||||
## Rust runtime dependencies
|
||||
|
||||
| Dependency group | Purpose | Maintenance and alternatives | Native compile | Permission or attack-surface effect |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
| `tauri`, `tauri-build`, `tauri-plugin-single-instance` | Desktop lifecycle, tray, IPC bootstrap, single instance | Mandated and on the Tauri 2 line; no framework substitution approved | Yes | Native window/tray lifecycle only; capabilities remain explicit |
|
||||
| `reqwest` with rustls, `eventsource-stream`, `futures-util` | REST and SSE clients | Current release lines; manual HTTP/SSE parsing would increase risk | Rustls is compiled in Rust | Outbound HTTP(S) to configured gateways; redirects are disabled |
|
||||
| `tokio`, `tokio-util` | Independent async connections, cancellation, timers | Current release lines; required by the selected HTTP/server ecosystem | No external native library | Concurrency only; no new OS permission |
|
||||
| `secrecy`, `zeroize` | Reduce accidental secret exposure and clear owned buffers | Current small crates; custom wrappers are possible but easier to misuse | No | Narrows secret exposure |
|
||||
| `rusqlite` with bundled SQLite | Disposable schema/isolation Spike and future local storage | Current release line; system SQLite would reduce reproducibility | Yes, bundled SQLite C code | Local database files only; credentials remain excluded |
|
||||
| `windows` | Typed Windows Credential Manager, UIA, GDI, Event Log, process, and port APIs | Official Microsoft projection; direct FFI is the higher-risk alternative | Links Windows system libraries | Adds only explicitly selected Win32 API feature sets; no input injection, registry write, or shell API |
|
||||
| `sysinfo` | Read-only process metadata fallback | Current release line; direct Win32-only implementation is an alternative | Platform-specific Rust code | Read-only process inspection |
|
||||
| `png` | In-memory encoding of one explicitly selected window | Current focused crate; Windows Imaging Component is an alternative | No external library | No disk write; bounded pixel allocation |
|
||||
| `quick-xml` | Bounded Event Log XML parsing | Current release line; manual parsing is unsafe | No | Parses only returned event XML |
|
||||
| `regex` | Local redaction and bounded format checks | Widely maintained; manual scanners are possible but error-prone | No | Reduces disclosure risk |
|
||||
| `serde`, `serde_json`, `toml`, `yaml-rust2` | Typed protocol and bounded configuration fixtures | Active ecosystem crates; handwritten parsers are higher risk | No | Parsing only; file access remains separately authorized |
|
||||
| `sha2` | File transaction verification | Current cryptographic primitive crate; platform hashing APIs are an alternative | No | Read-only hashing of authorized fixture data |
|
||||
| `uuid`, `time`, `url` | Identifiers, timestamps, and URL validation | Active ecosystem crates; custom implementations would increase ambiguity | No | Validation and metadata only |
|
||||
| `thiserror`, `tracing`, `tracing-subscriber` | Structured errors and sanitized diagnostics | Active ecosystem crates; standard-library-only alternatives are more verbose | No | Logs must still pass redaction rules |
|
||||
|
||||
## Protocol and Mock-only dependencies
|
||||
|
||||
| Dependency | Purpose | Maintenance and alternatives | Native compile | Permission or attack-surface effect |
|
||||
| ------------------------------ | ------------------------------------------------------- | ---------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------ |
|
||||
| `schemars` | Export checked JSON Schema from canonical Rust types | Active release line; handwritten schema is the drift-prone alternative | No | Build/test tooling only |
|
||||
| `ts-rs` | Export TypeScript protocol types | Active release line; handwritten duplication is the alternative | No | Build/test tooling only |
|
||||
| `axum`, `async-stream`, `clap` | Loopback-only dual Mock Gateway and CLI | Active release lines; custom HTTP server code is riskier | No external native library | Mock refuses non-loopback bind addresses and is not a release dependency |
|
||||
| `tempfile` | Disposable database, log, and file-transaction fixtures | Active release line; manual temp naming is less safe | No | Test-only generated paths |
|
||||
|
||||
## Review outcome
|
||||
|
||||
- No dependency exposes arbitrary PowerShell, CMD, shell, keyboard, mouse, registry-write, or unrestricted filesystem execution.
|
||||
- Native compilation is limited to the mandated Tauri/Windows stack and bundled SQLite.
|
||||
- Mock and test dependencies do not enter the release dependency graph.
|
||||
- Dependency updates require lockfile review, the full P00 check set, and a repeat of affected Windows Spikes.
|
||||
36
docs/implementation-plan.md
普通文件
36
docs/implementation-plan.md
普通文件
|
|
@ -0,0 +1,36 @@
|
|||
# P00 Bootstrap Implementation Plan
|
||||
|
||||
## Objective
|
||||
|
||||
Establish a reproducible Tauri 2 + React + TypeScript + Rust baseline and complete the high-risk technical Spikes required before formal feature development.
|
||||
|
||||
## Ordered work
|
||||
|
||||
1. Normalize repository documents and Git metadata on `main`.
|
||||
2. Verify Forgejo is empty before the first `main` push; never overwrite remote history.
|
||||
3. Create `feat/p00-bootstrap` from the pushed `main` baseline.
|
||||
4. Establish the Tauri 2 application and typed frontend-to-Rust IPC.
|
||||
5. Implement two independent REST/SSE clients and a dual-instance Mock Gateway.
|
||||
6. Verify Windows secure credential CRUD without exposing secret values to React or logs.
|
||||
7. Verify bounded Windows diagnostics: foreground window, UI Automation, selected-window capture, process information, event logs, ports, network targets, authorized log tails, configuration parsing, and redaction.
|
||||
8. Verify NAS transactions only in a dedicated generated fixture directory: dry run, temporary copy, size/hash verification, atomic commit, conflict handling, interruption recovery, and source preservation.
|
||||
9. Define protocol schemas and capability negotiation types.
|
||||
10. Add frontend, Rust, integration, and Forgejo CI checks.
|
||||
11. Run and record all checks, commit by independently verifiable increments, and push the feature branch without merging `main`.
|
||||
|
||||
## Safety gates
|
||||
|
||||
- No arbitrary command execution is exposed by product code.
|
||||
- No real credential is used in fixtures, logs, snapshots, or commits.
|
||||
- No NAS Spike touches an existing user file or directory.
|
||||
- No remote branch is changed until `git ls-remote` succeeds and remote history is reviewed.
|
||||
- No test or build is marked successful without captured execution results.
|
||||
|
||||
## Current handoff status
|
||||
|
||||
- Rust/MSVC/Tauri are verified and no longer block local work.
|
||||
- Git Credential Manager reauthentication succeeded and the non-forced HTTP push created the remote `main` baseline at `0d12b94`.
|
||||
- Development is active on `feat/p00-bootstrap`; the remaining repository handoff step is a normal push of this feature branch.
|
||||
- The configured SSH fetch endpoint still refuses connections and the LAN SSH endpoint rejects the available key, but the approved HTTP push URL is operational.
|
||||
- Forgejo runner labels/jobs remain unverified, so the committed workflow is not claimed successful.
|
||||
- Real UNC execution still requires a user-authorized disposable fixture.
|
||||
71
docs/progress.md
普通文件
71
docs/progress.md
普通文件
|
|
@ -0,0 +1,71 @@
|
|||
# Development Progress
|
||||
|
||||
## Current phase
|
||||
|
||||
P00 bootstrap implementation and high-risk Spike verification; local implementation is complete and final documentation/push handoff is in progress.
|
||||
|
||||
## Completed
|
||||
|
||||
- Read `AGENTS.md` and all authoritative architecture, implementation, and Forgejo workflow documents.
|
||||
- Verified the Windows, Git, Node.js, package-manager, WebView2, Rust, Tauri, and MSVC environment.
|
||||
- Initialized a local Git repository on `main`.
|
||||
- Configured `origin` as `ssh://git@localhost:18086/YokiiroBW/AstrBot-Desktop.git`.
|
||||
- Verified through authenticated Forgejo API and HTTP Git that the remote repository existed, was empty, used `main`, and granted push permission before the baseline push.
|
||||
- Reauthenticated through Git Credential Manager and non-forced pushed the `main` baseline to Forgejo at `0d12b94`.
|
||||
- Created and switched to `feat/p00-bootstrap` from the pushed `main` baseline.
|
||||
- Built the Tauri 2 + React + TypeScript + Rust skeleton with tray, single-instance, CSP, and minimal `core:default` capability.
|
||||
- Implemented independent companion/operations REST and SSE clients and passed the corrected 30-minute soak.
|
||||
- Implemented and tested Windows Credential Manager, UI Automation, selected-window capture, Event Log, process, port, foreground-window, authorized log-tail, configuration parsing, and redaction Spikes.
|
||||
- Implemented and tested composite-key SQLite isolation and recoverable local file transactions with source preservation.
|
||||
- Added provisional protocol types, ten JSON Schemas, TypeScript exports, drift checks, and two loopback-only Mock Gateway instances.
|
||||
- Added frontend, Playwright, Rust, integration, Windows-provider, soak, and Forgejo CI entry points.
|
||||
- Built the Windows release executable and SHA-256-recorded NSIS installer.
|
||||
- Added dependency, Spike, progress, changelog, and pending-decision records.
|
||||
- Committed the implementation, test, and CI increments with Conventional Commit subjects.
|
||||
|
||||
## In progress
|
||||
|
||||
- Finalizing the P00 report and documentation before the normal feature-branch push.
|
||||
|
||||
## Remaining
|
||||
|
||||
- Push `feat/p00-bootstrap` without force and verify its remote head.
|
||||
- Run the Forgejo workflow when a compatible runner is available.
|
||||
- Execute a real UNC transaction only after an authorized disposable fixture is supplied.
|
||||
- Add the combined end-to-end test that keeps configured streams active while the real Tauri window is hidden to tray.
|
||||
|
||||
## Blockers
|
||||
|
||||
- Configured Forgejo SSH `localhost:18086` refuses connections.
|
||||
- LAN SSH `192.168.31.210:18086` responds but rejects the available public key.
|
||||
- HTTP Git push is operational after Git Credential Manager reauthentication and is no longer a blocker.
|
||||
- Forgejo runner labels/jobs could not be verified; the jobs API endpoint returned 404.
|
||||
|
||||
## Test status
|
||||
|
||||
- `pnpm check:frontend`: passed; 1 Vitest test and production Vite build.
|
||||
- `pnpm test:e2e`: passed; 1 Chromium smoke test.
|
||||
- Rust fmt/check/Clippy with warnings denied: passed.
|
||||
- `cargo test --workspace`: 40 passed, 2 explicit manual tests ignored.
|
||||
- Controlled Windows UIA/PrintWindow smoke: 1 passed.
|
||||
- Corrected dual-SSE soak: 1800.02 seconds, 1800 companion events, 1801 operations events, passed.
|
||||
- Protocol Schema drift check: passed.
|
||||
- Tauri development smoke, release executable, and NSIS installer build: passed.
|
||||
- pnpm 11.9.0 frozen lockfile-only validation: passed using a local temporary store to avoid the pnpm UNC project-registry limitation.
|
||||
- Forgejo CI and a real UNC transaction were not executed and are not claimed successful.
|
||||
|
||||
## Current branch
|
||||
|
||||
`feat/p00-bootstrap`
|
||||
|
||||
## Recent commits
|
||||
|
||||
- `5e6e8d5 docs(project): add architecture and implementation specifications`
|
||||
- `0d12b94 chore(repo): initialize repository and ignore rules`
|
||||
- `01607c6 feat(p00): add Tauri desktop spike foundation`
|
||||
- `69b432b test(p00): add frontend browser rust and windows checks`
|
||||
- `d4af979 ci(forgejo): add portable and windows quality workflows`
|
||||
|
||||
## Next step
|
||||
|
||||
Commit the final P00 documentation, run the final repository checks, push `feat/p00-bootstrap` normally over the approved HTTP URL, verify the remote head, and provide the PR draft without merging `main`.
|
||||
129
docs/reports/p00-bootstrap-report.md
普通文件
129
docs/reports/p00-bootstrap-report.md
普通文件
|
|
@ -0,0 +1,129 @@
|
|||
# P00 Bootstrap Verification and PR Draft
|
||||
|
||||
Date: 2026-07-18
|
||||
|
||||
## Delivery status
|
||||
|
||||
Local implementation and verification are complete. Git Credential Manager reauthentication succeeded, the `main` baseline was pushed non-forced to Forgejo at `0d12b94`, and development continued on `feat/p00-bootstrap`.
|
||||
|
||||
Implementation, test, and CI increments are committed on the feature branch. Forgejo CI has not run because runner availability remains unverified; no CI success is claimed.
|
||||
|
||||
No merge to `main` has been performed.
|
||||
|
||||
## Environment
|
||||
|
||||
- Windows NT 10.0.26100.0, PowerShell 5.1.26100.7920
|
||||
- Git 2.54.0.windows.1
|
||||
- Node.js 24.17.0, npm 11.13.0, pnpm 11.9.0
|
||||
- rustc/cargo 1.97.1
|
||||
- Tauri CLI 2.11.4, Tauri crate 2.11.5
|
||||
- WebView2 Runtime 131.0.2903.86
|
||||
- MSVC link environment verified by debug/release and NSIS builds
|
||||
|
||||
## Completed scope
|
||||
|
||||
- Tauri 2 + React + TypeScript + Vite + Rust skeleton, tray, single-instance, CSP, and minimal capability configuration.
|
||||
- Two independent companion/operations REST and SSE clients with local profile binding, state, cancellation, reconnect, Last-Event-ID, and deduplication.
|
||||
- Windows Credential Manager CRUD with generated fake credentials and cleanup.
|
||||
- Bounded UI Automation, selected-window in-memory PrintWindow capture, closed-window identity rejection, Event Log, process, port, foreground-window, authorized log-tail, configuration parsing, and redaction Spikes.
|
||||
- Composite-key SQLite isolation.
|
||||
- Recoverable plan/dry-run/copy/size+SHA-256 verify/atomic commit file transactions with ask/rename/skip and source preservation.
|
||||
- Provisional desktop-v1alpha1 protocol types, TypeScript exports, ten JSON Schemas, and dual loopback Mock Gateway.
|
||||
- Frontend, browser, Rust, integration, Windows-provider, soak, and Forgejo CI entry points.
|
||||
- Dependency review, Spike reports, progress records, and changelog.
|
||||
|
||||
## Test report
|
||||
|
||||
| Check | Result |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| pnpm frozen lockfile-only validation | Passed with pnpm 11.9.0 and a local temporary store; no dependency scripts run |
|
||||
| Frontend format, ESLint, TypeScript, Vitest, Vite build | Passed; 1 Vitest test |
|
||||
| Playwright Chromium smoke | Passed; 1 test |
|
||||
| cargo fmt --all -- --check | Passed |
|
||||
| cargo check --workspace --all-targets | Passed |
|
||||
| cargo clippy --workspace --all-targets -- -D warnings | Passed |
|
||||
| cargo test --workspace | Passed; 40 tests, 2 explicit manual tests ignored |
|
||||
| Controlled Windows UIA/PrintWindow smoke | Passed; 1 test, 0.12 seconds |
|
||||
| Protocol Schema drift check | Passed |
|
||||
| Corrected dual-SSE soak | Passed; 1800.02 seconds, companion 1800, operations 1801 |
|
||||
| Tauri development launch | Passed; `AstrBot Desktop` window responsive and safely stopped |
|
||||
| Tauri release executable | Passed |
|
||||
| Tauri NSIS installer | Passed |
|
||||
|
||||
Soak resource samples:
|
||||
|
||||
- Working set: approximately 11.4-12.1 MiB.
|
||||
- Private memory: approximately 2.0-2.4 MiB.
|
||||
- Final pre-exit cumulative CPU: 1.38 seconds.
|
||||
- No cross-routing assertion, stream stall, or failed shutdown in the corrected run.
|
||||
|
||||
NSIS artifact:
|
||||
|
||||
- File: `AstrBot Desktop_0.1.0-alpha.0_x64-setup.exe`
|
||||
- Size: 3,552,257 bytes
|
||||
- SHA-256: `BF87DCD13B81C18EFC9A2DB8DE6E201396FFBB9ABA0EABC579A22479C004816C`
|
||||
|
||||
## Security review
|
||||
|
||||
- Tauri window capability contains only `core:default`.
|
||||
- No shell plugin or product API for PowerShell, CMD, arbitrary shell, input injection, registry write, or unrestricted filesystem execution exists.
|
||||
- Credential values remain in Rust/Windows Credential Manager; React has no credential read command.
|
||||
- Repository secret scan found only the documented redaction example and deliberate fake test fixtures.
|
||||
- File-transaction deletion calls are limited to transaction-owned temporary destination files and generated test-fixture cleanup; P00 never deletes the source.
|
||||
- No real UNC path, NAS credential, signing key, updater key, private key, or production token was used.
|
||||
|
||||
## Unresolved issues
|
||||
|
||||
1. `ssh://git@localhost:18086/...` refuses connections.
|
||||
2. `ssh://git@192.168.31.210:18086/...` responds but rejects the available key; approved HTTP push is the working transport.
|
||||
3. Forgejo CI has not run; runner jobs/labels could not be verified and the jobs API returned 404.
|
||||
4. Real UNC/SMB behavior is not tested because no authorized disposable fixture was provided.
|
||||
5. A real elevated or custom-drawn window remains a manual UIA/capture boundary test.
|
||||
6. The connection layer and tray lifecycle passed separately; configured Gateway sessions are not yet wired into Tauri setup for a combined tray-hidden end-to-end run.
|
||||
7. Real AstrBot Gateway protocol compatibility is unverified; desktop-v1alpha1 remains provisional.
|
||||
8. Code signing, updater signing, updater endpoint, and release publication remain outside P00.
|
||||
9. pnpm 11 project registration cannot create its store symlink when the project/store are on this UNC share; local temporary store plus frozen-store is the verified lockfile-only workaround.
|
||||
|
||||
## Commit list
|
||||
|
||||
Branch commit sequence:
|
||||
|
||||
1. `5e6e8d5 docs(project): add architecture and implementation specifications`
|
||||
2. `0d12b94 chore(repo): initialize repository and ignore rules`
|
||||
3. `01607c6 feat(p00): add Tauri desktop spike foundation`
|
||||
4. `69b432b test(p00): add frontend browser rust and windows checks`
|
||||
5. `d4af979 ci(forgejo): add portable and windows quality workflows`
|
||||
6. `docs(p00): record spike results and unresolved boundaries`
|
||||
|
||||
## Forgejo PR title
|
||||
|
||||
`feat(p00): bootstrap Tauri desktop and validate high-risk spikes`
|
||||
|
||||
## Forgejo PR body
|
||||
|
||||
### Summary
|
||||
|
||||
- bootstrap the Tauri 2 + React + TypeScript + Rust desktop workspace;
|
||||
- add isolated companion and operations REST/SSE clients and dual Mock Gateway;
|
||||
- add provisional protocol Schema, Windows secure/native Spikes, SQLite isolation, and recoverable file transactions;
|
||||
- add frontend, browser, Rust, Windows, soak, and Forgejo CI checks.
|
||||
|
||||
### Verification
|
||||
|
||||
- frontend quality/build and Chromium smoke pass;
|
||||
- Rust fmt/check/Clippy and 40 normal tests pass;
|
||||
- controlled UIA/PrintWindow smoke passes;
|
||||
- corrected 30-minute dual-SSE soak passes with 1800/1801 isolated events;
|
||||
- Tauri development launch, release executable, and NSIS installer build pass.
|
||||
|
||||
### Known boundaries
|
||||
|
||||
- Forgejo CI is not yet executed;
|
||||
- real UNC, elevated/custom-drawn window, real AstrBot Gateway, signing, and updater verification remain pending;
|
||||
- connection tasks are not yet wired into a combined real tray-hidden session test.
|
||||
|
||||
### Safety
|
||||
|
||||
- no arbitrary shell or unrestricted desktop/filesystem capability;
|
||||
- no real credentials or destructive source-file operations;
|
||||
- no force push and no automatic merge to `main`.
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
# P00-01: Dual REST and SSE Connections
|
||||
|
||||
- Status: Connection isolation and 30-minute soak passed; end-to-end tray-hidden wiring remains pending
|
||||
- Date recorded: 2026-07-18
|
||||
- MVP gate: Required before formal dual-connection development
|
||||
|
||||
## Objective
|
||||
|
||||
Verify that one Tauri process can maintain independent companion and operations REST/SSE sessions while the main window is hidden, without event mixing or shared failure state.
|
||||
|
||||
## Environment
|
||||
|
||||
- Host: Windows 11 x64
|
||||
- Mock transport: loopback only
|
||||
- Rust toolchain: rustc/cargo 1.97.1
|
||||
- MSVC C++ build tools: verified by native builds
|
||||
- Forgejo: HTTP Git reachable and baseline pushed; no CI result exists
|
||||
|
||||
## Minimal validation implementation
|
||||
|
||||
The Spike is expected to provide:
|
||||
|
||||
- Two independently constructed REST clients.
|
||||
- Two independently constructed SSE clients.
|
||||
- Local companion and operations profile bindings.
|
||||
- Per-session cancellation, retry, Last-Event-ID, and deduplication state.
|
||||
- A dual-instance Mock Gateway with health, server-info, capabilities, authentication, SSE, disconnect, and duplicate-event controls.
|
||||
- Sanitized metrics and state snapshots.
|
||||
|
||||
The Rust connection object must overwrite or ignore any remote profile_id when producing a locally routed event.
|
||||
|
||||
## Required execution
|
||||
|
||||
1. Start Mock A and Mock B on loopback using dynamically allocated ports.
|
||||
2. Connect both slots and confirm independent health and capability responses.
|
||||
3. Stream uniquely attributable events from both mocks.
|
||||
4. Inject identical conversation_id, message_id, and event payload values.
|
||||
5. Inject a conflicting remote profile_id and confirm the local binding wins.
|
||||
6. Replay an event_id and confirm it is delivered once.
|
||||
7. Stop A, verify B continues, then repeat in the other direction.
|
||||
8. Hide the main window to the tray and verify both streams continue.
|
||||
9. Run a 30-minute soak and record CPU, memory, reconnect count, event count, and duplicates suppressed.
|
||||
|
||||
## Actual execution result
|
||||
|
||||
Passed for the isolated connection layer. Two loopback Mock Gateways and two independent Rust GatewayClients verified local profile binding, per-slot state/cancellation/Last-Event-ID/deduplication, duplicate suppression, server identity checks, one-slot disconnect/reconnect, and continued events from the unaffected slot.
|
||||
|
||||
The first long run completed the event loop but exposed a test-harness shutdown defect: the two SSE Response values were still alive when graceful Mock shutdown began. The run was correctly recorded as failed, the streams were explicitly dropped before shutdown, event-count output was added, and the full test was restarted from zero.
|
||||
|
||||
The corrected soak passed after 1800.02 seconds with 1800 companion events and 1801 operations events and no server-instance cross-routing assertion. Process samples ranged from about 11.4 to 12.1 MiB working set, about 2.0 to 2.4 MiB private memory, and 1.38 seconds cumulative CPU at the final pre-exit sample.
|
||||
|
||||
Tauri development launch, tray creation, close-to-hide handling, and process responsiveness were verified separately. P00 does not yet wire saved Gateway profiles into the application setup, so a combined end-to-end run that hides the real Tauri window while these two configured streams remain active is still pending formal connection integration.
|
||||
|
||||
## Log summary
|
||||
|
||||
Commands: `cargo test --workspace` and `cargo test -p mock-gateway --test soak -- --ignored --nocapture`. Results: connection/reconnect/dedup integration tests passed; corrected soak passed with the counts and resources above.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- Real AstrBot Gateway compatibility is unverified.
|
||||
- The provisional protocol may change after a real Gateway review.
|
||||
- A loopback Mock does not validate TLS, proxy, certificate, or real-network behavior.
|
||||
|
||||
## Security impact
|
||||
|
||||
Profile binding at the Rust connection boundary is mandatory. A merged SSE stream or remote-controlled profile identity could route an operations proposal to the wrong local policy context.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Keep connection ownership per slot and add deterministic clock/backoff injection for unit tests. Do not proceed to formal dual-chat UI until the isolation, failure, and soak checks have recorded results.
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
# P00-02: Windows Credential Manager
|
||||
|
||||
- Status: Passed on the audited Windows host
|
||||
- Date recorded: 2026-07-18
|
||||
- MVP gate: Required before storing any AstrBot or NAS credential
|
||||
|
||||
## Objective
|
||||
|
||||
Verify create, read, update, and delete operations for a test-only generic credential while keeping the secret value inside Rust and outside React, ordinary SQLite fields, logs, snapshots, and repository files.
|
||||
|
||||
## Environment
|
||||
|
||||
- Host: Windows 11 x64
|
||||
- Secure store target: Windows Credential Manager
|
||||
- Rust toolchain: rustc/cargo 1.97.1
|
||||
- MSVC C++ build tools: verified by Rust and Tauri native builds
|
||||
- Administrative elevation: not permitted or required
|
||||
|
||||
## Minimal validation implementation
|
||||
|
||||
The Spike is expected to expose typed Rust operations that accept a logical credential reference and return metadata or an opaque reference. Secret bytes must use bounded lifetimes and must not implement debug output that reveals their value.
|
||||
|
||||
React may request save, replace, existence, and delete operations, but a read operation must not return the credential value across Tauri IPC.
|
||||
|
||||
## Required execution
|
||||
|
||||
1. Create a uniquely named test-only credential containing a fake generated value.
|
||||
2. Read it in Rust and compare without printing the value.
|
||||
3. Replace it and confirm the old value is no longer returned.
|
||||
4. Delete it and confirm a structured not-found result.
|
||||
5. Verify missing, denied, oversized, and malformed-reference error paths.
|
||||
6. Scan application logs, frontend state, SQLite data, snapshots, and terminal output for the fake value.
|
||||
7. Confirm the test credential is removed at the end.
|
||||
|
||||
## Actual execution result
|
||||
|
||||
Passed. The Windows-only Rust test created a uniquely named generic credential containing a generated fake value, read it inside Rust, replaced it, confirmed the replacement, deleted it, and confirmed the deleted value was unavailable. The cleanup path ran even when an assertion would fail, and a post-run check found no remaining test credential.
|
||||
|
||||
Reference and size validation tests cover empty, malformed, and oversized inputs before native access. The public secure-store surface returns metadata or an opaque reference; it does not expose the secret through Tauri IPC or React.
|
||||
|
||||
The workspace secret scan reported only the security-rule example in `AGENTS.md` and deliberate fake redaction fixtures. No real credential, Authorization header, private key, or NAS secret was found.
|
||||
|
||||
## Log summary
|
||||
|
||||
Command: `cargo test --workspace` on Windows, including the Credential Manager CRUD test. Result: passed. Terminal output contained only test names and result categories; the generated fake secret was never printed.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- Windows Credential Manager behavior cannot be certified by Linux CI.
|
||||
- Locked sessions, policy restrictions, roaming behavior, and credential-size limits still require Windows tests.
|
||||
- NAS authentication integration is outside this isolated CRUD Spike.
|
||||
|
||||
## Security impact
|
||||
|
||||
Failure would block all authenticated AstrBot and NAS connections. Falling back to plaintext configuration, SQLite, environment files, or logs is prohibited.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Use the Windows-native credential APIs behind a narrow Rust trait. Persist only a credential reference. Treat inability to access secure storage as an explicit user-visible error rather than a reason to weaken storage.
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
# P00-03: UI Automation and Selected-Window Capture
|
||||
|
||||
- Status: Passed for a controlled non-elevated standard dialog; elevated/custom-drawn manual coverage remains
|
||||
- Date recorded: 2026-07-18
|
||||
- MVP gate: Required for bounded error-window diagnostics
|
||||
|
||||
## Objective
|
||||
|
||||
Verify read-only extraction from a standard Windows dialog and a user-selected, single-window capture fallback without running the application as administrator or broadening access to the desktop.
|
||||
|
||||
## Environment
|
||||
|
||||
- Host: Windows 11 x64
|
||||
- Target class: standard non-elevated Windows dialog
|
||||
- Rust toolchain: rustc/cargo 1.97.1
|
||||
- MSVC C++ build tools: verified by the Windows test and Tauri build
|
||||
- Elevated target testing: negative boundary only
|
||||
|
||||
## Minimal validation implementation
|
||||
|
||||
The Spike is expected to:
|
||||
|
||||
- Identify the current foreground window.
|
||||
- Return bounded title, process, and UI Automation text fields.
|
||||
- Report unsupported, inaccessible, closed, or elevated targets safely.
|
||||
- Capture only the window explicitly selected by the user.
|
||||
- Keep image bytes in Rust until a display-safe preview is produced.
|
||||
- Delete transient capture data after the diagnostic flow unless the user explicitly saves it.
|
||||
|
||||
## Required execution
|
||||
|
||||
1. Open a standard non-elevated dialog with known text.
|
||||
2. Read its title and UI Automation text.
|
||||
3. Verify an unsupported or custom-drawn window produces a structured fallback result.
|
||||
4. Select one window and capture only its client/window bounds.
|
||||
5. Verify a closed or invalid handle does not capture another window.
|
||||
6. Attempt an elevated target and confirm a safe access-denied result without elevation.
|
||||
7. Confirm transient image data is removed after the test.
|
||||
|
||||
## Actual execution result
|
||||
|
||||
The ignored Windows smoke test opened a test-owned standard MessageBox containing fixed, non-sensitive text. It selected only that foreground HWND, verified title and process identity, read the expected title/body through UI Automation, captured the same selected window through PrintWindow, and validated an in-memory PNG without writing image bytes to disk.
|
||||
|
||||
The test then closed the controlled dialog and verified that the expired HWND identity returned `WindowChanged` and could not capture a replacement window. The test passed in 0.12 seconds.
|
||||
|
||||
An elevated target was not created because that would require a UAC/elevation action outside this bounded Spike. The implementation maps access denied and element-unavailable HRESULTs to structured errors, but a real elevated/custom-drawn target remains an explicit manual boundary test.
|
||||
|
||||
## Log summary
|
||||
|
||||
Command: `cargo test -p astrbot-desktop --test windows_dialog_smoke -- --ignored --nocapture`. Result: 1 passed. Output contained test status only; no extracted text or pixel bytes were logged or persisted.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- UI Automation does not expose all custom-rendered content.
|
||||
- Protected, elevated, DRM, or hardware-accelerated windows may reject inspection or capture.
|
||||
- DPI scaling and multi-monitor coordinates require explicit tests.
|
||||
|
||||
## Security impact
|
||||
|
||||
Window content can contain personal or secret data. Capture must be user-selected, bounded to one target, previewable, and excluded from durable logs.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Keep UI Automation as the preferred text path and selected-window capture as an explicit fallback. Do not add continuous desktop capture, global hooks, input injection, or privilege escalation.
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
# P00-04: Event Log and Read-Only Diagnostics
|
||||
|
||||
- Status: Passed for bounded local and loopback diagnostics
|
||||
- Date recorded: 2026-07-18
|
||||
- MVP gate: Required before exposing local diagnostic tools
|
||||
|
||||
## Objective
|
||||
|
||||
Verify bounded, read-only collection of Windows event summaries, process and foreground-window metadata, port occupancy, network-target reachability, authorized log tails, configuration parsing, and local redaction.
|
||||
|
||||
## Environment
|
||||
|
||||
- Host: Windows 11 x64
|
||||
- Rust toolchain: rustc/cargo 1.97.1
|
||||
- MSVC C++ build tools: verified by native builds
|
||||
- Network targets: no production target authorized for this Spike
|
||||
- Event-log scope: explicit provider and time range only
|
||||
|
||||
## Minimal validation implementation
|
||||
|
||||
Each diagnostic operation must have a typed argument schema and explicit limits. It must return structured summaries, not arbitrary command output or unrelated full logs.
|
||||
|
||||
File reads must require a user-authorized path token, enforce size limits, prefer log tails, reject binary content, and redact before any preview or upload.
|
||||
|
||||
## Required execution
|
||||
|
||||
1. Query a known provider over a short time window and return a bounded summary.
|
||||
2. Apply provider, time, level, and optional process filtering.
|
||||
3. Inspect one explicitly identified process without controlling it.
|
||||
4. Check one port and one explicitly supplied network target.
|
||||
5. Read the tail of a disposable authorized log fixture.
|
||||
6. Parse JSON, YAML, TOML, and INI fixtures with limits.
|
||||
7. Redact fake tokens, passwords, cookies, API keys, URL credentials, connection-string passwords, and PEM material.
|
||||
8. Verify invalid provider, permission denial, timeout, malformed file, and oversized input errors.
|
||||
|
||||
## Actual execution result
|
||||
|
||||
Passed. Windows-native tests executed a bounded recent Event Log query, inspected the current process and foreground-window metadata, identified the owner PID of a test-created TCP listener, and exercised structured error handling.
|
||||
|
||||
Disposable local fixtures verified authorized log-tail reads, JSON/YAML/TOML/INI parsing limits, binary/oversized rejection, and redaction of fake bearer tokens, passwords, cookies, API keys, URL credentials, connection-string secrets, and PEM material.
|
||||
|
||||
Network reachability coverage is limited to explicit loopback fixtures; no production or user network target was contacted.
|
||||
|
||||
## Log summary
|
||||
|
||||
Commands: `cargo test --workspace` plus the Windows native-provider tests. Result: passed. Event content and fake secrets were not printed; only bounded result categories and test status were retained.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- Some event channels require permissions unavailable to a standard user.
|
||||
- Provider names and event schemas vary by installed software.
|
||||
- Reachability is not proof that an application protocol is healthy.
|
||||
- Parser support does not authorize arbitrary file access.
|
||||
|
||||
## Security impact
|
||||
|
||||
Overbroad queries can disclose unrelated personal or security information. Every diagnostic must be locally authorized, scope-limited, and redacted before leaving Rust.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Implement independent typed tools rather than a generic diagnostics command. Keep all Windows queries read-only and return partial results with explicit access boundaries.
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
# P00-05: NAS File Transaction
|
||||
|
||||
- Status: Local transaction and recovery passed; real UNC execution blocked by missing authorized fixture
|
||||
- Date recorded: 2026-07-18
|
||||
- MVP gate: Required before any NAS write feature
|
||||
|
||||
## Objective
|
||||
|
||||
Verify a recoverable UNC transaction using plan, dry run, temporary copy, size and SHA-256 verification, atomic destination commit, conflict handling, and interruption recovery while preserving the source.
|
||||
|
||||
## Environment
|
||||
|
||||
- Host: Windows 11 x64
|
||||
- Authorized UNC fixture: not supplied
|
||||
- Rust toolchain: rustc/cargo 1.97.1
|
||||
- MSVC C++ build tools: verified by native builds
|
||||
- Real user or production files: prohibited
|
||||
|
||||
## Minimal validation implementation
|
||||
|
||||
The Spike is expected to operate only on a user-authorized disposable source fixture and destination share. It must:
|
||||
|
||||
- Tokenize the selected source path.
|
||||
- Reject paths outside the authorized source and destination roots.
|
||||
- Produce a non-mutating dry-run plan.
|
||||
- Copy to a unique temporary destination.
|
||||
- Verify byte count and SHA-256.
|
||||
- Commit by renaming within the destination filesystem.
|
||||
- Apply ask, rename, or skip conflict policy without overwrite.
|
||||
- Persist resumable transaction state without credentials.
|
||||
- Preserve the source in every P00 outcome.
|
||||
|
||||
## Required execution
|
||||
|
||||
1. Obtain explicit user authorization for disposable source and UNC destination fixtures.
|
||||
2. Generate unique test data inside the fixture.
|
||||
3. Execute and inspect a dry run.
|
||||
4. Copy to a temporary destination and verify size and SHA-256.
|
||||
5. Commit to the final name and confirm the source still exists.
|
||||
6. Exercise ask, rename, and skip conflicts.
|
||||
7. Interrupt during copy and verify no final destination is exposed.
|
||||
8. Resume or restart safely and verify source preservation.
|
||||
9. Inject hash mismatch and confirm no commit or cleanup occurs.
|
||||
|
||||
## Actual execution result
|
||||
|
||||
The transaction implementation and disposable local-fixture tests passed. They cover non-mutating plan/dry-run, copy to a unique temporary name, byte-count and SHA-256 verification, atomic final rename, ask/rename/skip conflict behavior without overwrite, injected interruption and hash mismatch, restart-safe state, and source preservation.
|
||||
|
||||
No real UNC path was read or written. The user did not identify an authorized disposable source directory and destination share, so executing the same flow against a NAS would violate the project safety rule.
|
||||
|
||||
This is an environment/authorization block for the UNC transport check, not a claim that SMB interruption behavior passed.
|
||||
|
||||
## Log summary
|
||||
|
||||
Command: `cargo test --workspace` on generated temporary directories. Result: passed. No source fixture was deleted, no existing destination was overwritten, and no NAS credential was used or logged.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- Atomic rename guarantees depend on the destination filesystem and share behavior.
|
||||
- Network interruption and SMB caching can affect observability.
|
||||
- P00 does not validate recycle-bin or source-cleanup behavior.
|
||||
- Performance on large files remains unmeasured.
|
||||
|
||||
## Security impact
|
||||
|
||||
Silent overwrite or premature source cleanup can cause data loss. Credentials must remain in Windows secure storage, and remote payloads must never provide unrestricted local or UNC paths.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Do not enable NAS writes until this Spike has executed against a disposable authorized share. P00 must preserve sources and treat source cleanup only as a non-executed plan field.
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
# P00-06: SQLite Profile Isolation
|
||||
|
||||
- Status: Passed on a disposable SQLite database
|
||||
- Date recorded: 2026-07-18
|
||||
- MVP gate: Required before persistent dual-instance data
|
||||
|
||||
## Objective
|
||||
|
||||
Verify schema and repository isolation for multiple saved profiles and two active slots, including collisions in server, conversation, message, cursor, proposal, and transaction identifiers.
|
||||
|
||||
## Environment
|
||||
|
||||
- SQLite implementation: rusqlite 0.40.1 with bundled SQLite
|
||||
- Rust toolchain: rustc/cargo 1.97.1
|
||||
- Migration execution: transactional disposable fixture
|
||||
- Persistent user database: not created
|
||||
|
||||
## Minimal validation implementation
|
||||
|
||||
The Spike is expected to use a disposable database and transactional migrations. Server-derived tables must include profile_id and server_instance_id. Conversation and message keys must remain unique within their profile and server context.
|
||||
|
||||
Credential values must never be stored; only opaque credential references are permitted.
|
||||
|
||||
## Required execution
|
||||
|
||||
1. Create at least five profiles with only two active slots.
|
||||
2. Store identical conversation_id and message_id values for two different profiles.
|
||||
3. Store independent SSE cursors, unread counts, errors, proposals, and transaction summaries.
|
||||
4. Query each profile and verify no cross-profile result.
|
||||
5. Verify a duplicate within the same composite key is rejected or deterministically updated.
|
||||
6. Verify credential values are absent from all tables.
|
||||
7. Interrupt a transaction and confirm rollback or recovery.
|
||||
8. Reopen the database and repeat isolation checks.
|
||||
|
||||
## Actual execution result
|
||||
|
||||
Passed. Tests created multiple saved profiles with only companion and operations active slots, inserted intentionally colliding server/conversation/message identifiers under different composite profile keys, and verified independent reads.
|
||||
|
||||
Tests also covered separate SSE cursors, unread/error state, proposals and file-transaction summaries, duplicate composite-key behavior, transaction rollback, reopen/requery behavior, and schema inspection confirming that credential values are absent.
|
||||
|
||||
All database files were disposable test fixtures; no migration touched user data.
|
||||
|
||||
## Log summary
|
||||
|
||||
Command: `cargo test --workspace`. Result: passed, including SQLite migration and isolation tests. Logs contained test status only and no stored content values.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- Migration backup and recovery behavior remain unverified.
|
||||
- WAL behavior on abrupt process termination remains unverified.
|
||||
- Encryption at rest is not provided by ordinary SQLite and does not replace Credential Manager.
|
||||
|
||||
## Security impact
|
||||
|
||||
Incorrect composite keys can mix conversations or local-tool state between companion and operations profiles. Storing credential values would violate the security model.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Use transactional migrations, foreign keys, explicit composite uniqueness, and a disposable database for isolation tests. Any migration with potential data loss requires a separate stop-and-review decision.
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
# P00-07: Protocol Schema and Dual Mock Gateway
|
||||
|
||||
- Status: Passed for the provisional desktop-v1alpha1 contract
|
||||
- Date recorded: 2026-07-18
|
||||
- MVP gate: Required for repeatable connection and policy tests
|
||||
|
||||
## Objective
|
||||
|
||||
Define a provisional desktop-v1alpha1 protocol and verify two independently configurable Mock Gateway instances without claiming compatibility with an unavailable real AstrBot Gateway.
|
||||
|
||||
## Environment
|
||||
|
||||
- Forgejo API and HTTP Git endpoint reachable; SSH origin remains unusable
|
||||
- Real AstrBot Gateway: not connected
|
||||
- Package dependencies: installed from pnpm/Cargo lockfiles
|
||||
- Mock execution: two loopback instances verified
|
||||
|
||||
## Minimal validation implementation
|
||||
|
||||
The provisional schema must cover ConnectionProfile, ConnectionSlot, ConnectionState, ServerCapabilities, ClientCapabilities, ProtocolEnvelope, GatewayEvent, ToolProposal, ToolResult, DiagnosticBundle, and FileTransferPlan.
|
||||
|
||||
The Mock Gateway must expose health, server information, capabilities, fake authentication, SSE, proactive messages, disconnect injection, duplicate events, companion messages, and operations tool proposals. It must support two simultaneous instances with independent identity and behavior.
|
||||
|
||||
## Required execution
|
||||
|
||||
1. Validate representative valid fixtures against every schema.
|
||||
2. Reject missing, unknown, malformed, oversized, and wrong-version fields as defined by policy.
|
||||
3. Start two mocks on dynamic loopback ports.
|
||||
4. Verify independent server_instance_id and capabilities.
|
||||
5. Exercise authentication success and failure with fake values.
|
||||
6. Stream normal, duplicate, delayed, disconnected, and tool-proposal events.
|
||||
7. Confirm companion-origin tool proposals are rejected by the client policy boundary.
|
||||
8. Record any divergence found during a later real Gateway review.
|
||||
|
||||
## Actual execution result
|
||||
|
||||
Passed for the provisional contract. The canonical Rust protocol package exports ten JSON Schemas and TypeScript types. Valid/invalid fixtures, unknown-field rejection, protocol-version checks, and schema drift checks passed.
|
||||
|
||||
Two independently configured loopback Mock Gateways passed health, server-info, capability, fake-auth success/failure, SSE, duplicate-event, disconnect/reconnect, proactive companion message, and operations tool-proposal tests.
|
||||
|
||||
Client integration tests verified local Rust-side profile binding, independent event-id deduplication, identical remote identifiers without cross-routing, and one-slot reconnect while the other slot continued. Compatibility with a real AstrBot Gateway remains explicitly unclaimed.
|
||||
|
||||
## Log summary
|
||||
|
||||
Commands: protocol contract/schema tests, Mock Gateway tests, and `cargo test --workspace`. Results: 5 protocol tests, 4 Mock Gateway integration tests, and the wider Rust suite passed. Only generated fake credentials were used.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- Endpoint names, authentication fields, ACK behavior, event retention, error codes, and capability names are provisional.
|
||||
- Mock success cannot prove interoperability with AstrBot.
|
||||
- Loopback HTTP tests do not validate production TLS or certificate identity.
|
||||
|
||||
## Security impact
|
||||
|
||||
Schemas form the first validation boundary for untrusted remote data. Mock convenience behavior must not weaken production parsing, profile binding, role checks, or TLS validation.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Version the schema explicitly, keep invalid fixtures alongside valid ones, and require a real Gateway contract review before declaring protocol compatibility.
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
# P00-08: Build, CI, and Release Readiness
|
||||
|
||||
- Status: Local Windows build passed; Forgejo CI, signing, and updater release configuration remain pending
|
||||
- Date recorded: 2026-07-18
|
||||
- MVP gate: Required before declaring P00 complete
|
||||
|
||||
## Objective
|
||||
|
||||
Verify reproducible frontend, Rust, Tauri development, Windows production-build, Forgejo CI, installer, updater, and signing prerequisites without creating temporary release credentials or claiming unexecuted jobs passed.
|
||||
|
||||
## Environment
|
||||
|
||||
- Node.js: 24.17.0 detected
|
||||
- pnpm: 11.9.0 detected
|
||||
- Rust/Cargo: 1.97.1 detected and verified
|
||||
- MSVC C++ build tools: verified by debug and release links
|
||||
- WebView2: previously detected
|
||||
- Forgejo SSH endpoint: connection refused at localhost:18086
|
||||
- Forgejo runner labels: unknown
|
||||
- Windows code-signing certificate: not configured
|
||||
- Tauri updater signing key and endpoint: not configured
|
||||
|
||||
## Minimal validation implementation
|
||||
|
||||
The repository pins Node, pnpm, Rust, direct JavaScript dependencies, and lockfiles. Local scripts cover frontend and Rust checks. Forgejo CI provides:
|
||||
|
||||
- A portable Linux quality job for frontend, workspace, and Rust checks.
|
||||
- A Windows Tauri job guarded by the ENABLE_WINDOWS_TAURI_CI repository variable.
|
||||
- No publication, release upload, or long-lived secret use.
|
||||
|
||||
## Required execution
|
||||
|
||||
1. Install dependencies from committed lockfiles.
|
||||
2. Run frontend format, lint, typecheck, unit tests, and production build.
|
||||
3. Run Rust fmt, Clippy with warnings denied, tests, and check.
|
||||
4. Start Tauri development mode on Windows and verify IPC plus tray hide/restore.
|
||||
5. Run the Windows Tauri production build.
|
||||
6. Inspect Forgejo runner labels and enable only jobs with verified prerequisites.
|
||||
7. Run the Forgejo workflow and retain sanitized results.
|
||||
8. Record installer bundle prerequisites.
|
||||
9. Record code-signing and updater requirements without generating temporary production keys.
|
||||
|
||||
## Actual execution result
|
||||
|
||||
Local Windows validation passed: frontend format/lint/type/unit/build checks, Playwright Chrome smoke, Rust fmt/check/Clippy/tests, Tauri development launch, release executable build, and NSIS bundle generation all completed successfully.
|
||||
|
||||
The first two bundle attempts timed out while Tauri downloaded its official NSIS archive. The official tauri-bundler 2.9.4 source confirmed the standard cache path and embedded SHA-1 values. The NSIS 3.11 archive and nsis-tauri-utils 0.5.3 DLL were then downloaded from their official Tauri release URLs, matched the embedded SHA-1 values, installed into the standard cache, and the bundle succeeded.
|
||||
|
||||
Installer: `AstrBot Desktop_0.1.0-alpha.0_x64-setup.exe`, 3,552,257 bytes, SHA-256 `BF87DCD13B81C18EFC9A2DB8DE6E201396FFBB9ABA0EABC579A22479C004816C`.
|
||||
|
||||
Forgejo API confirmed the repository existed and was empty before initialization. Git Credential Manager reauthentication then enabled a normal, non-forced HTTP push of `main` at `0d12b94`, and `feat/p00-bootstrap` was created from that baseline. The configured SSH origin `localhost:18086` still refuses connections; the LAN SSH endpoint responds but rejects the available key. The workflow file has not run, and the action-runner jobs endpoint returned 404, so no CI success is claimed.
|
||||
|
||||
## Log summary
|
||||
|
||||
Local command logs support the Windows build claims. No Forgejo workflow, code-signing, updater-signing, or publication result exists.
|
||||
|
||||
## Known limitations
|
||||
|
||||
- The ubuntu-latest and windows-latest labels are assumptions until a Forgejo act_runner is inspected.
|
||||
- Linux checks cannot certify Windows Credential Manager, UI Automation, Event Log, window capture, UNC behavior, tray behavior, or Windows bundling.
|
||||
- Action availability and outbound registry access are unknown.
|
||||
- Code signing and updater verification remain release-stage work.
|
||||
|
||||
## Security impact
|
||||
|
||||
CI must not receive AstrBot, NAS, SSH, signing, or updater secrets during P00. Action references should be pinned to reviewed commit hashes after runner connectivity is restored.
|
||||
|
||||
## Recommendation
|
||||
|
||||
Treat Windows local checks as mandatory until a trusted Windows runner is configured. Mark the Windows job skipped when the enabling variable is absent, and never interpret that skip as a successful Windows build.
|
||||
5
docs/spikes/README.md
普通文件
5
docs/spikes/README.md
普通文件
|
|
@ -0,0 +1,5 @@
|
|||
# Technical Spikes
|
||||
|
||||
Each Spike report must record its objective, environment, minimal implementation, actual commands and results, log summary, limitations, security impact, MVP blocking status, and recommended production approach.
|
||||
|
||||
Reports must distinguish verified behavior from planned or blocked work.
|
||||
107
tests/README.md
普通文件
107
tests/README.md
普通文件
|
|
@ -0,0 +1,107 @@
|
|||
# Test Strategy
|
||||
|
||||
## Current status
|
||||
|
||||
Local P00 frontend, Rust, browser, Tauri, Windows-native, installer, and 30-minute dual-SSE checks have recorded results.
|
||||
|
||||
As of 2026-07-18:
|
||||
|
||||
- Forgejo API/HTTP Git are reachable and the repository is verified empty; the configured SSH origin is not usable.
|
||||
- Forgejo workflow execution and runner labels remain unverified.
|
||||
- Rust 1.97.1, MSVC linking, Tauri development, release executable, and NSIS bundling are verified locally.
|
||||
- No user-authorized UNC test directory has been supplied.
|
||||
|
||||
Unexecuted or externally blocked items remain labeled below and are not counted as passes.
|
||||
|
||||
## Test layers
|
||||
|
||||
| Layer | Intended command or procedure | Platform | Current result |
|
||||
| --------------------------------------------------- | --------------------------------------- | ---------------- | --------------------------------------------------------------- |
|
||||
| Frontend format, lint, typecheck, unit tests, build | `pnpm check:frontend` | Windows or Linux | Passed |
|
||||
| Browser smoke | `pnpm test:e2e` | Windows | Passed: 1 Chromium test |
|
||||
| Rust formatting | `cargo fmt --all -- --check` | Rust host | Passed |
|
||||
| Rust Clippy | `cargo clippy ... -- -D warnings` | Rust host | Passed |
|
||||
| Rust unit and integration tests | `cargo test --workspace` | Rust host | Passed: 40 tests; 2 explicit manual tests ignored |
|
||||
| Rust compile check | `cargo check --workspace --all-targets` | Rust host | Passed |
|
||||
| Tauri development smoke | `pnpm tauri:dev` | Windows | Passed: window launched and remained responsive |
|
||||
| Tauri NSIS production build | `pnpm tauri:build` | Windows | Passed: executable and NSIS installer |
|
||||
| Forgejo portable CI | `.forgejo/workflows/ci.yml` | Linux runner | Not executed: runner/API availability unverified |
|
||||
| Forgejo Windows build | `ENABLE_WINDOWS_TAURI_CI=true` | Windows runner | Disabled pending a verified runner |
|
||||
| UNC transaction Spike | Authorized disposable UNC fixture | Windows plus NAS | Local fixture passed; real UNC blocked by missing authorization |
|
||||
|
||||
## Automated coverage expectations
|
||||
|
||||
### Protocol and dual Mock Gateway
|
||||
|
||||
- Health, server-info, and capabilities endpoints for two mock instances.
|
||||
- Authentication success and failure using fake credentials only.
|
||||
- Concurrent A and B SSE streams.
|
||||
- Rust-side local profile binding despite a conflicting remote profile_id.
|
||||
- Independent connection state, cancellation, retry, and Last-Event-ID values.
|
||||
- Duplicate event_id suppression.
|
||||
- Disconnecting either mock without interrupting the other.
|
||||
- Identical conversation_id and message_id values across profiles without data mixing.
|
||||
|
||||
### Policy and redaction
|
||||
|
||||
- Companion-slot local-tool proposals are rejected.
|
||||
- Unknown tool names, expired requests, and wrong server identities are rejected.
|
||||
- Path traversal, unauthorized UNC paths, and arbitrary absolute paths are rejected.
|
||||
- Fake bearer tokens, passwords, cookies, API keys, URL credentials, and PEM material are redacted.
|
||||
- Tests and snapshots never contain a real credential.
|
||||
|
||||
### File transactions
|
||||
|
||||
- Planning and dry-run do not mutate source or destination.
|
||||
- Copy uses a temporary destination.
|
||||
- Size and SHA-256 must match before final commit.
|
||||
- ask, rename, and skip conflict policies never silently overwrite.
|
||||
- Interruption or verification failure preserves the source.
|
||||
- P00 never performs source cleanup.
|
||||
|
||||
## Windows manual and integration matrix
|
||||
|
||||
### Dual connection soak
|
||||
|
||||
Run two loopback Mock Gateway instances for at least 30 minutes. Record event counts per profile, duplicates suppressed, reconnect attempts, final connection states, process CPU, and resident memory. Stop A and B separately and confirm the surviving stream continues.
|
||||
|
||||
Status: passed after the shutdown-order fix. 1800.02 seconds, 1800 companion events, 1801 operations events, no cross-routing assertion. Final pre-exit sample: 1.38 CPU seconds, about 12.1 MiB working set, about 2.4 MiB private memory.
|
||||
|
||||
Command: `cargo test -p mock-gateway --test soak -- --ignored --nocapture`.
|
||||
|
||||
### Credential Manager
|
||||
|
||||
Use a clearly named test-only credential. Verify create, read, update, and delete from Rust; verify only an opaque reference is persisted; scan application output and storage for the fake secret value; remove the test credential at the end.
|
||||
|
||||
Status: passed with a generated fake secret; CRUD and cleanup verified.
|
||||
|
||||
### UI Automation and window capture
|
||||
|
||||
Use a standard non-elevated Windows dialog. Record structured UI Automation text when available. Verify a user-selected single-window capture fallback. Treat an elevated target as an expected access boundary; do not elevate the application or bypass Windows security.
|
||||
|
||||
Status: controlled non-elevated standard dialog passed; elevated/custom-drawn manual boundary remains.
|
||||
|
||||
### Event log and bounded diagnostics
|
||||
|
||||
Query only an explicit provider, time range, and optional process identifier. Return a structured summary rather than unrelated log content. Verify foreground-window, process, port, network-target, authorized log-tail, configuration parser, and redaction error paths.
|
||||
|
||||
Status: passed for bounded local and loopback fixtures.
|
||||
|
||||
### UNC file transaction
|
||||
|
||||
The user must explicitly identify a disposable source fixture and destination share. Generate unique test data, preserve the source, inject interruption only within the fixture, and never use an existing personal or production file. Record dry-run output, temporary copy, byte count, hash, final rename, conflict result, and recovery behavior.
|
||||
|
||||
Status: local transaction/recovery tests passed; real UNC remains blocked until an authorized disposable fixture is supplied.
|
||||
|
||||
## Result recording
|
||||
|
||||
Every executed check must record:
|
||||
|
||||
- Date and environment.
|
||||
- Exact command or bounded manual procedure.
|
||||
- Exit code or observed result.
|
||||
- Sanitized log summary.
|
||||
- Known limitations.
|
||||
- Whether the result blocks MVP.
|
||||
|
||||
An unexecuted, skipped, or blocked item must retain that label. A configured workflow or test is not evidence that it passed.
|
||||
正在加载…
添加表格
在新工单中引用