Repository navigation
[spec-enforcer] Enforce specifications for workflow/actions, workflow/aw, workqueue - #78052
Merged
pelikhan merged 1 commit intoNov 15, 2026
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An active moderate finding remains because the fingerprint tests do not verify that actor, kind, and parameters each independently affect the digest.
1 open issue
What changed in this PR
Adds README-derived specification tests for public contracts across workflow actions, authored workflows, and workqueue packages without changing production behavior.
Changes:
- Adds resolved output rendering tests for same-job and cross-job references.
- Adds expression parsing, dependency traversal, and empty-condition tests.
- Adds workqueue public type, request fingerprint, and malformed JSONL coverage.
| File | Description |
|---|---|
| pkg/workqueue/spec_test.go | Adds tests for documented public types, request fingerprint behavior, and malformed JSONL parsing. |
| pkg/workflow/aw/spec_test.go | Adds tests for syntax-only expression parsing, transitive and cyclic dependency traversal, and empty detection conditions. |
| pkg/workflow/actions/spec_test.go | Adds tests for resolved output expression rendering across same-job and cross-job references. |
Review effort: Lite (dynamic)
Comment on lines
+391
to
+393
| fingerprint, err := workqueue.Fingerprint(actor, kind, json.RawMessage(parameters)) | ||
| require.NoError(t, err, "integer-valued request parameters must support a canonical fingerprint") | ||
| require.NotEmpty(t, fingerprint, "a canonical request fingerprint must identify its input") |
This was referenced Nov 15, 2026
pelikhan
deleted the
spec-enforcer/actions-aw-workqueue-43708716974-82725ba68e2a6f71
branch
November 15, 2026 15:41
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
Adds six README-derived test functions covering resolved output rendering, syntax-only expression parsing, transitive and cyclic dependency queries, empty detection conditions, canonical request fingerprints, and malformed JSONL. Also checks four additional documented workqueue types.
Validation limitation: the repository-wide workflow drift check failed during npm package validation with
DEPTH_ZERO_SELF_SIGNED_CERT. All selected package builds and all 30 specification test functions pass. The broader validation limitation was reported separately.workflow/actionsworkflow/awworkqueueTest Derivation
All tests derive from the packages' README.md specifications. Implementation source inspection was limited to exported signatures and type declarations. Tests use external test packages, the
!integrationbuild tag, and theTestSpec_prefix.Spec-Implementation Mismatches
None observed in the exercised contracts.
SPEC_AMBIGUITYcomments retain limits around expression wrapping, execution-block and status-only input forms, and request admission rules.Validation and experimental coverage
make fmtand whitespace checks passed.go build ./pkg/workflow/actions/... ./pkg/workflow/aw/... ./pkg/workqueue/...passed.go test -v -run TestSpec ./pkg/workflow/actions/ ./pkg/workflow/aw/ ./pkg/workqueue/passed: 30 top-level tests, zero failures. The test-output classifier confirmed these results.make agent-report-progressran the build, instruction-prefix checks, schema freshness check, and impacted unit tests successfully. Its initial lint checks failed during tool setup; after installing the documented golangci-lint v2.15.0, Go lint passed and the repository gate's custom-lint filter confirmed no findings in changed files. Unit tests were run through this gate once.make check-workflow-driftfailed on npm certificate trust during runtime-package validation. Certificate validation was left unchanged, and the check restored the original generated workflow files. Only the three specification test files are committed.spec-enforcer/generated-tests. Spec-only statement coverage is 43.7% forworkflow/actions, 16.4% forworkflow/aw, and 2.5% forworkqueue. These are focused contract checks.Round-Robin State
workflow/actions,workflow/aw,workqueue; all three README hashes changed since cached enforcement.actionpins,agentdrain,atifafter cursor 50 wraps. Missing-test priority selectsworkflow/codemod,workflow/gradershell, andworkflow/lintfirst.References: §43708716974