Fix test assertions for enhanced logging in close_older_issues#11083
Merged
Fix test assertions for enhanced logging in close_older_issues#11083
Conversation
The close_older_issues.cjs implementation was updated to use more detailed and formatted log messages. This commit updates the test assertions to match the new message formats: - Warning message now includes⚠️ emoji prefix - Info message now includes ✓ emoji and "operation complete" suffix Fixes #11053 fallout - resolves 2 JavaScript test failures in close_older_issues.test.cjs that were blocking CI. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix JS test suite failures after PR #11053
Fix test assertions for enhanced logging in close_older_issues
Jan 21, 2026
Contributor
CI Failure Investigation - Run #30997This PR fixed the test failure that affected CI run #30997 (21224098253). Failure Details
Timeline
Error MessagesAnalysisThe test failure was unrelated to PR #11080's changes (which only modified documentation and added Go tests). The failure was caused by enhanced logging format introduced in PR #10882 without updating the test assertions. This PR correctly updated the test expectations to match the new message format. Prevention✅ This issue is already resolved. For future prevention:
Investigation stored in
|
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.
Two tests in
close_older_issues.test.cjsfailed because assertions expected old message formats while the implementation had been updated with emoji prefixes and enhanced descriptions.Changes
"Found 15 older issues..."→"⚠️ Found 15 older issues...""No older issues found to close"→"✓ No older issues found to close - operation complete"Context
The
close_older_issues.cjsimplementation was enhanced with structured logging output including emoji prefixes and operation status indicators. Test expectations were not synchronized with these changes.Original prompt
This section details on the original issue you should resolve
<issue_title>[CI Failure Doctor] JS Test Suite Failure - 44 Tests Failing After PR #11053 (handle_agent_failure changes)</issue_title>
<issue_description># 🏥 CI Failure Investigation - Run githubnext/gh-aw#21223010566
Summary
The CI workflow failed with 44 JavaScript test failures across 4 test files in the
jsjob after merging PR #11053. The failures indicate that changes tohandle_agent_failure.cjsand its tests were not properly synchronized with the safe outputs schema validation system.Failure Details
js(Step 7: Run tests)Root Cause Analysis
🔴 PRIMARY ISSUE: Safe Output Schema Validation Failures (36 tests)
File:
collect_ndjson_output.test.cjsError Pattern:
expected [] to have a length of X but got +0The commit changed
handle_agent_failure.cjsandhandle_agent_failure.test.cjsbut did NOT update the safe outputs schema definitions. This caused widespread test failures in the validation system.Failing test categories:
add-labels,create-pull-request,create-discussion,create-pull-request-review-comment,update_release,assign_milestone,assign_to_agent🟡 SECONDARY ISSUE: MCP Server Test Timeouts (2 tests)
File:
safe_outputs_mcp_server_defaults.test.cjsError:
Test timed out in 10000ms+AssertionError: expected undefined to deeply equal [...]Tests:
should have optional branch parameter for create_pull_requestshould have optional branch parameter for push_to_pull_request_branchRoot Cause: Tests expect schema properties to exist but receive
undefined, suggesting schema structure mismatch.🟢 TERTIARY ISSUE: Test Assertion Changes (2 tests)
File:
close_older_issues.test.cjsError: Unexpected message format changes
Tests:
should limit to MAX_CLOSE_COUNT issues- Expected single warning message, received 3 formatted messagesshould return empty array if no older issues found- Expected single info message, received 24 debug messagesRoot Cause: Code now outputs more verbose logging that wasn't reflected in test assertions.
🔵 QUATERNARY ISSUE: Go Handler Failures (4 tests)
File:
mcp_handler_go.test.cjsError: Various Go script execution failures
Failed Test Summary
Changes in PR #11053
Modified files:
actions/setup/js/handle_agent_failure.cjs(+2, -4)"[agentics] Agentic Workflow Issues"to"[agentic-workflows] Failed runs"actions/setup/js/handle_agent_failure.test.cjs(+3, -3)The problem: These changes updated the templates but didn't synchronize with:
pkg/workflow/js/safe_outputs_tools.jsonInvestigation Findings
Why Did This Pass PR Review?
The PR likely didn't run the full test suite before merging, or tests passed locally but failed in CI due to:
npm testpre-commit checkSimilar Past Issues
Found similar issue #9965 (closed) from Jan 14, 2026:
Recommended Actions
🔴 IMMEDIATE FIX (Required to unblock main)
Revert or fix PR Update parent issue template for agentic-workflow failures #11053 changes
Option A: Quick revert
Option B: Fix schema sync (recommended)
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.