Skip to content

[formal-spec] intent-attribution-agent-governance.md — Formal model & test suite — 2026-07-30 #49170

Description

@github-actions

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The threat detection engine failed to produce results.

Review the workflow run logs for details.

Summary

This issue formalizes specs/intent-attribution-agent-governance.md, the specification defining a deterministic intent layer for gh-aw agentic workflows. The spec covers deterministic attribution resolution (explicit intent → closing issue → labels → unlinked), fail-closed governance policy for indeterminate attribution states, risk classification, and a strict policy-precedence hierarchy (organization > repository > intent > workflow > agent request). A Go testify formal test suite encodes 11 core predicates plus a cross-cutting safety invariant.

Specification

  • File: specs/intent-attribution-agent-governance.md
  • Focus area: Intent attribution resolver, fail-closed execution policy, risk classification, policy precedence
  • Formal notation used: TLA+ / Z3 (state predicates) / F* (pre/post contracts on policy derivation)

Formal Model

Predicates and invariants (illustrative notation)
-- Attribution status domain (TLA+-style)
Status ≜ {mapped, unmapped, unlinked, ambiguous, suggested}
Source ≜ {explicit_metadata, closing_issue, parent_issue, referenced_issue,
          project, milestone, issue_labels, artifact_labels, suggestion, none}

-- P1_ExplicitIntentPrecedence  (source: "Attribution-Resolution Order", line 44)
P1_ExplicitIntentPrecedence(pr) ≜
  pr.ExplicitIntent ≠ ∅ ⟹ Resolve(pr).Status = mapped ∧ Resolve(pr).Source = explicit_metadata

-- P2_SingleClosingIssueMapped  (source: "Deterministic resolution", switch case 1)
P2_SingleClosingIssueMapped(pr) ≜
  pr.ExplicitIntent = ∅ ∧ |pr.ClosingIssues| = 1
    ⟹ Resolve(pr).Status = mapped ∧ Resolve(pr).Source = closing_issue

-- P3_AmbiguousOnMultipleRoots  (source: "Ambiguous-Root Handling", lines 56-62)
P3_AmbiguousOnMultipleRoots(pr) ≜
  pr.ExplicitIntent = ∅ ∧ |pr.ClosingIssues| ≥ 2
    ⟹ Resolve(pr).Status = ambiguous ∧ Resolve(pr).Source = closing_issue
    ∧ ∀ perm(pr.ClosingIssues): Resolve(pr) unchanged   -- order independence

-- P4_ArtifactLabelFallback  (source: "Deterministic resolution", switch case 0 w/ labels)
P4_ArtifactLabelFallback(pr) ≜
  pr.ExplicitIntent = ∅ ∧ |pr.ClosingIssues| = 0 ∧ |pr.Labels| > 0
    ⟹ Resolve(pr).Status = mapped ∧ Resolve(pr).Source = artifact_labels

-- P5_UnlinkedWhenNoSource  (source: "Deterministic resolution", switch case 0 w/o labels)
P5_UnlinkedWhenNoSource(pr) ≜
  pr.ExplicitIntent = ∅ ∧ |pr.ClosingIssues| = 0 ∧ |pr.Labels| = 0
    ⟹ Resolve(pr).Status = unlinked ∧ Resolve(pr).Source = none

-- P6_AmbiguousNotMapped  (source: line 62, "MUST NOT be treated as equivalent to mapped")
P6_AmbiguousNotMapped(rec) ≜ rec.Status = ambiguous ⟹ rec.Status ≠ mapped

-- P7_FailClosedPolicy  (source: "Fail-Closed Behavior", lines 66-68)
P7_FailClosedPolicy(status) ≜
  status ∈ {unlinked, ambiguous, suggested, unmapped}
    ⟹ DerivePolicy(status) = SafestPolicy
  where SafestPolicy ≜ ⟨autonomy=propose_only, write_scope=none,
                         human_approval_required=true, auto_merge_allowed=false,
                         max_attempts=1⟩

-- P8_PolicyDeterminism  (source: line 72, "given identical attribution inputs, same policy")
P8_PolicyDeterminism(intent) ≜ ∀ i,j: DerivePolicy(intent)_i = DerivePolicy(intent)_j

-- P9_RiskClassificationOrder  (source: "Risk classification", lines 636-675)
P9_RiskClassificationOrder(intent) ≜
  intent.Risk ≠ "" ⟹ ResolveRisk(intent) = intent.Risk
  ∧ intent.Risk = "" ∧ security ∈ domains ∧ priority = critical ⟹ risk = high
  ∧ intent.Risk = "" ∧ production ∈ domains ⟹ risk = high
  ∧ intent.Risk = "" ∧ infrastructure ∈ domains ⟹ risk = medium
  ∧ intent.Risk = "" ∧ documentation ∈ domains ⟹ risk = low
  ∧ (otherwise) ⟹ risk = unknown

-- P10_PrecedenceOrdering  (source: "Policy precedence", lines 722-728)
P10_PrecedenceOrdering ≜
  rank(organization) < rank(repository) < rank(intent) < rank(workflow) < rank(agent_request)
  ∧ ∀ higher,lower: rank(higher) < rank(lower) ⟹ ¬(lower may weaken higher)

-- P11_NoElevatedAuthorityOnAbsentAttribution  (source: line 70)
P11_NoElevatedAuthorityOnAbsentAttribution(status) ≜
  status ∈ {unlinked, ambiguous} ⟹ DerivePolicy(status).Autonomy ≠ ElevatedRequest.Autonomy
  ∧ DerivePolicy(status).AutoMergeAllowed = false

-- SAFETY_AmbiguousAlwaysFailsClosed (cross-cutting P6 ∧ P7)
SAFETY_AmbiguousAlwaysFailsClosed(pr, elevated) ≜
  Resolve(pr).Status = ambiguous ⟹ DerivePolicy(Resolve(pr), elevated) = SafestPolicy

Behavioral Coverage Map

Predicate / Invariant Test Function Description
P1_ExplicitIntentPrecedence TestFormal_P1_ExplicitIntentPrecedence Explicit workflow intent always resolves first and overrides otherwise-ambiguous closing-issue candidates
P2_SingleClosingIssueMapped TestFormal_P2_SingleClosingIssueMapped Exactly one closing issue resolves to mapped/closing_issue
P3_AmbiguousOnMultipleRoots TestFormal_P3_AmbiguousOnMultipleRoots 2+ closing issues always resolve ambiguous, order-independent (table-driven, 3 orderings)
P4_ArtifactLabelFallback TestFormal_P4_ArtifactLabelFallback Zero closing issues + labels present falls back to artifact-label mapping
P5_UnlinkedWhenNoSource TestFormal_P5_UnlinkedWhenNoSource Zero closing issues and zero labels resolves unlinked (edge case)
P6_AmbiguousNotMapped TestFormal_P6_AmbiguousNotMapped Ambiguous status is never equivalent to mapped for authorization purposes
P7_FailClosedPolicy TestFormal_P7_FailClosedPolicy Indeterminate statuses (unlinked/ambiguous/suggested/unmapped) always yield the safest policy over an elevated request (table-driven, 4 cases)
P8_PolicyDeterminism TestFormal_P8_PolicyDeterminism Identical attribution inputs always produce identical policy output across repeated calls
P9_RiskClassificationOrder TestFormal_P9_RiskClassificationOrder Explicit risk wins; else derived by domain/priority rules, including unknown-domain edge case (table-driven, 6 cases)
P10_PrecedenceOrdering TestFormal_P10_PrecedenceOrdering Organization > repository > intent > workflow > agent request, including non-adjacent domination check
P11_NoElevatedAuthorityOnAbsentAttribution TestFormal_P11_NoElevatedAuthorityOnAbsentAttribution Unresolved/unlinked attribution never grants elevated autonomy, auto-merge, or max-attempts
SAFETY_AmbiguousAlwaysFailsClosed TestFormal_SAFETY_AmbiguousAlwaysFailsClosed Cross-cutting safety property: ambiguous attribution fails closed even when a caller requests an elevated policy

Generated Test Suite

📄 `pkg/workflow/intent_attribution_governance_formal_test.go`
(go/redacted):build !integration

// Package workflow_test – Intent Attribution & Agent Governance formal model tests.
//
// Source specification: specs/intent-attribution-agent-governance.md
//
// This file encodes formal predicates derived from the specification's
// deterministic-resolution, multiple-root, risk-classification, execution-policy,
// and policy-precedence sections as illustrative Z3/TLA+ style predicates, and maps
// each predicate to a Go testify test function.
//
// Formal predicates encoded (see issue body "Formal Model" section for full notation):
//
//	P1_ExplicitIntentPrecedence   — explicit workflow intent always wins first
//	P2_SingleClosingIssueMapped   — exactly one closing issue -> mapped/closing_issue
//	P3_AmbiguousOnMultipleRoots   — 2+ closing issues -> ambiguous, never arbitrary pick
//	P4_ArtifactLabelFallback      — zero closing issues + labels present -> artifact fallback
//	P5_UnlinkedWhenNoSource       — zero closing issues + no labels -> unlinked
//	P6_AmbiguousNotMapped         — ambiguous status MUST NOT be treated as mapped
//	P7_FailClosedPolicy           — unlinked/ambiguous/indeterminate -> safest policy
//	P8_PolicyDeterminism          — identical inputs -> identical policy output
//	P9_RiskClassificationOrder    — explicit risk wins; else derived by domain rules
//	P10_PrecedenceOrdering        — org > repo > intent > workflow > agent request
//	P11_NoElevatedAuthorityOnAbsentAttribution — unresolved attribution never grants elevation
//
// Edge cases covered: zero closing issues with no labels (unlinked), exactly one
// closing issue (mapped), 2+ closing issues (ambiguous, order-independent),
// explicit risk overriding derived risk, and unknown domain combinations.
package workflow_test

import (
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

// ---------------------------------------------------------------------------
// stub — replace with real implementation
//
// Minimal reproduction of the resolver/policy types described in the spec's
// "Attribution states", "Deterministic resolution", "Risk classification",
// "Execution policy", and "Policy precedence" sections. Real implementation
// should live in an intent-attribution package once Phase 2+ lands.
// ---------------------------------------------------------------------------

type attributionStatus string

const (
	attributionMapped    attributionStatus = "mapped"
	attributionUnmapped  attributionStatus = "unmapped"
	attributionUnlinked  attributionStatus = "unlinked"
	attributionAmbiguous attributionStatus = "ambiguous"
	attributionSuggested attributionStatus = "suggested"
)

type attributionSource string

const (
	sourceExplicitMetadata attributionSource = "explicit_metadata"
	sourceClosingIssue     attributionSource = "closing_issue"
	sourceArtifactLabels   attributionSource = "artifact_labels"
	sourceNone             attributionSource = "none"
)

type intentRecord struct {
	Status   attributionStatus
	Source   attributionSource
	Reason   string
	Risk     string
	Domains  []string
	Priority string
}

type pullRequestData struct {
	ExplicitIntent *intentRecord
	ClosingIssues  []int
	Labels         []string
	NodeID         string
	URL            string
}

// resolve implements the Deterministic Resolution algorithm from the spec.
func resolve(pr pullRequestData) intentRecord {
	if pr.ExplicitIntent != nil {
		rec := *pr.ExplicitIntent
		rec.Status = attributionMapped
		rec.Source = sourceExplicitMetadata
		rec.Reason = "explicit_workflow_intent"
		return rec
	}

	switch len(pr.ClosingIssues) {
	case 1:
		return intentRecord{
			Status: attributionMapped,
			Source: sourceClosingIssue,
			Reason: "single_closing_issue",
		}
	case 0:
		if len(pr.Labels) > 0 {
			return intentRecord{
				Status: attributionMapped,
				Source: sourceArtifactLabels,
				Reason: "pull_request_label_fallback",
			}
		}
		return intentRecord{
			Status: attributionUnlinked,
			Source: sourceNone,
			Reason: "no_supported_intent_source",
		}
	default:
		return intentRecord{
			Status: attributionAmbiguous,
			Source: sourceClosingIssue,
			Reason: "multiple_closing_issues",
		}
	}
}

// executionPolicy mirrors the spec's ExecutionPolicy struct.
type executionPolicy struct {
	Autonomy              string
	WriteScope            string
	HumanApprovalRequired bool
	AutoMergeAllowed      bool
	MaxAttempts           int
}

// safestPolicy is the fail-closed default described in "Fail-Closed Behavior".
func safestPolicy() executionPolicy {
	return executionPolicy{
		Autonomy:              "propose_only",
		WriteScope:            "none",
		HumanApprovalRequired: true,
		AutoMergeAllowed:      false,
		MaxAttempts:           1,
	}
}

// derivePolicy implements the fail-closed rule: indeterminate attribution
// (unlinked, ambiguous, suggested) always yields the safest policy.
func derivePolicy(intent intentRecord, elevated executionPolicy) executionPolicy {
	switch intent.Status {
	case attributionUnlinked, attributionAmbiguous, attributionSuggested:
		return safestPolicy()
	case attributionUnmapped:
		return safestPolicy()
	default:
		return elevated
	}
}

// resolveRisk implements the "Risk classification" derivation rules.
func resolveRisk(intent intentRecord) string {
	if intent.Risk != "" {
		return intent.Risk
	}
	contains := func(list []string, v string) bool {
		for _, x := range list {
			if x == v {
				return true
			}
		}
		return false
	}
	if contains(intent.Domains, "security") && intent.Priority == "critical" {
		return "high"
	}
	if contains(intent.Domains, "production") {
		return "high"
	}
	if contains(intent.Domains, "infrastructure") {
		return "medium"
	}
	if contains(intent.Domains, "documentation") {
		return "low"
	}
	return "unknown"
}

// precedenceLevel maps a constraint source name to its ordinal precedence rank
// per "Policy precedence": organization(0) > repository(1) > intent(2) >
// workflow(3) > agent request(4). Lower rank == higher precedence.
func precedenceLevel(source string) int {
	switch source {
	case "organization":
		return 0
	case "repository":
		return 1
	case "intent":
		return 2
	case "workflow":
		return 3
	case "agent_request":
		return 4
	default:
		return 99
	}
}

// effectivePrecedence returns true if `higher` may not be weakened by `lower`.
func higherWins(higher, lower string) bool {
	return precedenceLevel(higher) < precedenceLevel(lower)
}

// ---------------------------------------------------------------------------
// P1: Explicit intent precedence
// ---------------------------------------------------------------------------

func TestFormal_P1_ExplicitIntentPrecedence(t *testing.T) {
	explicit := &intentRecord{Reason: "manual_override"}
	pr := pullRequestData{
		ExplicitIntent: explicit,
		ClosingIssues:  []int{1, 2, 3}, // would otherwise be ambiguous
		Labels:         []string{"bug"},
	}

	rec := resolve(pr)

	assert.Equal(t, attributionMapped, rec.Status, "explicit intent MUST always resolve to mapped regardless of other candidates")
	assert.Equal(t, sourceExplicitMetadata, rec.Source, "explicit intent MUST be sourced as explicit_metadata")
	assert.Equal(t, "explicit_workflow_intent", rec.Reason, "reason MUST record explicit workflow intent precedence")
}

// ---------------------------------------------------------------------------
// P2: Single closing issue -> mapped
// ---------------------------------------------------------------------------

func TestFormal_P2_SingleClosingIssueMapped(t *testing.T) {
	pr := pullRequestData{ClosingIssues: []int{42}}
	rec := resolve(pr)

	require.Equal(t, attributionMapped, rec.Status, "exactly one closing issue MUST resolve to mapped status")
	assert.Equal(t, sourceClosingIssue, rec.Source, "single closing issue MUST be sourced as closing_issue")
	assert.Equal(t, "single_closing_issue", rec.Reason, "reason MUST reflect the single_closing_issue path")
}

// ---------------------------------------------------------------------------
// P3: Ambiguous on multiple roots, order-independent
// ---------------------------------------------------------------------------

func TestFormal_P3_AmbiguousOnMultipleRoots(t *testing.T) {
	cases := []struct {
		name          string
		closingIssues []int
	}{
		{"two_issues_ascending", []int{1, 2}},
		{"two_issues_descending", []int{2, 1}},
		{"three_issues", []int{5, 3, 9}},
	}

	for _, tc := range cases {
		t.Run(tc.name, func(t *testing.T) {
			rec := resolve(pullRequestData{ClosingIssues: tc.closingIssues})

			require.Equal(t, attributionAmbiguous, rec.Status, "2+ closing issues MUST always resolve to ambiguous, case=%s", tc.name)
			assert.Equal(t, sourceClosingIssue, rec.Source, "ambiguous attribution MUST record source=closing_issue, case=%s", tc.name)
			assert.Equal(t, "multiple_closing_issues", rec.Reason, "ambiguous reason MUST be multiple_closing_issues, case=%s", tc.name)
			assert.NotEqual(t, tc.closingIssues[0], -1, "sanity: resolver MUST NOT silently pick first candidate arbitrarily")
		})
	}
}

// ---------------------------------------------------------------------------
// P4: Artifact label fallback when no closing issues but labels exist
// ---------------------------------------------------------------------------

func TestFormal_P4_ArtifactLabelFallback(t *testing.T) {
	pr := pullRequestData{ClosingIssues: []int{}, Labels: []string{"feature"}}
	rec := resolve(pr)

	require.Equal(t, attributionMapped, rec.Status, "zero closing issues with labels present MUST fall back to artifact label mapping")
	assert.Equal(t, sourceArtifactLabels, rec.Source, "fallback attribution MUST be sourced as artifact_labels")
	assert.Equal(t, "pull_request_label_fallback", rec.Reason, "fallback reason MUST be pull_request_label_fallback")
}

// ---------------------------------------------------------------------------
// P5: Unlinked when no source available (edge case)
// ---------------------------------------------------------------------------

func TestFormal_P5_UnlinkedWhenNoSource(t *testing.T) {
	pr := pullRequestData{ClosingIssues: []int{}, Labels: []string{}}
	rec := resolve(pr)

	require.Equal(t, attributionUnlinked, rec.Status, "zero closing issues and zero labels MUST resolve to unlinked")
	assert.Equal(t, sourceNone, rec.Source, "unlinked attribution MUST be sourced as none")
	assert.Equal(t, "no_supported_intent_source", rec.Reason, "unlinked reason MUST be no_supported_intent_source")
}

// ---------------------------------------------------------------------------
// P6: Ambiguous MUST NOT be treated as mapped
// ---------------------------------------------------------------------------

func TestFormal_P6_AmbiguousNotMapped(t *testing.T) {
	rec := resolve(pullRequestData{ClosingIssues: []int{7, 8}})

	require.Equal(t, attributionAmbiguous, rec.Status, "precondition: status must be ambiguous")
	assert.NotEqual(t, attributionMapped, rec.Status, "ambiguous attribution MUST NOT be equivalent to mapped for reporting/authorization")
}

// ---------------------------------------------------------------------------
// P7: Fail-closed policy for indeterminate attribution
// ---------------------------------------------------------------------------

func TestFormal_P7_FailClosedPolicy(t *testing.T) {
	elevated := executionPolicy{
		Autonomy:              "bounded",
		WriteScope:            "full",
		HumanApprovalRequired: false,
		AutoMergeAllowed:      true,
		MaxAttempts:           10,
	}

	cases := []struct {
		name   string
		status attributionStatus
	}{
		{"unlinked", attributionUnlinked},
		{"ambiguous", attributionAmbiguous},
		{"suggested", attributionSuggested},
		{"unmapped", attributionUnmapped},
	}

	for _, tc := range cases {
		t.Run(tc.name, func(t *testing.T) {
			intent := intentRecord{Status: tc.status}
			policy := derivePolicy(intent, elevated)
			safe := safestPolicy()

			assert.Equal(t, safe, policy, "indeterminate attribution (%s) MUST always yield the safest policy, never the elevated one", tc.name)
			assert.Equal(t, "propose_only", policy.Autonomy, "fail-closed autonomy MUST be propose_only for %s", tc.name)
			assert.False(t, policy.AutoMergeAllowed, "fail-closed policy MUST NOT allow auto-merge for %s", tc.name)
			assert.True(t, policy.HumanApprovalRequired, "fail-closed policy MUST require human approval for %s", tc.name)
			assert.Equal(t, 1, policy.MaxAttempts, "fail-closed policy MUST cap max_attempts at 1 for %s", tc.name)
		})
	}
}

// ---------------------------------------------------------------------------
// P8: Policy determinism — identical inputs -> identical outputs
// ---------------------------------------------------------------------------

func TestFormal_P8_PolicyDeterminism(t *testing.T) {
	elevated := executionPolicy{Autonomy: "supervised", WriteScope: "branch"}
	intent := intentRecord{Status: attributionMapped}

	first := derivePolicy(intent, elevated)
	second := derivePolicy(intent, elevated)
	third := derivePolicy(intent, elevated)

	assert.Equal(t, first, second, "identical attribution inputs MUST always produce the same policy (run 1 vs 2)")
	assert.Equal(t, second, third, "identical attribution inputs MUST always produce the same policy (run 2 vs 3)")
}

// ---------------------------------------------------------------------------
// P9: Risk classification ordering (explicit wins, then derived rules)
// ---------------------------------------------------------------------------

func TestFormal_P9_RiskClassificationOrder(t *testing.T) {
	cases := []struct {
		name     string
		intent   intentRecord
		expected string
	}{
		{"explicit_risk_wins", intentRecord{Risk: "low", Domains: []string{"security"}, Priority: "critical"}, "low"},
		{"security_critical_high", intentRecord{Domains: []string{"security"}, Priority: "critical"}, "high"},
		{"production_high", intentRecord{Domains: []string{"production"}}, "high"},
		{"infrastructure_medium", intentRecord{Domains: []string{"infrastructure"}}, "medium"},
		{"documentation_low", intentRecord{Domains: []string{"documentation"}}, "low"},
		{"unknown_domain_edge_case", intentRecord{Domains: []string{"marketing"}}, "unknown"},
	}

	for _, tc := range cases {
		t.Run(tc.name, func(t *testing.T) {
			got := resolveRisk(tc.intent)
			assert.Equal(t, tc.expected, got, "risk classification mismatch for case=%s", tc.name)
		})
	}
}

// ---------------------------------------------------------------------------
// P10: Precedence ordering — org > repo > intent > workflow > agent request
// ---------------------------------------------------------------------------

func TestFormal_P10_PrecedenceOrdering(t *testing.T) {
	order := []string{"organization", "repository", "intent", "workflow", "agent_request"}

	for i := 0; i < len(order)-1; i++ {
		higher, lower := order[i], order[i+1]
		assert.True(t, higherWins(higher, lower), "%s MUST take precedence over %s", higher, lower)
		assert.False(t, higherWins(lower, higher), "%s MUST NOT override %s (lower-precedence cannot weaken higher)", lower, higher)
	}

	// Non-adjacent check: organization must dominate agent_request directly.
	assert.True(t, higherWins("organization", "agent_request"), "organization constraints MUST dominate agent_request even non-adjacently")
}

// ---------------------------------------------------------------------------
// P11: No elevated authority on absent/unresolved attribution
// ---------------------------------------------------------------------------

func TestFormal_P11_NoElevatedAuthorityOnAbsentAttribution(t *testing.T) {
	elevated := executionPolicy{
		Autonomy:         "bounded",
		AutoMergeAllowed: true,
		MaxAttempts:      20,
	}

	unlinkedIntent := intentRecord{Status: attributionUnlinked}
	policy := derivePolicy(unlinkedIntent, elevated)

	assert.NotEqual(t, elevated.Autonomy, policy.Autonomy, "unresolved attribution MUST NOT grant the elevated autonomy level")
	assert.False(t, policy.AutoMergeAllowed, "unresolved attribution MUST NOT grant auto-merge authority")
	assert.NotEqual(t, elevated.MaxAttempts, policy.MaxAttempts, "unresolved attribution MUST NOT inherit elevated max_attempts")
}

// ---------------------------------------------------------------------------
// SAFETY: combined invariant — ambiguous status always fails closed regardless
// of an otherwise-elevated policy request (cross-cutting P6 + P7).
// ---------------------------------------------------------------------------

func TestFormal_SAFETY_AmbiguousAlwaysFailsClosed(t *testing.T) {
	pr := pullRequestData{ClosingIssues: []int{100, 200, 300}}
	rec := resolve(pr)
	require.Equal(t, attributionAmbiguous, rec.Status, "precondition: multiple closing issues must resolve ambiguous")

	elevated := executionPolicy{Autonomy: "bounded", AutoMergeAllowed: true, HumanApprovalRequired: false}
	policy := derivePolicy(rec, elevated)

	assert.Equal(t, safestPolicy(), policy, "safety invariant: ambiguous attribution MUST always fail closed to the safest policy, even under an elevated request")
}

Usage

  1. Copy the test file to pkg/workflow/intent_attribution_governance_formal_test.go.
  2. Replace the stub — replace with real implementation types (intentRecord, pullRequestData, executionPolicy, resolve, derivePolicy, resolveRisk) with the real intent-attribution resolver once Phase 2+ ("honest attribution model") lands.
  3. Run: go test ./pkg/workflow/... -run Formal

Context

Generated by 🔬 Daily Formal Spec Verifier · auto · 75.5 AIC · ⊞ 9.9K ·

  • expires on Aug 6, 2026, 8:19 AM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions