Apply group access before ranking or sending context to a provider
A general employee query retrieves a restricted executive travel exception. Hiding the final link is too late because the provider has already received the text. Enforce scope at retrieval and again at answer delivery.
- Focused work estimate
- 4h + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Authorization · Retrieval security · Race conditions · Tenant isolation
Estimated field mix
- Security60%
- Applied AI40%
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.
Acceptance criteria
- The repository query limits candidates to the caller tenant and current allowed groups before ranking.
- The provider receives no unauthorized chunk text or metadata.
- Access revoked between retrieval and response prevents affected citations and answer content from being delivered.
Implementation constraints
- Use server-derived membership; never trust group IDs from the query body.
- Do not share cached contexts across permission scopes.
Verification to include
- Query identical terms as users in different groups and inspect the exact provider request.
- Revoke a group after retrieval using a barrier and verify delivery fails closed without restricted text.
Deliverables
- Access-scoped retrieval and revocation race tests
Rollout and recovery
Disable answer generation for any request whose permission snapshot cannot be revalidated; deploy scoped retrieval before enabling ranking.
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.