Skip to content

[spec-enforcer] Enforce specifications for workflow/taint, workflowcontract, workqueue - #79247

Merged
pelikhan merged 3 commits into
mainfrom
spec-enforcer-taint-44514452820-94e5cfc310e785ef
Nov 19, 2026
Merged

pelikhan merged 3 commits into
mainfrom
spec-enforcer-taint-44514452820-94e5cfc310e785ef

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

Specification Test Enforcement

Adds README-derived external-package tests for workflow/taint and reviews the next two packages in rotation. The new suite checks every exported AST child field, including Other, interpolation visits, and supplied symbolic source rules and bindings. Parser interface conformance is checked at compile time.

Package Tests Added Tests Passing Spec Sections Covered
workflow/taint 3 3 Overview, Public API
workflowcontract 0 N/A Reviewed: test-only package without an exported runtime API
workqueue 0 14 Existing Public API, Types, Constants, Methods tests reviewed

Counts represent top-level test functions. The new taint functions contain 42 passing subtests. Existing workqueue tests already cover its concrete README contracts. Adding workflowcontract tests would duplicate existing test logic or invent a runtime API.

Test Derivation

All expectations come from package README.md specifications. Implementation-source inspection was limited to declarations, signatures, import paths, and type existence. Tests use exported APIs and synthetic symbolic inputs. The file starts with (go/redacted):build !integration, uses TestSpec_ names, and includes descriptive assertions.

Spec-Implementation Mismatches

None observed in the behaviors tested. SPEC_AMBIGUITY comments identify unspecified child ordering, duplicate/nil handling, callback offsets, visit order, and representation of expressions without sources. Further workqueue scheduling and ledger tests need valid fixtures and acceptance details absent from its README.

Validation

All 17 selected-package specification test functions pass. Changed-code golangci-lint reports 0 issues. Experimental coverage was accepted under spec-enforcer/generated-tests; rotation state, enforcement records, and merged README hashes were saved and read back successfully.

Full repository validation remains blocked, so this PR is a draft: workflow compilation rejects the existing tools.work-queue.observer property in .github/workflows/smoke-work-queue-monitor.md:21. Custom lint also reports an existing CRLF-handling diagnostic at pkg/workflow/taint/workflow.go:425; it reports no diagnostics in the added file.

Validation details
  • make fmt completed.
  • go build ./pkg/workflow/taint/... ./pkg/workqueue/... passed.
  • go test -v -run TestSpec ./pkg/workflow/taint/ ./pkg/workqueue/ ./pkg/workflowcontract/ passed. The test-only workflowcontract package compiled and had no matching specification tests.
  • Specification tests also passed with atomic coverage, and the Cobertura XML was verified nonempty and parsed successfully.
  • make agent-report-progress ran its build, schema, and impacted test-unit checks successfully. The initially missing repository-pinned golangci-lint was installed in temporary storage and changed-code lint then passed. test-unit was run once.
  • Custom lint has one diagnostic confined to existing code. The repository gate normally excludes diagnostics outside changed files.
  • make check-workflow-drift compiled 366 workflows successfully and failed on the existing observer property. Generated incidental changes were restored.
  • Steering issue [aw] Package Specification Enforcer: reported incomplete result #79244 was checked again before finalizing and had no comments.

Round-Robin State

  • Run mode: round-robin
  • Cache: hit
  • Packages processed this run: workflow/taint, workflowcontract, workqueue
  • Saved cursor: 51
  • Next packages in rotation: actionpins, agentdrain, atif, subject to specification-change and missing-test priorities
  • Total eligible packages: 52 Go packages with README.md files; fixture-only directories excluded

Resolve the existing validation failures and rerun the repository gate before marking this draft ready.

References: §44514452820

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

  • expires on Nov 22, 2026, 3:37 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 remain, and the supplied evidence indicates the change is limited to black-box specification tests covering the documented taint package API.

No open issues 🎉

What changed in this PR

Adds black-box, README-derived specification tests for the workflow/taint package, covering its public AST traversal, interpolation, symbolic source analysis, bindings, and parser interface contracts.

Changes:

  • Verifies all projected JavaScriptNode child fields, including Other.
  • Tests interpolation visitation and symbolic source analysis with configured rules and bindings.
  • Adds compile-time conformance checks for parser interfaces and ExpressionError.
File Description
pkg/​workflow/​taint/​spec_test.go Adds external-package specification tests for the taint package’s documented public API.

Review effort: Lite (adaptive)

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

Warning

Threat detection engine error

Threat detection could not complete its analysis due to a tooling error. This is not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs to troubleshoot the error.

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check Unit tests (H-M) (FAILURE): Check run.
  3. Fix failing check Unit tests (N-R) (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "72af337d9716f954b28bb6eeb13212e850696862",
  "kind": "requested",
  "schema_version": "1",
  "state": "4dc491b758a6b463ec5d7f3a324a42ade2e8277e7985315dce7a0c63fe11d85d",
  "work": [
    "0215fa6a7e95d212b943e1dcdbb6a5dd7a082cda1dd71a971263c5c8122eb0a6",
    "e9d7501fc834b70ac771af5e7694ba7f29ea683b65e0f01f096571f99da4b76f"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⊞ 7K · ◷
Comment /souschef to run again

…4514452820-94e5cfc310e785ef

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@pelikhan
pelikhan merged commit 5bbe055 into main Nov 19, 2026
41 checks passed
@pelikhan
pelikhan deleted the spec-enforcer-taint-44514452820-94e5cfc310e785ef branch November 19, 2026 13:57
@gh-aw-bot
gh-aw-bot restored the spec-enforcer-taint-44514452820-94e5cfc310e785ef branch November 19, 2026 14:08

Copilot AI commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

[!WARNING]
Threat detection engine error
...

Merged latest main and fixed CRLF artifact pattern handling in 95be01b2. The three reported test cases pass locally. The final workflow-drift gate is still blocked by npm registry DNS errors for @sentry/[email protected].

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.

4 participants