Skip to content

[spec-enforcer] Enforce specifications for workqueue, actionpins, agentdrain - #76499

Merged
pelikhan merged 1 commit into
mainfrom
spec-enforcer-workqueue-42807095610-2eda841e413f6190
Nov 10, 2026
Merged

pelikhan merged 1 commit into
mainfrom
spec-enforcer-workqueue-42807095610-2eda841e413f6190

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Specification Test Enforcement

This PR adds specification-driven tests for the selected packages.

Package Tests Added Tests Passing Spec Sections Covered
workqueue 3 3 Public API, Types, Constants
actionpins 0 31 Public API, Types, Constants, Thread Safety, Design Decisions
agentdrain 0 31 Public API, Types, Constants, Thread Safety, Design Decisions

Test Derivation

All tests are derived from README.md specifications, not from implementation source code. The new workqueue suite validates the exact documented ledger constants, exported core type contracts, and stable ProtocolError formatting. Underspecified ledger fixtures and algorithms were intentionally not invented.

Spec-Implementation Mismatches

None found.

Validation

  • go build ./pkg/workqueue/...
  • go build ./pkg/actionpins/...
  • go build ./pkg/agentdrain/...
  • go test -v -run TestSpec ./pkg/workqueue/ ./pkg/actionpins/ ./pkg/agentdrain/
  • make agent-report-progress passed build, schema freshness, and impacted workqueue tests; its aggregate target remained incomplete because golangci-lint is not installed and the custom-linter subcheck exited during tool dependency fetching
  • Cobertura generation succeeded; the experimental coverage upload was reported incomplete after the uploader rejected both allowed recovery locations

Round-Robin State

  • Run mode: round-robin
  • Packages processed this run: workqueue, actionpins, agentdrain
  • Next packages in rotation: atif, cli, colorwriter
  • Total eligible packages: 39 (with README.md)

References:

Generated by 📋 Package Specification Enforcer · codex · gpt56 · ~165 AIC · ⌖ ~24 AIC · ⊞ 18.8K · ◷

  • expires on Nov 13, 2026, 3:33 AM UTC-08:00

Copilot AI 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.

🟡 Changes recommended

The new spec suite still has a failing assert.NotNil for the typed-nil Operation value and does not reliably detect the documented MaxEnqueued type mismatch.

2 open issues
What changed in this PR

Adds black-box, README-derived specification tests for the workqueue package, covering documented constants, exported types, and ProtocolError formatting.

Changes:

  • Verifies documented ledger constant values.
  • Checks the availability of exported workqueue types.
  • Tests stable ProtocolError string formatting, including empty messages.
File Description
pkg/​workqueue/​spec_test.go Adds README-derived specification tests for workqueue constants, exported types, and protocol error formatting.

Review effort: Lite (auto)

{name: "Actor", value: workqueue.Actor{}},
{name: "Request", value: workqueue.Request{}},
{name: "QueueCommit", value: workqueue.QueueCommit{}},
{name: "Operation", value: workqueue.Operation{}},
{name: "default branch", actual: workqueue.DefaultBranch, expected: "work-queue"},
{name: "protocol version", actual: workqueue.Version, expected: 3},
{name: "maximum timestamp", actual: workqueue.MaxTimestamp, expected: int64(9007199254740991)},
{name: "maximum enqueue timestamp", actual: workqueue.MaxEnqueued, expected: int64(9007199254740991)},
@pelikhan
pelikhan merged commit d84130f into main Nov 10, 2026
3 checks passed
@pelikhan
pelikhan deleted the spec-enforcer-workqueue-42807095610-2eda841e413f6190 branch November 10, 2026 14:32
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.2.3

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.

2 participants