Skip to content

Add formal conformance-registry invariants for AWF config fixture index - #54041

Merged
pelikhan merged 5 commits into
mainfrom
copilot/formal-spec-awf-config-sources-compliance-readme
Aug 20, 2026
Merged

Add formal conformance-registry invariants for AWF config fixture index#54041
pelikhan merged 5 commits into
mainfrom
copilot/formal-spec-awf-config-sources-compliance-readme

Conversation

CopilotAI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This PR formalizes the conformance-registry process defined in specs/awf-config-sources-compliance/README.md, focusing on how T-DR-* / T-DR-SAFE-* IDs and rows are authored and validated (not re-testing existing DriftRecord schema predicates). It adds a dedicated formal suite for registry invariants and edge conditions documented in the spec’s meta-process.

  • Formal registry model coverage

    • Added pkg/workflow/awf_config_conformance_registry_formal_test.go with focused helpers and tests for:
      • plain-series next-ID monotonicity (T-DR-011 after baseline T-DR-001..010)
      • empty-registry bootstrap (T-DR-001)
      • global ID uniqueness across drift + safeguard registries
      • ID format validity/rejection (including placeholder rejection)
      • requirement reference presence (§-anchored)
      • implementation file mapping to pkg/workflow/*_test.go
      • safeguard routing decision (safeguards file vs drift file)
      • spec cross-reference requirement
      • disjointness of plain vs safeguard ID series
  • Edge-case hardening

    • Explicitly covers four-digit rollover (T-DR-1000) without truncation.
    • Verifies safeguard-only registries do not advance plain-series next-ID computation.
    • Verifies missing implementation-file paths invalidate a registry row.
    • Tightened parsing behavior to explicitly prevent T-DR-SAFE-* IDs from being interpreted as plain T-DR-* IDs.
  • Representative invariant check

    funcTestFormalConformanceRegistry_P1_TestIDMonotonicity(t*testing.T) {
    next:=formalConformanceRegistryNextPlainID(formalConformanceRegistryBaselineRows())
    assert.Equal(t, "T-DR-011", next)
    nextValue, ok:=formalConformanceRegistryParsePlainID(next)
    require.True(t, ok)
    assert.Equal(t, 11, nextValue)
    }

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 18.9 AIC · ⌖ 9.64 AIC · ⊞ 9.3K ·
Comment /souschef to run again

CopilotAIand others added 2 commits August 19, 2026 15:58
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Formalize conformance registry meta-process for AWF ConfigAdd formal conformance-registry invariants for AWF config fixture indexAug 19, 2026
CopilotAI requested a review from pelikhanAugust 19, 2026 16:04
@github-actions

Copy link
Copy Markdown
Contributor

Hey there 👋 — great work on formalizing the conformance-registry invariants! This PR aligns perfectly with the project's focus on maintainable AWF specifications.

Your approach is solid:

  • Well-focused: Adds a dedicated formal test suite (awf_config_conformance_registry_formal_test.go) that validates registry meta-process rules without re-testing existing DriftRecord schema predicates.
  • Comprehensive test coverage: Includes tests for ID monotonicity, uniqueness, format validation, requirement references, and edge cases like four-digit rollover.
  • Clear documentation: The PR body explains the rationale, scope (conformance-registry meta-process vs schema predicates), and includes a representative test example.
  • Core-team contribution: Authored by the Copilot SWE Agent as noted in the contributing guidelines.

This PR is ready for review and looks great to merge!

Generated by ✅ Contribution Check · auto · 56.5 AIC · ⌖ 5 AIC · ⊞ 9.2K ·

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

Category: docs · Risk: low · Score: 27/100 (impact 10 + urgency 5 + quality 12)
Recommended action:defer
Batch:B2-docs

Draft formal spec addition; low urgency, single-file, needs CI.

Automated triage — see run report for full details.

Generated by 🔧 PR Triage Agent · auto · 90.2 AIC · ⌖ 2.82 AIC · ⊞ 8.3K ·

@pelikhan
pelikhan marked this pull request as ready for review August 19, 2026 21:51
CopilotAI balanced review requested due to automatic review settings August 19, 2026 21:51

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds formal tests intended to validate AWF conformance-registry invariants and edge cases.

Changes:

  • Models registry IDs, rows, routing, and cross-references.
  • Tests ID formatting, uniqueness, monotonicity, and rollover behavior.
  • Adds safeguard-series and missing-file edge cases.
Show a summary per file
FileDescription
pkg/workflow/awf_config_conformance_registry_formal_test.goAdds the registry invariant model and tests.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment on lines +21 to +22
func formalConformanceRegistryBaselineRows() []formalConformanceRegistryRow {
return []formalConformanceRegistryRow{
Comment on lines +183 to +187
func TestFormalConformanceRegistry_P8_SpecCrossReferenceRequired(t *testing.T) {
specIDs := map[string]struct{}{
"T-DR-010": {},
"T-DR-SAFE-004": {},
}
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot This PR still has unresolved reviewer concerns before it is ready for a maintainer handoff.

  • Unresolved review items (newest first):
  • Please address those review comments, refresh the branch if GitHub offers one, rerun validation, and then use the pr-finisher skill for the maintainer-facing handoff.

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 18.9 AIC · ⌖ 9.64 AIC · ⊞ 9.3K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

CopilotAI commented Aug 19, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot This PR still has unresolved reviewer concerns before it is ready for a maintainer handoff.

  • Unresolved review items (newest first):...

Addressed in f2513c4: the formal suite now parses the fixture index, validates its documented test-file mappings, and verifies every registry ID against the parent specification's actual content. Added the missing plain-series specification references and completed local scoped validation.

CopilotAI requested a review from gh-aw-botAugust 19, 2026 22:46
@pelikhan
pelikhan merged commit 2e600c6 into mainAug 20, 2026
@pelikhan
pelikhan deleted the copilot/formal-spec-awf-config-sources-compliance-readme branch August 20, 2026 00:04
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.2

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[formal-spec] awf-config-sources-compliance/README.md — Formal model & test suite — 2026-08-19

4 participants

@gh-aw-bot@pelikhan