Skip to content

feat(desktop): collect bounded session observations and safe diagnostics - #2234

Open
sunlight798 wants to merge 2 commits into
oceanbase:masterfrom
sunlight798:feat/desktop-session-observations
Open

sunlight798 wants to merge 2 commits into
oceanbase:masterfrom
sunlight798:feat/desktop-session-observations

Conversation

@sunlight798

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Refs #2107 — implements PR 05-A: Native request observations and safe projection, following RFC #1455.

#2107 remains open for the 05-B UI and installed-platform acceptance.

Rationale for this change

Desktop needs bounded session observations to explain request outcomes and latency while preserving cancellation, uncertain-write semantics, and privacy. Collect measurements at the native boundary and expose an explicitly allowlisted diagnostic summary.

What changes are included in this PR?

  • Record HTTP requests separately from native Memory/Scope user operations, including identity-check requests.
  • Preserve success, failure, cancellation, and unknown-write outcomes.
  • Retain at most 512 terminal records in memory, with reset, eviction, and collection-loss metadata.
  • Isolate collector failures from business results and cancellation.
  • Add trusted summary, reset, and diagnostic-preview IPC commands with generated TypeScript types.
  • Exclude content, queries, credentials, endpoints, target identities, private paths, and raw errors from diagnostic output.
  • Add regression tests and bilingual documentation. JSON comparison tests normalize both sides through serialization and parsing to handle floating-point round-trip behavior consistently.

Are there any user-facing changes?

This PR provides the native foundation for This session. The page and explicit preview/copy interaction are delivered separately in 05-B.

There are no breaking HTTP API or persisted-format changes.

How was this change tested?

Windows x64 validation used Rust 1.95.0, Node 24.14.1, and pnpm 11.13.1:

  • Rust formatting, Clippy, generated IPC checks, and all 62 native tests passed.
  • Desktop lint, TypeScript checks, production build, and all 98 UI tests passed.
  • Website lint, link validation, lockfile verification, and Desktop contract tests passed.

Local testing was also completed on macOS.

Regression coverage includes bounded retention, reset during in-flight writes, measurement units, cancellation, unknown writes, sensitive-data exclusion, IPC permissions, and collector failure isolation.

Windows repository-wide ty check reports existing POSIX-only attribute errors in unchanged Python files; the Linux-target type check passed.

Native integration tests use synthetic loopback HTTP responses and mocked Tauri IPC. Installed clipboard behavior for 05-B and release qualification remain separate delivery work.

AI usage statement

OpenAI Codex (GPT-6) assisted with implementation, tests, documentation, and code review.

Record native HTTP requests and Memory/Scope actions with bounded retention, safe projection and cancellation/write certainty semantics. Expose trusted summary, reset and diagnostic preview IPC with generated types and bilingual contracts.

Refs oceanbase#2107 (05-A)
Copilot AI balanced review requested due to automatic review settings October 25, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants