Closed
Add formal conformance suite for AWF config source contract and DriftRecord invariants#48503
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add formal model and test suite for AWF config sources specification
Add formal conformance suite for AWF config source contract and DriftRecord invariants
Jul 28, 2026
pelikhan
marked this pull request as ready for review
July 28, 2026 03:38
Collaborator
|
@copilot resolve the merge conflicts on this branch. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a test-only AWF configuration conformance model covering drift records, SLA handling, escalation, safeguards, and schema coverage.
Changes:
- Adds formal predicate tests under
pkg/awfconfig. - Updates generated model-cost metadata for the Copilot smoke workflow.
Show a summary per file
| File | Description |
|---|---|
pkg/awfconfig/awfconfig_formal_test.go |
Adds AWF contract models and conformance tests. |
.github/workflows/smoke-copilot-auto.lock.yml |
Adds generated pricing metadata for the auto model. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 6
- Review effort level: Medium
Comment on lines
+32
to
+35
| func dualSourceConsultation(consultedSources []string) bool { | ||
| hasSpec := slices.Contains(consultedSources, "docs/awf-config-spec.md") | ||
| hasSchema := slices.Contains(consultedSources, "docs/awf-config.schema.json") | ||
| return hasSpec && hasSchema |
Comment on lines
+84
to
+88
| func requiresEscalationIssue(detectedAt, now time.Time) bool { | ||
| slaDeadline := addBusinessDays(detectedAt, 5) | ||
| escalationDeadline := slaDeadline.AddDate(0, 0, 1) | ||
| return now.After(escalationDeadline) | ||
| } |
Comment on lines
+23
to
+25
| type EscalationIssue struct { | ||
| Owner string | ||
| } |
| PropertyPath: "apiProxy.anthropicAutoCache", | ||
| DriftCategory: "missing_in_ghaw", | ||
| SuggestedAction: "Add coverage", | ||
| DetectedAt: "2026-07-27T16:00:00Z", |
Comment on lines
+232
to
+234
| schemaProperties := []string{"apiProxy.anthropicAutoCache", "container.dockerHostPathPrefix"} | ||
| completeRefs := []string{"apiProxy.anthropicAutoCache", "container.dockerHostPathPrefix"} | ||
| incompleteRefs := []string{"container.dockerHostPathPrefix"} |
Comment on lines
+27
to
+30
| type SafeguardResult struct { | ||
| DestructiveActionsSkipped bool | ||
| DegradedMode bool | ||
| } |
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.
This issue formalizes the AWF config source-of-truth contract in
specs/awf-config-sources-spec.mdand requires executable coverage for CR-01 through CR-06a plusDriftRecordschema constraints. This PR adds a dedicated formal test suite that encodes those predicates as deterministic checks.Formal coverage for CR-01..CR-06a
/pkg/awfconfig/awfconfig_formal_test.gowith conformance tests for:DriftRecord schema invariants
DriftRecordtest model and predicate checks for:missing_in_ghaw|missing_in_schema|spec_mismatch)Safeguard and coverage predicates