Bound provider latency, retries, and retained query data
A stalled model call occupies a request indefinitely and debug logs retain full employee queries. Add a bounded provider port with safe audit metadata.
- Focused work estimate
- 2h 30m + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Provider interfaces · Resource limits · Privacy · Observability
Estimated field mix
- Applied AI40%
- Privacy engineering30%
- Site reliability30%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
Employees search fictional travel and equipment policies. The current prototype blends draft and approved text and sometimes answers using a policy the employee cannot open. Use a small synthetic corpus and a deterministic answer-provider double.
Setup prerequisites
- Author synthetic policy documents with revisions, effective dates, and access groups.
- Use a local deterministic provider double; paid model access is optional and not required.
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
- SEARCH-101 · Import policy documents with stable revision identities
- SEARCH-102 · Keep chunk citations anchored to the original policy text
- SEARCH-103 · Apply group access before ranking or sending context to a provider
- SEARCH-104 · Exclude drafts and future policies from current-policy answers
- SEARCH-105 · Reject answers with invented or mismatched citations
- SEARCH-106 · Return insufficient information when the corpus cannot answer
- SEARCH-107 · Contain instructions embedded in a retrieved document
Acceptance criteria
- Calls enforce timeout, attempt count, response-size, and token or equivalent local budget limits.
- Audit metadata records provider/model version, request template version, schema version, duration, retry count, and trace ID.
- Generic logs exclude raw questions, document text, and credentials; retention for any explicit debug store is configured separately.
Implementation constraints
- The default adapter is a local deterministic double.
- Cost is recorded when known and unavailable when not supplied; do not invent cost figures.
Verification to include
- Simulate a stalled call and confirm a bounded unavailable response and cancellation.
- Include secret marker text in query and context and scan normal diagnostics for leakage.
Deliverables
- Provider port, budget policy, and safe audit tests
Rollout and recovery
Enable one provider adapter at a time behind the validated port; fall back to source results on budget or timeout failure.
Value of the work
For the engineer: Practice access-aware retrieval, source provenance, structured model boundaries, and reproducible evaluation.
For the team: Inspect how an engineer prevents unsupported or unauthorized answers and handles changing policy content.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.