Skip to content

Release: tracing + support widget + Clio MCP (Phases 1-3) - #42

Merged
Chaddacus merged 1 commit into
mainfrom
dev
Jun 29, 2026
Merged

Chaddacus merged 1 commit into
mainfrom
dev

Conversation

@Chaddacus

Copy link
Copy Markdown
Owner

Promote dev → main. Phases 1-3 verified (122 backend tests, Playwright green). https://claude.ai/code/session_01BzkXTG6PfbUdFoif8kBeyw

* Add end-to-end trace propagation (browser -> API -> Celery -> Deepgram)

Carry the X-Request-ID/trace id from the frontend upload through the
request middleware into the Celery transcription task and the Deepgram
call, persist it on the VoiceNote, and expose it on the detail API so a
single id correlates the whole transcription lifecycle in the logs.

- middleware.set_request_id() re-establishes the trace context in tasks
- VoiceNote.trace_id field (migration 0008) + detail-serializer exposure
- tasks log span timing; Deepgram service logs API latency under the id
- frontend originates the id as X-Request-ID on upload

106 backend tests pass; verified end-to-end in the celery logs.

Claude-Session: https://claude.ai/code/session_01BzkXTG6PfbUdFoif8kBeyw

* Add support widget backend: sufficiency gate + codex issue creation

Phase 2 of the self-heal pipeline (backend half). Users submit a change
request / bug report; a deterministic sufficiency gate bounces vague
submissions with a concrete reason (no LLM, no issue spam), and a
sufficient request is turned into a `codex`-labelled GitHub issue
carrying the note's trace id so the agent can pull the exact logs.

- SupportRequest model (lifecycle: needs_detail -> submitted -> issue_created)
- support_gate.evaluate(): deterministic length/feature/detail predicates
- POST/GET /api/support/ (owner-scoped), 201 with gate verdict
- create_support_issue_task: GitHub issue via token, no-op until configured
- GITHUB_TOKEN/GITHUB_REPO/CODEX_LABEL settings

116 backend tests pass (10 new).

Claude-Session: https://claude.ai/code/session_01BzkXTG6PfbUdFoif8kBeyw

* Add in-app support widget (Phase 2 frontend)

A floating Support button on every authenticated page opens a modal to
file a bug / change / feature request. It posts to /api/support/; the
deterministic gate's "needs more detail" verdict renders inline so the
user can revise without losing their text, and a sufficient request
confirms hand-off to the codex pipeline (with a GitHub issue link once
the token is configured).

Verified end-to-end with Playwright: login -> Support FAB -> modal ->
vague text bounced by the gate -> grounded text accepted.

Claude-Session: https://claude.ai/code/session_01BzkXTG6PfbUdFoif8kBeyw

* Add Clio MCP server for the wren self-heal loop (Phase 3)

A FastMCP server (chad-agent streamable-http pattern) giving wren read
access to Clio's tracing/support/health plus one controlled write. The
data logic lives in clio_mcp/queries.py (unit-tested) with thin
@mcp.tool() wrappers in clio_mcp/server.py.

Surface (scoped on purpose):
- read: app_health, list_pending_support_requests, get_support_request,
  get_trace, recent_transcription_failures
- write: update_support_request_status (lifecycle only; never user data)

Verified: 6 query tests green, server boots streamable-http on :8123 with
all 6 tools registered. Gateway catalog entry prepared in
clio_mcp/gateway-entry.json (not applied — the mcp-gateway repo has
in-flight WIP, so registration is left as a documented step).

122 backend tests pass.

Claude-Session: https://claude.ai/code/session_01BzkXTG6PfbUdFoif8kBeyw

* Add modular autofix profile for Clio (Phase 4 contract)

Per-repo profile the (to-be-generalized) wren autofix engine reads from
<repo>/.github/autofix.json: trigger label, dev integration branch,
test/deploy/smoke commands, and the supervisor config (protected main,
size caps, sensitive paths, escalate triggers). The prod deploy bakes in
the frontend-restart-last fix for the nginx-upstream 502.

Claude-Session: https://claude.ai/code/session_01BzkXTG6PfbUdFoif8kBeyw

---------

Co-authored-by: Chad Simon <chadsimon@Chads-MacBook-Pro.local>
@Chaddacus
Chaddacus merged commit 1ea2158 into main Jun 29, 2026
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