feat(reputation): make complete source replacement atomic and CAS-bound - #189
Draft
seonghobae wants to merge 16 commits into
Draft
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 |
This was referenced Sep 7, 2026
This was referenced Sep 7, 2026
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.
Refs #188. Draft child of #187.
Bounded security-evidence change
Exact parent
#187@b549c4e3f894492ae8d235c79f3447440981e3e8already provides exact source-generation membership plus cross-generation producer lifecycle/tombstone admission. This child adds the missing pure operation that turns one authenticated complete source batch into a new immutableEvidenceSnapshotV1.Wardnet owns this source/evidence-admission invariant. The change performs no source fetching, HTTP/304 interpretation, durable persistence, URL/DNS/peer/redirect/proxy/TLS authorization, Context Graph/EA mutation, quarantine execution, LLM/provider routing, or AppGuardrail analysis. It does not infer chronological order from opaque generation strings.
Executed RED → repair lineage
The initial test-only exact
64f60c0dfa0ecc4a21d29ce404618bce971ffe4cchanged only the source-replacement test. Hosted CI34159300515, Rust job101857575281, acquired Ubuntu compute, passed checkout/toolchain/formatting, then failed inTestbecause the source-replacement contract did not exist. Implementationcd05b97...exposed deterministic formatting,b7aabc0...repaired that, and CI34159970161/ job101859505861then exposed Rust ownership errorE0505. Minimal ownership-order repairc96f512d4e89529d64a8964cad07b80ee705091fproduced terminal CI GREEN34160079365/ job101859819975.Fresh exact-source review found immutable source-generation identity reuse. Test-only exact
b53ddde9bcd8524658cacac0efe108577bc9dd87added a same-generation rewrite case while production remained unchanged. Hosted CI34160409623, Rust job101860879692, passed checkout/toolchain/formatting and failed inTestwithE0599becauseSourceReplacementErrorV1::ReusedSourceGenerationdid not exist. Minimal repair555c239827822bdae3d8204ef69d2f681e3d6f31adds the typed equality rejection after exact prior-generation CAS; the generic core still does not sort opaque generation values.A later exact-source review found a third replay-integrity defect: exact CAS plus a distinct opaque generation token still allowed
SourceSnapshotV1.completed_at_unixto move backwards, so older authenticated source state could be republished under a fresh generation identity. Test-only exact2904f11a47a149e97c1bb8f77fd7cb61376451f1changed onlytests/evidence_source_replacement.rs. Hosted CI34161720520, Rust job101864749405, acquired Ubuntu 24.04, passed exact checkout/toolchain/cargo fmt --check, then failed inTestwhile the production error/invariant was absent. Minimal production repair7a6f56c5b576aa9948d7cd7c9e27310ef0c15212adds typedSourceCompletionRegressionand rejects onlyreplacement.completed_at_unix < prior.completed_at_unix. Equal completion timestamps remain valid;valid_until_unixis not forced monotonic because a source may legitimately shorten its validity horizon.SOURCE_REPLACEMENT_TRACEABILITY.mdon the current head records the problem, constraints, rejected alternatives, chosen invariants, exact RED/GREEN lineage and remaining durable-storage boundary.PRODUCER_VERSION_LIFECYCLE_TRACEABILITY.mdis synchronized so the parent lifecycle cursor no longer claims atomic replacement is wholly absent.Contract now enforced
source_idandsource_generation;evidence_generation;The pure transition still does not prove durable transactionality. A later Wardnet storage/adapter slice must atomically bind authenticated provider pagination/completeness, durable producer lifecycle cursors, the accepted immutable evidence snapshot, crash recovery, retry/idempotency and last-known-good publication. Refresh failure or provider not-modified outcomes must not manufacture evidence freshness.
Exact-current evidence
Exact current head is
7f715a843236bcb79452fc1b3c84d50f34da9981on unchanged exact parent#187@b549c4e3f894492ae8d235c79f3447440981e3e8.34162018684, Rust job101865605262: terminal SUCCESS after exact checkout, toolchain, formatting, locked workspace tests and strict Clippy.34162018692, fuzz job101865650619: terminal SUCCESS on the same exact head; bounded targets ran on GitHub-hostedubuntu-24.04and no crash artifact was produced.Keep Draft behind
#175 -> #176 -> #178 -> #179 -> #183 -> #185 -> #187. Root #175 still has the central delegated-CodeQL terminal-status publication defect owned by.github#1929, and live solo-maintainer governance remains owned by.github#772. This child is not a merge-policy probe and no guarded bypass condition is met. After prerequisite protected integration, non-force reconstruct on fresh exact ancestry and reacquire every then-live gate.No predecessor-result transfer, self/model approval, routine administrator bypass, force push/destructive rebase, gate weakening, no-op redispatch, mutable foreign dependency, source copy, cross-service SQL, or foreign-owner implementation is introduced.