Repository navigation
Deflake connector pattern budget and template elseif fuzz assertion - #79653
Conversation
- connector_regex: start the 1s pattern budget when the worker comes online, with a separate 10s startup bound, so slow isolate startup on loaded CI runners is not reported as a validation budget overrun (flaky TestLinearDevelopmentShorthandStaging in Unit tests K-M). - template fuzz: exempt literal code examples with unparseable expressions, which wrapExpressionsInTemplateConditionals intentionally preserves. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟡 Changes recommended
Worker readiness and timer sequencing still weaken the regex execution limit and can time out trivial matches, while the fuzz assertion can misclassify intentionally preserved literal tags as failures.
2 open issues
What changed in this PR
This PR targets intermittent CI failures in gh-aw’s connector validation and workflow-template fuzz tests by adjusting timeout accounting and literal-code assertions.
Changes:
- Starts the one-second regex budget on worker
online, with a separate ten-second startup deadline. - Adds a fake-timer regression test for delayed worker startup.
- Exempts unparseable literal-code
elseifexamples from canonicalization assertions and adds the reported failing seed.
| File | Description |
|---|---|
pkg/workflow/template_fuzz_test.go |
Updates literal-code exemptions and adds a regression seed. |
actions/setup/js/connector_regex.test.cjs |
Adds a worker-startup timing regression test. |
actions/setup/js/connector_regex.cjs |
Separates worker startup and pattern-matching deadlines. |
Review effort: Max (adaptive)
| worker.once("online", () => { | ||
| if (settled) return; | ||
| clearTimeout(timer); | ||
| timer = setTimeout(() => { | ||
| void finish(undefined, new Error(`${ERR_VALIDATION}: Connector pattern exceeded its validation budget`)); | ||
| }, PATTERN_BUDGET_MS); |
| // Ignore partial/malformed fragments produced by fuzzing (e.g. "{{elseif 0"). | ||
| if strings.Contains(input, "{{#if") { | ||
| expressions, _ := actionslanguageservice.ExtractExpressions(result) | ||
| masked := maskTemplateCodeRegions(result) |


Two CI checks have been failing intermittently across unrelated PRs and are not caused by those PRs' changes:
Unit tests (K-M)andfuzz (Workflow-Core). This PR fixes the cause of each.Unit tests (K-M):
TestLinearDevelopmentShorthandStagingmatchesConnectorPattern(actions/setup/js/connector_regex.cjs) runs each connector pattern in a worker thread with a 1s budget. That budget started when the worker was created, so worker startup counted against it. On a loaded CI runner, startup alone could use up the second and reject a valid argument. The Node conformance check then failed, even though the same SHA passes on other runs.onlineevent, so it measures pattern execution rather than startup.fuzz (Workflow-Core):
FuzzWrapExpressionsInTemplateConditionalsThe fuzzer found
{{#if`{{elseif `}}. Theelseiftag is inside inline code and its expression does not parse.wrapExpressionsInTemplateConditionalsintentionally preserves such literal code examples verbatim (seeTestWrapLiteralConditionalExamples), but the fuzz assertion still required everyelseifto be canonicalized.Validation
make agent-report-progresspasses.Review notes