Skip to content

Export temporary ID map from safe output handler manager#12450

Merged
mnkiefer merged 4 commits intomainfrom
copilot/fix-safe-output-error-issue-number
Jan 29, 2026
Merged

Export temporary ID map from safe output handler manager#12450
mnkiefer merged 4 commits intomainfrom
copilot/fix-safe-output-error-issue-number

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

The assign_to_agent step fails to resolve temporary IDs (e.g., aw_abc123def456) because safe_output_handler_manager.cjs generates the mappings internally but never exports them as step outputs. The GH_AW_TEMPORARY_ID_MAP environment variable remains empty, causing GraphQL queries to fail with "Could not resolve to an Issue with the number of X".

Changes

  • Export temporary ID map: Added core.setOutput("temporary_id_map", ...) after message processing to pass mappings to downstream steps
  • Export processed count: Added core.setOutput("processed_count", ...) for consistency with project handler manager
  • Handle early returns: Set outputs to empty/zero values when no agent output or no handlers loaded
// Normal flow - export actual mappings
const temporaryIdMapJson = JSON.stringify(processingResult.temporaryIdMap);
core.setOutput("temporary_id_map", temporaryIdMapJson);
core.setOutput("processed_count", successCount);

// Early returns - export empty values
core.setOutput("temporary_id_map", "{}");
core.setOutput("processed_count", 0);

The workflow now successfully passes temporary ID mappings: create_issuesafe_output_handler_manager (creates mapping) → assign_to_agent (resolves mapping).

Original prompt

Fix safe output errors of not finding the right issue number of the newly created issue to assign to agent: https://github.com/githubnext/gh-aw/actions/runs/21466646770/job/61830398476


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Export temporary_id_map as output from safe_output_handler_manager so downstream steps (like assign_to_agent) can resolve temporary IDs to real issue numbers. Also export processed_count for consistency with project handler manager.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer mnkiefer marked this pull request as ready for review January 29, 2026 05:38
@mnkiefer
Copy link
Contributor

@copilot recompile workflows

Set temporary_id_map and processed_count outputs to empty/zero values when returning early (no agent output or no handlers). This ensures downstream steps always have defined values to work with.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix safe output errors for newly created issue assignment Export temporary ID map from safe output handler manager Jan 29, 2026
Copilot AI requested a review from mnkiefer January 29, 2026 05:48
Copy link
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot recompile workflows

Workflows recompiled successfully. No changes to .lock.yml files needed - the JavaScript changes in safe_output_handler_manager.cjs are loaded at runtime via require() statements, not embedded in the compiled workflows.

Copilot AI requested a review from mnkiefer January 29, 2026 05:53
@mnkiefer mnkiefer merged commit 6397b92 into main Jan 29, 2026
119 checks passed
@mnkiefer mnkiefer deleted the copilot/fix-safe-output-error-issue-number branch January 29, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants