Follow-up to RLAC P5 (#295). P5 added cross-runtime conformance for the header-free RLAC surface — rlac-principals-lifecycle (CRUD) and rlac-policy-compile-preview (which pins the compiled filter shape {$or:[{visible_to:caller},{visible_to:"*"}]}). The visibility-filtering fixtures still need authoring:
rlac-document-visibility-filtering — RLAC on + a policy + principals + docs with mixed visibleTo; GET /documents as alice vs bob returns only the docs each may see; POST /search merges the policy filter.
rlac-chunk-listing-denial — GET …/documents/{id}/chunks 404s a principal who can't see the doc; 401 when no principal resolves.
These require setting the x-view-as-principal request header per step (the only way to bind a principal in the conformance harness's auth.mode: disabled). The harness doesn't support per-step headers today, so this needs a small but cross-runtime extension:
- Add
headers?: Record<string,string> to the scenario step schema (conformance-regenerate.ts Scenario).
- Thread it through the regenerate fetcher (
app.request init) and capture it in the fixture request shape.
- Update
conformance/runner.mjs runScenario + the cross-runtime fetcher signature ((method, path, body?, headers?)) — Python/Java harnesses gain an optional 4th param.
- Author the two scenarios + regenerate.
Scoped out of P5 to avoid a cross-runtime harness-contract change at release crunch; the filtering behavior itself is covered by the TS route tests (#291/#292).
Follow-up to RLAC P5 (#295). P5 added cross-runtime conformance for the header-free RLAC surface —
rlac-principals-lifecycle(CRUD) andrlac-policy-compile-preview(which pins the compiled filter shape{$or:[{visible_to:caller},{visible_to:"*"}]}). The visibility-filtering fixtures still need authoring:rlac-document-visibility-filtering— RLAC on + a policy + principals + docs with mixedvisibleTo;GET /documentsas alice vs bob returns only the docs each may see;POST /searchmerges the policy filter.rlac-chunk-listing-denial—GET …/documents/{id}/chunks404s a principal who can't see the doc; 401 when no principal resolves.These require setting the
x-view-as-principalrequest header per step (the only way to bind a principal in the conformance harness'sauth.mode: disabled). The harness doesn't support per-step headers today, so this needs a small but cross-runtime extension:headers?: Record<string,string>to the scenario step schema (conformance-regenerate.tsScenario).app.requestinit) and capture it in the fixturerequestshape.conformance/runner.mjsrunScenario+ the cross-runtime fetcher signature ((method, path, body?, headers?)) — Python/Java harnesses gain an optional 4th param.Scoped out of P5 to avoid a cross-runtime harness-contract change at release crunch; the filtering behavior itself is covered by the TS route tests (#291/#292).