Add formal AWF config source conformance test suite (P1–P10)#37868
Merged
Conversation
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add formal model and test suite for AWF config sources
Add formal AWF config source conformance test suite (P1–P10)
Jun 8, 2026
Collaborator
|
@copilot run pr-finisher skill |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new “formal” Go test suite intended to codify the conformance predicates described in specs/awf-config-sources-spec.md (P1–P10) so AWF config drift/canonicalization expectations are validated in CI.
Changes:
- Adds
pkg/workflow/awf_config_drift_formal_test.gowith 10 tests namedTestFormal_P1…TestFormal_P10. - Introduces test-local helper predicates (dual-source consultation, drift record structure/category, SLA business-day arithmetic, escalation issue structure, degraded-mode safeguards, drift report emission).
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/awf_config_drift_formal_test.go |
Adds a new formal conformance test suite and helper predicates for AWF config drift requirements. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 4
Comment on lines
+33
to
+35
| func formalDualSourceConsulted(normativeSpecConsulted, publishedSchemaConsulted bool) bool { | ||
| return normativeSpecConsulted && publishedSchemaConsulted | ||
| } |
Comment on lines
+46
to
+51
| func formalDriftRecordStructuralValidity(record FormalDriftRecord) bool { | ||
| return record.PropertyPath != "" && | ||
| record.DriftCategory != "" && | ||
| record.SuggestedAction != "" && | ||
| record.DetectedAt != "" | ||
| } |
Comment on lines
+53
to
+55
| func formalDriftCategoryExhaustiveness(category string) bool { | ||
| return slices.Contains([]string{"missing_in_ghaw", "missing_in_schema", "spec_mismatch"}, category) | ||
| } |
Comment on lines
+117
to
+121
| func formalDriftReportEmittedOnDetection(schemaProperties, implementationCoverage []string) []FormalDriftRecord { | ||
| drift := formalSchemaOnlyPropertyFlaggedAsDrift(schemaProperties, implementationCoverage) | ||
| if drift == nil { | ||
| return []FormalDriftRecord{} | ||
| } |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Ran the pr-finisher workflow and pushed |
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 change codifies the
specs/awf-config-sources-spec.mdconformance model into executable tests so AWF config canonicalization behavior is checked against the formal requirements (dual-source consultation, drift semantics, SLA/escalation, and degraded-mode safeguards). It adds the expected P1–P10 coverage as a dedicated formal suite underpkg/workflow.Formal conformance suite (
pkg/workflow/awf_config_drift_formal_test.go)DualSourceConsultation(CR-01)NoUndocumentedFieldGeneration(CR-03)DriftRecordStructuralValidity(§4.5.1)DriftCategoryExhaustiveness(§4.5.1)SchemaOnlyPropertyFlaggedAsDrift(CR-02)CorrectionPRForActionableDrift(CR-05)SLARemediationWindow(CR-06)EscalationIssueStructure(CR-06a)SafeguardDegradedModeOnUnavailability(§5)DriftReportEmittedOnDetection(§4.2)Spec-aligned formal helpers (test-local)
Example (predicate mapping and intent)