Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Fixes issue where update_project could not reference issues created with temporary IDs in the same workflow run.

Problem

The update_project safe output handler did not support temporary IDs in the content_number field. When agents created issues with temporary IDs (e.g., aw_dep20260130a) and then tried to add them to a project board, the handler rejected the temporary ID because it only validated content_number as strictly numeric values.

Root Cause

  1. update_project.cjs only supported temporary project IDs, not temporary issue IDs
  2. Content number validation rejected non-numeric values before temporary ID resolution
  3. The handler didn't import or use the existing resolveIssueNumber utility

Solution

Code Changes:

  1. update_project.cjs:

    • Imported temporary ID utilities (loadTemporaryIdMap, resolveIssueNumber)
    • Added temporaryIdMap parameter to handler function
    • Modified content number validation to resolve temporary IDs before numeric check
    • Updated all internal calls to pass the temporary ID map
  2. safe_output_project_handler_manager.cjs:

    • Imported and loaded temporary ID map from environment
    • Passed temporary ID map to all handlers alongside temporary project map
  3. update_project.test.cjs:

    • Added test for successful temporary ID resolution
    • Added test for unresolved temporary ID error handling

Testing

  • ✅ All 3146 JavaScript tests pass (152 test files)
  • ✅ New tests verify temporary ID resolution works correctly
  • ✅ Error handling tested for unresolved temporary IDs
  • ✅ Formatting and linting checks pass

Architecture Context

Workflows with project: frontmatter field generate two handler manager steps:

  1. Project Handler Manager - Processes update_project, create_project_status_update, etc. with GH_AW_PROJECT_GITHUB_TOKEN
  2. Main Handler Manager - Processes other safe outputs with standard GITHUB_TOKEN

The project handler manager now loads the temporary ID map from the environment (populated by the main handler manager from a previous run or deferred messages) and passes it to handlers for resolution.

Original prompt

Analyze run: https://github.com/githubnext/gh-aw/actions/runs/21525437625/job/62028092500
Understand why some safe outputs were skipped:
Skipped (standalone step): 11
Types: update_project, create_project_status_update


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Analyze skipped safe outputs in run analysis Analysis: Safe output "skipped" messages are expected behavior for project handlers Jan 30, 2026
Copilot AI requested a review from mnkiefer January 30, 2026 18:26
@mnkiefer
Copy link
Contributor

@copilot Issues with temporary Ids are not properly added to the board via update_project.

- Import temporary ID utilities in update_project.cjs
- Load and pass temporary ID map in project handler manager
- Resolve temporary IDs in content_number before validation
- Add tests for temporary ID resolution and error cases
- All 3146 JavaScript tests pass

Fixes issue where update_project could not reference issues created
with temporary IDs in the same workflow run.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot Issues with temporary Ids are not properly added to the board via update_project.

Fixed in 65265ab. The update_project handler now supports temporary IDs in the content_number field.

Root cause: When agents created issues with temporary IDs (e.g., aw_dep20260130a) and then tried to add them to a project board using update_project, the handler didn't resolve temporary IDs - it only validated them as numeric values, causing the add to fail.

Solution:

  • Imported temporary ID utilities (resolveIssueNumber)
  • Updated project handler manager to load and pass temporary ID map
  • Modified content number validation to resolve temporary IDs before checking format
  • Added tests to verify temporary ID resolution works

All 3146 JavaScript tests pass.

Copilot AI changed the title Analysis: Safe output "skipped" messages are expected behavior for project handlers Fix: Add temporary ID resolution to update_project handler Jan 30, 2026
@mnkiefer mnkiefer marked this pull request as ready for review January 30, 2026 18:50
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