Skip to content

[spec-enforcer] Enforce specifications for actionpins, agentdrain, cli#30610

Merged
pelikhan merged 1 commit intomainfrom
spec-enforce-actionpins-agentdrain-cli-2026-05-06-2f4ffa7c44a49cb6
May 6, 2026
Merged

[spec-enforcer] Enforce specifications for actionpins, agentdrain, cli#30610
pelikhan merged 1 commit intomainfrom
spec-enforce-actionpins-agentdrain-cli-2026-05-06-2f4ffa7c44a49cb6

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 6, 2026

Specification Test Enforcement

This PR updates specification-driven tests for the following packages:

Package Tests Added Tests Passing Spec Sections Covered
actionpins 0 14 Public API, Types, Thread Safety, Design Decisions
agentdrain 0 19 Public API, Types, Design Decisions, Default Config
cli 2 22 Public API, Types, Design Decisions

Test Derivation

All tests are derived from README.md specifications, not from implementation source code.

Changes

pkg/cli/spec_test.go: Added two new tests for pure computation functions documented in the README spec but absent from the existing spec file:

  • TestSpec_PublicAPI_CalculateWorkflowHealth — validates the documented pure health computation: empty-run N/A display, success/failure counting, SuccessRate as percentage, BelowThresh flag against threshold
  • TestSpec_PublicAPI_CalculateHealthSummary — validates the documented aggregate computation: period preservation, TotalWorkflows count, HealthyWorkflows threshold filtering, BelowThreshold count

Spec-Implementation Mismatches (pre-existing, no change)

  • actionpins: GetActionPins() []ActionPin is documented in README but not implemented; existing SPEC_MISMATCH comment retained
  • agentdrain: ClusterCount() method referenced in README does not exist; len(Clusters()) is the equivalent; existing SPEC_MISMATCH comment retained

Round-Robin State

  • Run mode: round-robin
  • Packages processed this run: actionpins, agentdrain, cli
  • Next packages in rotation: console, constants, envutil
  • Total eligible packages: 22 (with README.md)

Auto-generated by Package Specification Enforcer workflow

Generated by Package Specification Enforcer · ● 469.9K ·

  • expires on May 9, 2026, 12:11 PM UTC

…lateHealthSummary tests

Add spec tests for two pure computation functions documented in pkg/cli/README.md
that were missing from spec_test.go: CalculateWorkflowHealth (pure health computation
for a single workflow) and CalculateHealthSummary (aggregate health computation).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pelikhan pelikhan merged commit 3902fd7 into main May 6, 2026
@pelikhan pelikhan deleted the spec-enforce-actionpins-agentdrain-cli-2026-05-06-2f4ffa7c44a49cb6 branch May 6, 2026 12:33
Sign up for free to 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.

1 participant