Skip to content

[spec-enforcer] Enforce specifications for workflow/actions, workflow/aw, workqueue - #78052

Merged
pelikhan merged 1 commit into
mainfrom
spec-enforcer/actions-aw-workqueue-43708716974-82725ba68e2a6f71
Nov 15, 2026
Merged

pelikhan merged 1 commit into
mainfrom
spec-enforcer/actions-aw-workqueue-43708716974-82725ba68e2a6f71

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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.

Package Tests Added Tests Passing (total) Spec Sections Covered
workflow/actions 1 10 Overview, Public API
workflow/aw 3 7 Overview, Public API, Dependencies
workqueue 2 13 Public API, Constants

Test 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 !integration build tag, and the TestSpec_ prefix.

Spec-Implementation Mismatches

None observed in the exercised contracts. SPEC_AMBIGUITY comments retain limits around expression wrapping, execution-block and status-only input forms, and request admission rules.

Validation and experimental coverage
  • make fmt and 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-progress ran 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.
  • The remaining make check-workflow-drift failed 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.
  • One combined Cobertura report was verified and accepted for upload with label spec-enforcer/generated-tests. Spec-only statement coverage is 43.7% for workflow/actions, 16.4% for workflow/aw, and 2.5% for workqueue. These are focused contract checks.

Round-Robin State

  • Run mode: round-robin; cache hit.
  • Packages processed this run: workflow/actions, workflow/aw, workqueue; all three README hashes changed since cached enforcement.
  • Next packages in rotation: actionpins, agentdrain, atif after cursor 50 wraps. Missing-test priority selects workflow/codemod, workflow/gradershell, and workflow/lint first.
  • Total eligible packages: 51 Go packages with README.md specifications, excluding fixture directories.
  • Rotation, merged README hashes, and per-package enforcement records were saved and read back; unprocessed hash entries were preserved.

References: §43708716974

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

  • expires on Nov 18, 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.

🟡 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")
@pelikhan
pelikhan merged commit d4ba1b0 into main Nov 15, 2026
3 checks passed
@pelikhan
pelikhan deleted the spec-enforcer/actions-aw-workqueue-43708716974-82725ba68e2a6f71 branch November 15, 2026 15:41
@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