Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ PlanProof values correctness over persuasion.
- [x] PR 3.2: Validation Wiring
- [X] PR 3.3: 1-Shot Repair Loop
- [X] PR 4.1: Opik Trace Scaffolding
- [ ] PR 4.1.2 — Correct Opik Context Retrieval
- [ ] PR 4.2: Opik Metrics Integration

## Infrastructure
Expand Down
10 changes: 8 additions & 2 deletions apps/api/src/planproof_api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
PlanValidation,
ValidationMetrics,
)
from planproof_api.observability.opik import opik, opik_context
from opik import opik_context
from planproof_api.observability.opik import opik

router = APIRouter()

Expand Down Expand Up @@ -228,7 +229,12 @@ def create_plan(request: PlanRequest) -> PlanResponse:
),
errors=[str(exc)],
)
print(f"DEBUG: Trace ID: {opik.get_current_trace_id() or 'No Trace'}")
trace_id = "No Trace"
try:
trace_id = opik_context.get_current_trace_id() or "No Trace"
except Exception:
pass
print(f"DEBUG: Opik Trace ID: {trace_id}")

return PlanResponse(
plan=plan,
Expand Down
1 change: 1 addition & 0 deletions docs/assistant_prompts/codex_tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The implementation must conform to:
## Phase 4 — Observability

- [X] **PR 4.1:** Integrate Opik tracing hooks for each step (Extract -> Plan -> Validate -> Repair).
- [ ] **PR 4.1.2** — Correct Opik Context Retrieval
- [ ] **PR 4.2:** Ensure `validation.metrics` are logged as properties in the Opik trace.

---
Expand Down