test(reputation): reject lifecycle-invalid enforcement evidence - #185
seonghobae wants to merge 5 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hosted RED is now exact and executed. Test-only head Minimal GREEN was then applied without widening scope: |
Refs #184. Draft child of #183.
Verified finding
Exact parent
#183@1b183e784750d56d4cbeda469d2ced75811ae08cbinds each evidence record to its exact completed source generation, butEvidenceRecordV1::validate_atstill permitted producer lifecycle state to contradict enforcement eligibility. A record could berevoked=trueordeleted=truewhile retainingenforcement_eligible=true, and the generation-bound aggregate accepted it when all other lineage, bounds, provenance, and time checks were valid.This is Wardnet evidence/admission policy only. It adds no source fetching, persistence, HTTP, DNS/peer/redirect/proxy/TLS behavior, EgressWeave transport authorization, Context Graph mutation, or foreign-owner code.
Executed hostile RED
Test-only
f5d8f28d32cabca23a90acf86e578faeac703791changed onlycrates/wardnet-reputation-core/tests/evidence_lifecycle_enforcement.rs; production was byte-identical to exact parent #183. The hostile generation-bound cases require revoked, deleted, and revoked+deleted records to fail closed when they still claim enforcement eligibility. Controls require active enforcement evidence to remain valid and revoked/deleted evidence to remain representable as non-enforcement history.Hosted CI
34154105805, Rust job101842225780, acquired GitHub-hosted runner1001750277, completed exact checkout, toolchain setup, and formatting, then failed atTest; Clippy was skipped. This is the causal semantic RED, not a runner/control-plane failure.Minimal causal repair
The implementation adds only the missing invariant after the existing schema/bounds/provenance/time/confidence validation order: if
enforcement_eligibleis true and either producer lifecycle flag is true, validation returns typedLifecycleIneligibleEnforcementEvidence. It does not mutate evidence. Revoked/deleted producer history remains valid whenenforcement_eligible=false.Exact-error coverage binds all three hostile lifecycle combinations to that typed error, while active eligible evidence and lifecycle-marked non-enforcement history remain positive controls.
EVIDENCE_LIFECYCLE_TRACEABILITY.mdrecords the problem, bounded-context ownership, alternatives, RED receipt, and the explicit boundary that this slice does not yet claim cross-generation monotonic producer-version/tombstone admission.Exact-current GREEN
Current head is
b2169d465aa15da9da78f5c42b785e44a4bc664d. Fresh ancestry comparison against exact parent reportsahead_by=5,behind_by=0, merge base equal to1b183e784750d56d4cbeda469d2ced75811ae08c; no intervening parent delta was overwritten. The diff is limited to the lifecycle invariant/error, its hostile/positive regression coverage, lifecycle traceability, and the crate-doc link.Exact-current CI
34154846345, Rust job101844429388, is terminal SUCCESS after exact checkout, toolchain setup,cargo fmt --check, locked workspace tests, and strict Clippy. Exact-current Fuzz34154846324, fuzz job101844430502, is terminal SUCCESS after all four 60-second bounded targets completed with no crash-artifact upload. Formal review count is 0 and inline review-thread count is 0. No predecessor check is promoted as current-head GREEN.Keep Draft behind
#175 -> #176 -> #178 -> #179 -> #183. After prerequisite protected integration, reacquire the then-live integration/security/review/governance gates; no stacked-head evidence transfers to a retargeted protected-main candidate. Cross-generation monotonic version/tombstone admission remains the next Task 2 lifecycle slice rather than being folded into this stateless validator.No self/model approval, routine administrator bypass, gate weakening, force push/destructive rebase, mutable foreign dependency, source copy, cross-service SQL, no-op redispatch, or predecessor-result transfer.