Repository navigation
[spec-enforcer] Enforce specifications for cli/data, workflow/actions, workflow/actionslanguageservice - #77137
Merged
pelikhan merged 1 commit intoNov 12, 2026
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The change still has two active moderate test-coverage issues: the cache-mode validator is not tested with explicit valid or invalid modes, and identifier validation lacks any invalid-input cases.
2 open issues
What changed in this PR
Adds external-package specification tests for three README-documented Go packages, covering native workflow handling, Actions expression parsing, and the bundled model catalogue.
Changes:
- Added a bundled provider-catalogue JSON contract test for
cli/data. - Added source-preservation, resolution, lowering, and validation tests for
workflow/actions. - Added expression parsing, reference handling, interpolation, workflow parsing, and validation tests for
workflow/actionslanguageservice.
| File | Description |
|---|---|
| pkg/workflow/actionslanguageservice/spec_test.go | Adds contract tests for Actions expression parsing, tokenization, references, interpolation, workflow parsing, identifiers, and cache-mode validation. |
| pkg/workflow/actions/spec_test.go | Adds contract tests for native workflow parsing, resolution, lowering, validation, source preservation, and editing. |
| pkg/cli/data/spec_test.go | Adds a contract test for the embedded provider catalogue JSON exposed by cli/data. |
Review effort: Lite (auto)
Comment on lines
+200
to
+203
| func TestSpec_PublicAPI_ActionsIdentifier(t *testing.T) { | ||
| for _, name := range []string{"build", "test1"} { | ||
| assert.True(t, actionslanguageservice.ActionsIdentifier(name, false), "ordinary Actions identifier %q must validate", name) | ||
| } |
Comment on lines
+209
to
+212
| func TestSpec_PublicAPI_ValidateWorkflowWithCacheMode(t *testing.T) { | ||
| source := "on: push\njobs:\n build:\n runs-on: ubuntu-latest\n steps:\n - run: echo ready\n" | ||
| err := actionslanguageservice.ValidateWorkflowWithCacheMode("spec.yml", source) | ||
| require.NoError(t, err, "a native workflow with no explicit cache policy must validate") |
This was referenced Nov 12, 2026
pelikhan
deleted the
spec-enforcer-actions-43208768309-8d40ce13529033ab
branch
November 12, 2026 13:03
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
Three README-documented packages lacked specification tests. This PR adds 21 external-package contract tests covering the bundled provider catalogue, native workflow resolution and source preservation, and Actions expression parsing.
cli/dataworkflow/actionsworkflow/actionslanguageserviceTest Derivation
All behavioral assertions derive from package README.md specifications. Implementation inspection was limited to package declarations, signatures, and type declarations. Tests use exported APIs, the
TestSpec_prefix, and the!integrationbuild tag.Validation
All 21 specification tests pass. Package builds, impacted unit tests, schema freshness, and Go lint passed. Experimental Cobertura coverage was accepted for upload with label
spec-enforcer/generated-tests: generated tests cover 43.7% of statements inworkflow/actionsand 56.2% inworkflow/actionslanguageservice; the embedded data package has no executable statements.This PR is a draft because repository-wide workflow validation remains blocked: 357 of 365 workflows compiled, while eight unchanged workflows failed npm runtime-package validation with
DEPTH_ZERO_SELF_SIGNED_CERT. The blocker was recorded separately.Validation details and affected workflows
make fmtand package-specificgo buildandgo test -v -run TestSpecchecks.make agent-report-progressonce. Its build, schema, and impacted-test checks passed; Go lint was completed separately after installing the pinned linter.make check-workflow-driftcompleted compilation but could not establish drift status because runtime-package validation failed indaily-graft-intelligence.md,daily-reliability-review.md,daily-token-consumption-report.md,deep-report.md,go-pattern-detector.md,mcp-inspector.md,portfolio-analyst.md, andsmoke-otel-backends.md.Spec-Implementation Mismatches
No implementation mismatch was confirmed for the tested contracts.
SPEC_AMBIGUITYcomments identify limits in the README wording, including workflow ID scope, typed-step interpolation restrictions, AST traversal granularity, expression-boundary measurement, identifier and cache-mode rules, and pattern flag/filter semantics. Pattern behavior is deferred pending a precise specification.Round-Robin State
Rotation advanced to index 39. Rotation JSON, enforcement records, and merged README hashes were saved and read back successfully, preserving unprocessed hashes. Nested package paths use their canonical slash-separated names; the existing PR-text recovery regex will need slash support to recover these names if cache state is lost.
The draft remains pending successful repository-wide workflow validation.
References: §43208768309