Skip to content

[spec-enforcer] Enforce specifications for workqueue, workflow/aw, workflow/cachepolicy - #77427

Merged
pelikhan merged 1 commit into
mainfrom
spec-enforcer-43416723381-fdfad937ed3b8a45
Nov 13, 2026
Merged

pelikhan merged 1 commit into
mainfrom
spec-enforcer-43416723381-fdfad937ed3b8a45

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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.

Package Tests Added Tests Passing Spec Sections Covered
workqueue 2 10 Public API, Types, Constants
workflow/aw 4 4 Overview, Public API, Dependencies
workflow/cachepolicy 2 2 Public API

Passing 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_AMBIGUITY comments 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 of workflow_call; the tests avoid imposing those details.

Validation:

  • Package builds and all 16 TestSpec_ tests passed.
  • Formatting, compile/vet, and sampled impacted unit tests passed.
  • Go lint passed with zero issues. The custom linter reported 15 findings in unchanged implementation files and none in the changed files, matching the repository gate's exclusion rule.
  • An experimental Cobertura report for all three packages was generated, verified, and accepted for upload as spec-enforcer/generated-tests. Specification-test statement coverage: workqueue 2.1%, AW 8.4%, cachepolicy 100.0%.
  • The full pre-PR gate remains incomplete: workflow validation compiled 358 of 366 workflows successfully; eight existing workflows failed npm runtime-package checks with 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

  • Run mode: round-robin
  • Packages processed this run: workqueue, workflow/aw, workflow/cachepolicy
  • Next packages in rotation: workflow/checkoutpolicy, workflow/codemod, workflow/compilerenv
  • Total eligible packages: 51 (Go packages with README.md)

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

Generated by 📋 Package Specification Enforcer · codex · routed: gpt61 high · ~139 AIC · ⌖ ~2 AIC · ⊞ 461 · ◷

  • expires on Nov 16, 2026, 3:50 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.

🟢 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)

@pelikhan
pelikhan merged commit 58691d5 into main Nov 13, 2026
9 checks passed
@pelikhan
pelikhan deleted the spec-enforcer-43416723381-fdfad937ed3b8a45 branch November 13, 2026 12:30
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.3.0

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