Simplify safe output handler architecture - remove special case for project handlers#14485
Closed
Simplify safe output handler architecture - remove special case for project handlers#14485
Conversation
When deferred messages are retried, project handlers (update_project, create_project, etc.) were being called with incorrect parameters. Project handlers expect 3 parameters: (message, temporaryIdMap, resolvedTemporaryIds) but the retry logic only passed 2 parameters, causing temporaryIdMap to receive a plain object instead of a Map. Changes: - Store isProjectHandler flag when deferring messages - Check isProjectHandler during retry and pass correct parameters - Add project handler result handling during retry (project URLs and draft items) - Update JSDoc for deferredMessages type Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix errors from run related to update_project
Fix deferred project handler parameter mismatch
Feb 8, 2026
Contributor
|
@copilot Draft issue items should also work with resolvedTemporaryIds. There should be no need for an extra case of the handler |
Project handlers no longer need the Map parameter - they only receive resolvedTemporaryIds (plain object). This simplifies the handler signature and removes the special case for project handlers in the unified manager. Changes: - Updated handler signatures to only accept (message, resolvedTemporaryIds) - Removed isProjectHandler tracking in deferred messages - Simplified retry logic to treat all handlers uniformly - Updated resolveIssueNumber to support both Map and plain object for backward compatibility - Updated internal updateProject function to support both Map and object - Updated tests to not expect Map mutation Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Contributor
Author
You're absolutely right! I've simplified the architecture so all handlers (both project and regular) work the same way:
This makes the code cleaner and removes the unnecessary special case. All 3400 tests pass. (commit e7d00e7) |
Copilot
AI
changed the title
Fix deferred project handler parameter mismatch
Simplify safe output handler architecture - remove special case for project handlers
Feb 8, 2026
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.
Fixes
temporaryIdMap.get is not a functionerror inupdate_projectby simplifying the handler architecture so all handlers work uniformly.Root Cause
The original implementation had project handlers receiving different parameters than regular handlers, creating unnecessary complexity. The reviewer correctly identified that all handlers should work with
resolvedTemporaryIds(plain object).Changes
(message, resolvedTemporaryIds)- no special Map parameterisProjectHandlertracking and conditional branchingResult
resolvedTemporaryIdsand return temporary ID mappings💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.