Skip to content

Trace Recorder — TraceStore interface, MySQL sink, DP fields#244

Open
a-yeyang wants to merge 7 commits into
scitix:mainfrom
a-yeyang:yye-feat-trace-store
Open

Trace Recorder — TraceStore interface, MySQL sink, DP fields#244
a-yeyang wants to merge 7 commits into
scitix:mainfrom
a-yeyang:yye-feat-trace-store

Conversation

@a-yeyang
Copy link
Copy Markdown
Contributor

Summary

  • Extract TraceStore interface (insert / upsert / getById / list / close) — recorder depends only on the interface (no SQLite / Gateway API references). Local JSON file output kept per spec.
  • Add MysqlTraceStore + CompositeTraceStore (dual-write, warn on partial failure); SqliteTraceStore kept as default impl.
  • Env-driven config: SICLAW_TRACE_MYSQL_ENABLED / SICLAW_TRACE_SQLITE_ENABLED / SICLAW_TRACE_MYSQL_URL. Default: MySQL on, SQLite off.
  • New JSON-body + DB columns: isInjectedPrompt (UI-button classifier) and dpStatusEnd.
  • Two-phase persistence (stub at beginPrompt → UPSERT at flush) preserves rows across hung prompts.
  • New recordSteerEvent captures DP button clicks ([DP_CONFIRM] etc.) that bypass /api/prompt.
  • Preserved: JSON file output, schemaVersion, /api/traces API, explicit-boundary mode.

Query MySQL

kubectl exec -it siclaw-trace-db-6964dd6859-nw7td -- \
  mysql -u root -psiclawsiclawsiclaw --default-character-set=utf8mb4


SELECT id, session_id, username, user_message, mode, brain_type, model_name,
       outcome, duration_ms, cost_usd, created_at
  FROM siclaw_traces.agent_traces ORDER BY created_at DESC LIMIT 3;

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