Skip to content

[spec-enforcer] Enforce specifications for cli#30141

Merged
pelikhan merged 1 commit intomainfrom
spec-enforcer/enforce-actionpins-agentdrain-cli-2026-05-04-0ebcfedb461594d5
May 4, 2026
Merged

[spec-enforcer] Enforce specifications for cli#30141
pelikhan merged 1 commit intomainfrom
spec-enforcer/enforce-actionpins-agentdrain-cli-2026-05-04-0ebcfedb461594d5

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

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

Specification Test Enforcement

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

Package Tests Changed Spec Sections Covered Notes
cli Corrected Public API, Types, Design Decisions Converted from package cli to package cli_test; removed internal function tests

Packages Reviewed (No Changes Needed)

Package Status Spec Coverage
actionpins Up-to-date Public API, Types, Thread Safety
agentdrain Up-to-date Public API, Types, Design Decisions

Changes Made

pkg/cli/spec_test.go:

  • Changed package declaration from package cli (internal) to package cli_test (external) — the correct form for specification-driven tests
  • Removed tests for unexported internal functions (parseRepoSpec, parseWorkflowSpec, parseSourceSpec, buildSourceStringWithCommitSHA) that violate the spec-first methodology
  • Renamed TestIsCommitSHATestSpec_PublicAPI_IsCommitSHA for consistent naming convention
  • Added github.com/github/gh-aw/pkg/cli import and cli. prefixes throughout

Test Derivation

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

Spec-Implementation Mismatches (Previously Documented)

  • actionpins: GetActionPins() documented in README but not implemented; proxy test via GetActionPinsByRepo
  • agentdrain: ClusterCount() referenced in README but not implemented; len(Clusters()) used instead

Round-Robin State

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

Auto-generated by Package Specification Enforcer workflow (§25317826810)

Generated by Package Specification Enforcer · ● 716.4K ·

  • expires on May 7, 2026, 12:18 PM UTC

Convert pkg/cli/spec_test.go from internal package test (package cli)
to external test package (package cli_test), removing tests for
unexported internal functions that violate specification-first testing
methodology. Rename TestIsCommitSHA to TestSpec_PublicAPI_IsCommitSHA
for consistent naming convention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pelikhan pelikhan merged commit 659749b into main May 4, 2026
@pelikhan pelikhan deleted the spec-enforcer/enforce-actionpins-agentdrain-cli-2026-05-04-0ebcfedb461594d5 branch May 4, 2026 13:41
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