feat(reputation): add versioned outbound reputation contracts - #175
feat(reputation): add versioned outbound reputation contracts#175seonghobae wants to merge 85 commits into
Conversation
📝 WalkthroughWalkthrough워크스페이스에 Changes사이트 평판 계약
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: 🔵 Low · up to Runtime contract behavior is not currently blocked, but the research documentation and provenance regression assertion should receive bounded follow-up. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 69.23% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 4 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks 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 |
Exact-state override — 2026-09-07 KSTThe test-only source head Current branch head is |
|
Fresh contract/code review found a bounded v1 drift against parent design #173: the Proposed design fixes the initial decision envelope at 32 returned evidence references, while current TDD lineage is now explicit on this branch. Test-only All new hosted lanes are currently materialized but queued; no executed RED or GREEN is claimed yet. The branch remains Draft. The repair job additionally refuses to push if the live PR head changed, and uses a normal non-force push only after the exact-source RED succeeds. |
|
Causal source repair is now on exact head A temporary self-repair workflow briefly introduced at Current exact-head CI/Security/SAST/CodeQL/Fuzz plus the two read-only focused verifiers are materialized but queued/pending; no exact-head GREEN is claimed. Keep Draft. |
Purpose and bounded context
Introduce the first versioned, transport-neutral Rust contract core for Wardnet outbound destination reputation. Wardnet owns destination maliciousness, evidence lifecycle, security policy and SOC explanation. This crate deliberately does not parse or authorize URLs, resolve DNS, validate peers, follow redirects, choose proxies, establish TLS, perform HTTP I/O, persist state, or claim that a policy decision blocked traffic. Those executable transport authorities remain EgressWeave-owned.
This PR stays Draft until one cleanup head has complete exact-current evidence and normally satisfiable governance. It is not a runtime interceptor and does not consume a mutable EgressWeave dependency.
Implemented contract slice
crates/wardnet-reputation-coreprovideswardnet.reputation.v1contracts for authenticated outbound context, canonical destination subjects, versioned source evidence, reviewed source policy, immutable policy snapshots, independent assessment/evidence-health/action/reason dimensions, and explainable decision envelopes. Validation is bounded and fail closed across schema identity, text/list limits, subject scope, time ordering, confidence, enforcement provenance, source tenant eligibility, decision evidence, assessment/reason/action coherence and unsafe allow states.All v1 wire structs reject unknown fields. Reviewed source eligibility is explicit across tenants as well as purposes/subject kinds. The core preserves
KnownMalicious,Suspicious, andUnknownrather than manufacturing benign probability or transport authorization. Required evidenceExpired/Unavailabletakes reason precedence asRequiredAuthorityUnavailable; adverse assessments and unhealthy required evidence cannot serialize asAllow; business authorization is the only coherent reputation-only allow reason in this slice.The v1 contract enforces Proposed #173's initial size boundaries without widening unrelated lists:
ObservableUrlpermits 8 KiB while ordinary bounded text remains 1 KiB, generic bounded lists remain 64 items, andDecisionEnvelopeV1.evidence_refsis capped at 32.TDD and review lineage
Retained causal repairs include:
tenant_scopeplus boundedallowed_tenant_ids;dd5a82df0d5588b7f35003fb7447902c10641719/ CI34060554728and repaired narrowly in2f7d504165d82f85d52a8cdaebe53662b4623826;evidence_refsregression was added before the decision-specific production cap. Causal source fix2b9e9265fa948c65adfe5156ff4838371d79baf9introducesMAX_DECISION_EVIDENCE_REFS_V1 = 32and leaves the generic 64-item list limit unchanged.A temporary write-capable PR-head repair workflow was rejected after CodeQL identified unsafe PR-head checkout. It was removed at
53caa4262ba51f066d932f8ec8c25ef79ff9ed62; both CodeQL threads are resolved/outdated and no privileged self-repair workflow remains. Fresh review-thread inventory on current head has zero unresolved findings. CodeRabbit/Devin/model evidence remains advisory and is not treated as human approval.Focused verifier RCA and cleanup
Issue #177 exposed that temporary focused verifier jobs accumulated without acquiring a runner because they selected unsupported
macos-15-arm64. The selector was corrected to supportedmacos-15, with PR-scoped workflow concurrency. On exact predecessor1a8684305e8675b967719b2de3c384b4c03b0b9a, precedence verifier34071919210/ job101590722347and evidence-cap verifier34071919222/ job101590722100acquired hosted runners, asserted exact source, passed formatting and their focused tests, and terminated success. Those purpose-complete workflows are absent from the cleanup head; their historical results prove only the causal tests and are not merge-gate substitutes.Research and standards traceability
crates/wardnet-reputation-core/TRACEABILITY.mdlinks the contract to NIST CSF 2.0, NIST SP 800-218 SSDF 1.1, MITRE CWE-20 and Chandola et al. (2009). It records why anomaly/evidence uncertainty is preserved and why unrelated load-balancing literature is not causal authority for this transport-neutral contract core.src/lib.rsandsrc/model.rslink the traceability boundary. Redistributable rights are not assumed for third-party PDFs; durable bibliographic/DOI references are retained instead.Foreign-owner boundaries
PR #173 remains the Proposed architecture/design lane. #175 implements only the pure Wardnet-owned contract core and does not mark #173 Accepted.
EgressWeave remains the reusable transport-authorization owner. Production integration requires an immutable compatible EgressWeave release/ACL; no mutable sibling source/PR head, source copy, DNS/address/redirect/proxy/TLS duplicate, or cross-service SQL is accepted. Current EgressWeave release inventory is empty, so this PR does not claim released transport integration.
context-graph-contractsandenterprise-architecture-coreremain read-only foreign-owner dependencies from this writer. No mutable Context Fabric head is Wardnet production authority, and Wardnet maliciousness/risk verdicts are not promoted into authoritative EA truth.Current exact state — 2026-09-07 KST
Protected/default base remains exact
main@a52ccd0a24a727d9349bb32def7713882d8cad1e. Current cleanup head remains exact9de0ea568096a18b5c1fc9bc9fce097e08584d44, open/Draft/mergeable. Purpose-complete focused workflows remain removed and the product/test/docs delta is unchanged.Fresh exact-head repository evidence is now:
34071995169— SUCCESS;34071995140— SUCCESS;34071995181— SUCCESS;34071995128— SUCCESS;34071995171— FAILURE.CodeQL's
Detect CodeQL languagesjob101590923807acquired hosted runner1001730119, checked out the exact head and completed success. Compatibility job101597707181acquired hosted runner1001731487;Request current-head CodeQL scan dispatchcompleted success, whileRelease runner or enforce current-head CodeQL verdictfailed. This isolates the current first failing boundary to delegated/current-head CodeQL verdict publication after successful leaf dispatch, not repository checkout, runner acquisition, changed-path detection or Wardnet source execution. The canonical owner specimen remainsContextualWisdomLab/.github#1929; this failure is non-passing and is not converted into a bypass or predecessor verdict.Child #176 has now been non-force reconstructed onto this exact parent while remaining Draft. Its 32-reference inherited regression was proven RED and minimally repaired GREEN, the parent's 8 KiB observable-URL invariant/test was retained, and its temporary focused verifier was removed after exact success. It must still wait for #175 protected integration and reacquire its own full current-head gates before promotion.
Live organization governance remains owner-plane work under
.github#772: self/model approval, routine administrator bypass, force push/destructive rebase, gate weakening and predecessor-evidence transfer remain forbidden.Completion boundary
Keep Draft until the unchanged cleanup head has terminal success for every then-live repository/security/central gate, zero valid unresolved review findings, fresh candidate-base compatibility, and governance that permits the ordinary protected merge path. Do not claim runtime enforcement, immutable release readiness, or protected integration before those conditions are true.