Fix wasm/native compiler divergence, add smoke workflow golden tests#16705
Merged
Fix wasm/native compiler divergence, add smoke workflow golden tests#16705
Conversation
Add all 130 production agentic workflows from .github/workflows/ as wasm golden test fixtures, alongside their 58 shared component dependencies. This increases coverage from 16 synthetic fixtures to 142 real-world production workflows (plus 5 that are gracefully skipped due to path security restrictions or missing external files). Key changes: - Copy all production .md workflows as test fixtures - Copy all shared/ components (37 root + 21 MCP configs) for import resolution - Fix fuzzy cron schedule scattering by passing WithWorkflowIdentifier() to the compiler (derived from fixture filename) - Gracefully skip workflows that can't compile via string API (path security, missing agent files) instead of hard-failing Coverage by engine: 72 copilot, 31 claude, 9 codex workflows Coverage by feature: schedule triggers, safe-outputs, imports, tools, network config, slash commands, label triggers, MCP servers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the wasm golden test coverage from 16 synthetic fixtures to 142 real production workflows, adds 58 shared components, and fixes a bug in fuzzy cron schedule compilation.
Changes:
- Added 204 production workflow files (130 agentic workflows + 58 shared components + 16 original fixtures) as test inputs
- Fixed fuzzy cron schedule compilation by passing workflow identifier to the compiler
- Updated test to gracefully skip 5 workflows with path security restrictions instead of failing
Reviewed changes
Copilot reviewed 24 out of 313 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| codex-github-remote-mcp-test.golden | New golden output for Codex engine workflow testing GitHub remote MCP integration |
| code-scanning-fixer.golden | New golden output for automated code scanning alert fixing workflow |
| cli-consistency-checker.golden | New golden output for CLI consistency verification workflow |
| chroma-issue-indexer.golden | New golden output for issue indexing into Chroma vector database |
| changeset.golden | New golden output for automated changeset file generation |
| brave.golden | New golden output for Brave search agent workflow |
| artifacts-summary.golden | New golden output for artifacts usage reporting workflow |
| archie.golden | New golden output for Mermaid diagram generation agent |
| ai-moderator.golden | New golden output for AI-powered content moderation workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rkflows ## Bug fixes (wasm compiler parity) ### Fix pre_activation job divergence (compiler_jobs.go) buildJobs() read frontmatter from disk via os.ReadFile(markdownPath) to determine if pre_activation job should be generated. In wasm/string API mode, markdownPath is virtual — os.ReadFile fails, frontmatter is nil, and pre_activation is always generated even when the workflow uses safe-events-only triggers. Fix: check c.contentOverride first (set by ParseWorkflowString), falling back to disk read. ### Fix contentOverride lifetime (compiler_string_api.go) ParseWorkflowString cleared contentOverride via defer before CompileToYAML could use it. Moved the defer cleanup to CompileToYAML so the content remains available throughout the compilation pipeline. ### Fix security scanning in wasm (compiler_orchestrator_engine.go) Security scanning of imported files used os.ReadFile directly, bypassing the virtual filesystem. Changed to parser.ReadFile which routes through readFileFunc (overridden in wasm builds to check virtual files first). ### Add parser.ReadFile wrapper (virtual_fs.go) Exported ReadFile function that routes through readFileFunc, enabling both native (os.ReadFile) and wasm (virtual filesystem) builds to use the same API for file reading. ### Add WorkflowIdentifier to wasm binary (cmd/gh-aw-wasm/main.go) Derive workflow identifier from filename for fuzzy cron schedule scattering. Without this, workflows with schedule triggers fail to compile in the wasm binary. ## Test expansion ### Node.js wasm test improvements (scripts/test-wasm-golden.mjs) - Load ALL shared components as virtual files (not just imports) - Skip fixtures without golden files before attempting compilation - Simplified error handling: golden file presence determines skip vs fail Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6df35c6 to
2c60b79
Compare
pelikhan
reviewed
Feb 19, 2026
Contributor
There was a problem hiding this comment.
- can we reduce the number of files. we don't need the entire zoo. a single workflow, or smoke workflow will suffice. we are not testing the wasm compiler.
- these tests should not break on mondane changes to the .github/workflows/*.md . if they break the build everytime, it will create too much friction. best to keep a local "gold suite"
- is there a mechnical way of fixing these test, not agentic.
Per review feedback: remove all 130 production workflows to avoid golden tests breaking on mundane .github/workflows/*.md changes. Keep a small, stable "gold suite" of: - 16 synthetic fixtures (engine types, triggers, features) - 4 smoke workflows (smoke-claude, smoke-codex, smoke-copilot, smoke-test-tools) for real-world coverage - 9 shared components needed by smoke workflows (from 58) This prevents the golden tests from creating friction when production workflows are edited — the fixtures are self-contained and only change when the compiler itself changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Documents directory structure, how to regenerate golden files, add new fixtures, fix regressions, and debug wasm-specific divergence. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pelikhan
approved these changes
Feb 19, 2026
Contributor
pelikhan
left a comment
There was a problem hiding this comment.
Please add a README.md, scripts to explain how to maintain, debug, refresh this test suite.
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.
Summary
Bug fixes (wasm compiler parity)
Fix pre_activation job divergence (
compiler_jobs.go)buildJobs()read frontmatter from disk viaos.ReadFile(markdownPath)to decide whether to generate a pre_activation job. In wasm/string API mode,markdownPathis virtual —os.ReadFilefails, frontmatter is nil, and pre_activation is always generated. Fix: checkc.contentOverridefirst, fall back to disk.Fix contentOverride lifetime (
compiler_string_api.go)ParseWorkflowStringclearedcontentOverridevia defer beforeCompileToYAMLcould use it. Moved cleanup toCompileToYAMLso content remains available throughout compilation.Fix security scanning in wasm (
compiler_orchestrator_engine.go)Security scanning of imported files used
os.ReadFiledirectly, bypassing the virtual filesystem. Changed toparser.ReadFilewhich routes throughreadFileFunc(overridden in wasm builds).Add parser.ReadFile wrapper (
virtual_fs.go)Exported
ReadFilefunction routing throughreadFileFuncfor both native and wasm builds.Add WorkflowIdentifier to wasm binary (
cmd/gh-aw-wasm/main.go)Derive workflow identifier from filename for fuzzy cron schedule scattering.
Test fixtures (20 total)
Fixtures are self-contained in
testdata/— editing.github/workflows/*.mdwill NOT break these tests.Test plan
🤖 Generated with Claude Code