Skip to content

log plan lifecycle without a tracing vendor - #12

Merged
o-mid merged 1 commit into
mainfrom
feat/plan-observability
Sep 17, 2026
Merged

o-mid merged 1 commit into
mainfrom
feat/plan-observability

Conversation

@o-mid

@o-mid o-mid commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Problem

Plan decisions already land in Mongo as AuditEvent rows. Operators watching the API process had no structured lifecycle line with intent id, plan id, policy codes, planner latency, and tokens. A tracing vendor would have been extra machinery for a local demo.

Solution

recordPlanEvent still writes AuditEvent, then prints one JSON object on stdout: event, intentId, planId, policyCodes, latencyMs, tokens. Intent create, policy reject, approve, and complete all go through it. No Langfuse or other tracing vendor.

How to test

cd services/api && npm ci && npm test

Check src/observability/planLog.test.ts and the plan.rejected_policy case in intentPipeline.test.ts. Run the API and grep stdout for "event":"plan.awaiting_approval".

Stdout carries intent id, plan id, policy codes, latency, and tokens without a tracing vendor.
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
guardrail-agent Ready Ready Preview Sep 17, 2026 12:27pm UTC

@o-mid
o-mid merged commit 1677160 into main Sep 17, 2026
9 checks passed

This branch was successfully deployed

1 active deployment
Preview — 40cc29c4 Deployed Sep 17, 2026 by vercel[bot]
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