Repository navigation
[spec-enforcer] Enforce specifications for workqueue, actionpins, agentdrain - #76499
Merged
pelikhan merged 1 commit intoNov 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 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
ProtocolErrorstring 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
deleted the
spec-enforcer-workqueue-42807095610-2eda841e413f6190
branch
November 10, 2026 14:32
Contributor
Author
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Specification Test Enforcement
This PR adds specification-driven tests for the selected packages.
workqueueactionpinsagentdrainTest Derivation
All tests are derived from README.md specifications, not from implementation source code. The new
workqueuesuite validates the exact documented ledger constants, exported core type contracts, and stableProtocolErrorformatting. 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-progresspassed build, schema freshness, and impactedworkqueuetests; its aggregate target remained incomplete becausegolangci-lintis not installed and the custom-linter subcheck exited during tool dependency fetchingRound-Robin State
workqueue,actionpins,agentdrainatif,cli,colorwriterReferences: