Repository navigation
[spec-enforcer] Enforce specifications for workqueue, workflow/aw, workflow/cachepolicy - #77427
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the added README-derived specification tests for workqueue, AW, and cache policy.
No open issues 🎉
What changed in this PR
Adds README-derived specification tests for three gh-aw packages, strengthening public-contract coverage without changing production code.
Changes:
- Expands workqueue type checks and tests canonical operation encoding and dispatch-principal independence.
- Tests AW source preservation, deterministic edits, document metadata, and compiler responsibility boundaries.
- Tests cache-write allowance for pull requests and separation of read-only events from writers.
| File | Description |
|---|---|
pkg/workqueue/spec_test.go |
Adds public-type coverage and operation/principal contract tests. |
pkg/workflow/cachepolicy/spec_test.go |
Adds cache event-policy specification tests. |
pkg/workflow/aw/spec_test.go |
Adds parsing, emission, document, and compiler-boundary specification tests. |
Review effort: Balanced (dynamic)
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 eight README-derived specification tests and expands the workqueue public-type checks across three packages. All 16 specification tests pass. This PR is a draft because repository-wide workflow validation is blocked by npm certificate errors.
workqueueworkflow/awworkflow/cachepolicyPassing counts include existing top-level specification tests. Workqueue gains coverage for ten additional documented public types, canonical operation encoding, and the principal frozen at dispatch launch. AW tests cover source preservation, deterministic edits, source locations, and compiler responsibility boundaries. Cachepolicy tests cover the documented pull-request allowance and separation of read-only events from writers.
Test Derivation
Tests are derived from package README.md contracts and exercise exported APIs from external test packages. README extraction and build/test classification were performed by the requested agents.
Spec-Implementation Mismatches
None found in the covered contracts.
Specification gaps and validation details
SPEC_AMBIGUITYcomments record unspecified AW location numbering, execution-block forms, dependency inputs, and status-only requirements. Cachepolicy does not enumerate complete event sets, ordering, ownership, or membership ofworkflow_call; the tests avoid imposing those details.Validation:
TestSpec_tests passed.spec-enforcer/generated-tests. Specification-test statement coverage: workqueue 2.1%, AW 8.4%, cachepolicy 100.0%.DEPTH_ZERO_SELF_SIGNED_CERT. Package availability could not be established through those checks.Rotation state, enforcement records, and merged README hashes were saved and read back successfully.
Round-Robin State
Workqueue was prioritized because its cached README hash changed. AW and cachepolicy lacked specification tests. Documentation-only directories and the unsupported internal-helper overview were excluded. The saved cursor is 42.
Next Actions
Review the specification tests and rerun the full pre-PR gate when npm certificate validation is available before marking this PR ready.
References: §43416723381