Claude/freeze gating contract j sy xa#12
Merged
Conversation
Add the gating-contract crate which formalizes the policy enforcement contract with: - Inputs: GatingRequest with proposal, context, and metadata - Outputs: GatingDecision with verdict, refusal details, evaluations - Refusal Taxonomy: 11 categories with 25+ specific refusal codes - Language violations (100-199) - Toolchain violations (200-299) - Security violations (300-399) - Pattern violations (400-499) - Spirit violations (500-599) - System errors (900-999) - Audit Log: AuditEntry with full decision traceability - Minimal Runner: ContractRunner and TestHarness for validation CLI additions: - conative contract schema: Display contract specification - conative contract test: Run tests from training data - conative contract eval: Evaluate gating requests with audit output All 8 contract unit tests pass. Test harness exposes known Oracle limitations (marker-based detection has false positives for TypeScript and Python markers in Rust/Elixir code).
Add comprehensive adversarial testing and regression detection: Red-Team Suite (14 test cases): - bypass/: Documentation and comment embedding attacks - obfuscation/: Marker splitting, case variation, extension masking - encoding/: Base64/hex encoded secrets - boundary/: Empty files, whitespace-only, unicode edge cases - injection/: Polyglot files, URL secrets, concatenated secrets Security Score: 64/100 (9 blocked, 4 bypassed, 0 false positives) Known limitations: Encoded/split secrets require SLM evaluation Regression Harness: - RegressionBaseline: Versioned baseline with git commit tracking - RegressionHarness: Compare current vs baseline results - RegressionReport: Detect regressions, improvements, behavior changes CLI additions: - conative contract redteam: Run adversarial test suite - conative contract regression: Compare against saved baseline - conative contract regression --save: Create new baseline
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
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.
No description provided.