feat(shadow): add bounded deterministic evidence (#150) - #164
Draft
tcballard wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements issue #150, “Enterprise evidence: add deterministic shadow routing,” as the next stacked change on PR #163.
Adds:
Scope
Included
[gateway.shadow]parsing, validation, rendering, and disabled compatibility defaults.x-wayfinder-shadow-provider-consent, andhosted-allowedprivacy posture.Excluded
Product / Architecture Decisions
User-Facing Contract
CLI
No new command is added. Configure the gateway:
Provider comparison requires both
provider_comparisons = trueand a request headerx-wayfinder-shadow-provider-consent: true; it is considered only forhosted-allowedrequests.Human Output
No prompt, response, credential, or prompt-derived identifier is emitted by the shadow evaluator. Production HTTP responses and failures are unchanged by shadow work.
JSON Output
The bounded
AppState::shadow_snapshotcontract exposes prompt-free records for the following evidence slice; report serialization and operator exposure are intentionally deferred to issue #151.Exit Codes
0: Existing gateway startup and request behavior.1: Existing runtime/provider failure semantics.2: Existing configuration validation/startup failure semantics.Verification
Ran
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --all-targets --lockedCovered
Review Path
Suggested review order:
wayfinder-configshadow schema and validation;wayfinder-gateway/src/shadow.rsevaluator/store and privacy gates;AppStatescheduling/reload wiring; metrics; ADR/roadmap/changelog; tests.Notes For Reviewer
This PR targets
codex/enterprise-deployment-selection(PR #163) and is intentionally draft/stacked. The retained record store is process-local and prompt-free; issue #151 will add the versioned evidence report/operator surface before any canary work. Provider comparison is deliberately not on by default and never runs for local-only privacy posture.