API lesson 07 · Secure and observe calls
Shared system · deterministic provider fixtures
Harbor Support Drafting API. One bounded request moves through typed items, tools, state, budgets, and evidence without live provider calls.
01 · Smallest useful mechanism
Production telemetry should connect user-visible outcomes to request versions, provider events, tools, policy decisions, usage, latency, and evaluations while minimizing sensitive content.
Log the decision structure and references; sample sensitive payloads only under an explicit policy.
02 · Experiment
Deterministic protocol fixture
This workbench uses inspectable provider-event fixtures and injected failures. It does not make live calls or execute external effects.
Protocol workbench · harbor-trace-v1
Injected failure
The draft cites the wrong policy and the debug logger captured full messages.
The trace has not run.
Commit to an implementation, then inject the failure and inspect the actual state transitions.
03 · Implementation brief
Your learning artifact
Stored only in this browser. No account required; course reset does not delete it.
04 · Check your understanding
Primary sources · verified 2026-08-02
Without semantic traces incidents are guesses; with indiscriminate prompt logging the observability system becomes a high-value copy of private data and credentials.
Common mistake: Redacting API keys is enough to make full prompt logging safe. Prompts and tool results can contain personal, confidential, regulated, or cross-tenant data even without credentials.
Transfer exercise: Design a trace that proves which policy and tool result supported a draft without storing the customer’s message body.
Next: The capstone combines the item contract, streaming, schemas, tools, state, budgets, and semantic evidence into one provider-portable service.