Skip to content

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

Merged
pelikhan merged 1 commit into
mainfrom
spec-enforcer/actionpins-agentdrain-cli-2026-05-07-eb50485c626f2501
May 7, 2026
Merged

[spec-enforcer] Enforce specifications for agentdrain, cli#30822
pelikhan merged 1 commit into
mainfrom
spec-enforcer/actionpins-agentdrain-cli-2026-05-07-eb50485c626f2501

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

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

Specification Test Enforcement

This PR updates specification-driven tests for the following packages, reviewed against their README.md specifications added in commit 3d1140a.

Package Tests Added Tests Updated Spec Sections Covered
actionpins 0 0 No changes needed — tests up-to-date
agentdrain 0 1 removed Core Components, Types, Utility Functions
cli 3 0 Public API (Docker helpers)

Test Derivation

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

Changes

pkg/agentdrain/spec_test.go

  • Removed TestSpec_PublicAPI_Miner_ClusterCount_SPEC_MISMATCH: had an incorrect SPEC_MISMATCH comment (the README does not document ClusterCount() — only Clusters() []Cluster) and was functionally duplicate of the existing TestSpec_PublicAPI_Miner_Clusters test.

pkg/cli/spec_test.go

  • Added TestSpec_PublicAPI_IsDockerAvailable: validates IsDockerAvailable returns a bool without panicking. Documents SPEC_MISMATCH: README shows func() bool but implementation requires context.Context.
  • Added TestSpec_PublicAPI_IsDockerImageAvailable: validates non-existent image returns false. Documents same SPEC_MISMATCH on the ctx parameter.
  • Added TestSpec_PublicAPI_IsDockerImageDownloading: validates non-existent image returns false (no SPEC_MISMATCH — signature matches README).
  • Added "context" import for the new tests.

Spec-Implementation Mismatches Documented

Package Function Mismatch
cli IsDockerAvailable README shows func() bool; implementation is func(context.Context) bool
cli IsDockerImageAvailable README shows func(string) bool; implementation is func(context.Context, string) bool

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 §25494513033

Generated by Package Specification Enforcer · ● 823.1K ·

  • expires on May 10, 2026, 12:15 PM UTC

- agentdrain: remove TestSpec_PublicAPI_Miner_ClusterCount_SPEC_MISMATCH
  which had an incorrect SPEC_MISMATCH comment (README does not document
  ClusterCount()) and was a duplicate of TestSpec_PublicAPI_Miner_Clusters
- cli: add TestSpec tests for IsDockerAvailable, IsDockerImageAvailable,
  IsDockerImageDownloading; add context import for ctx-accepting functions;
  document signature mismatches where README omits context.Context param

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pelikhan pelikhan merged commit 673a123 into main May 7, 2026
@pelikhan pelikhan deleted the spec-enforcer/actionpins-agentdrain-cli-2026-05-07-eb50485c626f2501 branch May 7, 2026 14:31
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