Skip to content

feat: improve message tracing and add bounded SQLite history - #10614

Merged
Soulter merged 1 commit into
masterfrom
codex/message-trace-master
Oct 18, 2026
Merged

Soulter merged 1 commit into
masterfrom
codex/message-trace-master

Conversation

@Soulter

@Soulter Soulter commented Oct 18, 2026

Copy link
Copy Markdown
Member

Summary

Replaces #10515, which was accidentally merged into codex/log-page-filters rather than master. This PR applies the tracing changes directly to the latest master; it does not depend on the old stacked branches.

  • Add an OpenTelemetry SDK-backed trace model and log correlation, preserving the JSON API and SSE without external exporters.
  • Persist trace history in a dedicated SQLite database with retention and capacity cleanup, orphan recovery, a minimum 32 MB budget, and bounded asynchronous writes (128 MiB total, 2 MiB per frame, no frame-count cap).
  • Redesign the trace explorer with server-side pagination, collapsible execution chains, metadata chips, token usage, and long-message previews.
  • Expose trace settings and separate trace cleanup, and move session-waiter dispatch into the core pipeline.
  • Preserve current master fixes for session isolation before registration, Windows configuration migration, and cron prompt cache stability. Adapt the session-isolation regression test to the event-context registry location.
  • Include the existing English and Chinese documentation and screenshots. Regenerate the frontend API client.

Validation

  • 138 trace, event lifecycle, session isolation, registry, session waiter, and waking-check tests passed.
  • 63 cron manager and context-compression tests passed.
  • Ruff format and check passed; git diff --check passed.
  • Frontend API client generation completed.
  • Full test suite and dashboard build were not run during this transplant.

* feat: expand message tracing and redesign trace explorer

* feat: add trace metadata chips and preserve response ownership

* feat: show full-width tracing list with optional details

* style: remove gray trace tab card

* feat: unify trace toolbar controls and use Vuetify datatable

* style: use native Vuetify trace table rows

* fix: prevent trace platform header wrapping

* feat: persist message traces in bounded SQLite storage

* fix: expose trace settings and preserve long prompt attributes

* docs: simplify trace storage setting hints

* feat: add trace history cleanup and disk usage accounting

* fix: finish event traces and fold Agent execution chains

* feat: fold long trace messages and consolidate persona metadata

* fix: hide redundant adapter event labels in traces

* refactor: remove redundant persisted span metadata

* feat: paginate trace history with Vuetify table controls

* style: reduce trace table text size

* style: increase trace table text to 13px

* style: flatten trace status chips and narrow platform column

* feat: show independent Agent and command trace types

* feat: show cumulative Agent token usage in trace details

* style: abbreviate trace token counts with k and M

* style: reduce trace table header height

* feat: show group and private chat trace types

* fix: include month and day in trace timestamps

* style: use system trace fonts and blue running status

* style: separate trace origin and sender metadata rows

* fix: trace successful proactive message tool deliveries

* feat: show model persona and tool counts on Agent headings

* style: prefix trace plugin chips with puzzle icons

* style: add icons and spacing to Agent metadata chips

* style: remove execution mode prefix from trace chips

* refactor: centralize response tracing without source attribution

* style: hide module metadata in trace details

* refactor: omit redundant module metadata from plugin traces

* refactor: remove obsolete module filtering from trace UI

* feat: expose trace recording toggle in system settings

* docs: simplify trace recording setting description

* feat: retain traces only for command responses and Agent calls

* fix: revert trace admission filtering and expand writer queue

* refactor: adopt OpenTelemetry SDK and simplify trace tests

* refactor: separate event and trace execution contexts

* fix: include OpenTelemetry SDK in runtime requirements

* refactor: dispatch session waiters in the core pipeline

Preserve access and safety checks before waiter dispatch and limit built-in group context handlers to group messages.

* test: remove trace dashboard tests

* fix: recover orphaned traces and enforce minimum storage budget

* fix: increase trace queue byte budgets and remove frame count limit
@sourcery-ai

sourcery-ai Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Sorry @Soulter, your pull request is larger than the review limit of 150,000 diff characters

@Soulter
Soulter merged commit 8774e53 into master Oct 18, 2026
20 of 23 checks passed
BegoniaHe pushed a commit to Xero-Team/AstrBot that referenced this pull request Oct 20, 2026
…Devs#10515) (AstrBotDevs#10614)

Adapt the OpenTelemetry-backed trace model and bounded SQLite history to the
fork's grouped configuration, per-runtime session waiter registry, sanitized
logging pipeline, and MDI-only Dashboard. Trace upserts keep completed traces
closed when update timestamps collide.

Upstream-Commit: 8774e53
Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com>
Upstream-PR: AstrBotDevs#10614
Sync-Disposition: adapt
Fork-Adaptation: Kept grouped trace.* settings and schema_revision 4, per-runtime session_waiter_registry, sanitized log broker, event_context temp-file ownership, and MDI icons; omitted ja-JP/ru-RU and upstream log format trace tags.
Tested: uv run pytest tests/unit -q --test-profile blocking; cd dashboard && pnpm typecheck && pnpm test && pnpm i18n:check
AI-Generated: true
Generated-At: 2026-10-20T08:35:38Z
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.

1 participant