Skip to content

feat: split-style tracking issues and deferred creation for catalog-destined test cases#33

Merged
ChristopherJHart merged 4 commits intomasterfrom
fix/defer-issue-creation-until-catalog-pr
Feb 6, 2026
Merged

feat: split-style tracking issues and deferred creation for catalog-destined test cases#33
ChristopherJHart merged 4 commits intomasterfrom
fix/defer-issue-creation-until-catalog-pr

Conversation

@ChristopherJHart
Copy link
Collaborator

@ChristopherJHart ChristopherJHart commented Feb 6, 2026

Summary

  • For catalog-destined test cases, project issues are now only created after a catalog PR exists, so the issue can reference it
  • Catalog-destined test cases use the split-style tracking issue template (tracking_issue.j2) with catalog PR reference and task checklist, instead of the collapsed template (tac_issues_body.j2)
  • Non-catalog test cases continue to use the collapsed-style template (unchanged behavior)
  • Reorders the process_test_requirements loop: catalog PR creation → issue creation → project PR creation
  • Labels are now applied to catalog PRs: adds quicksilver, removes script-already-created, keeps other labels (e.g., GenAI)
  • Note: label application to catalog PRs was never implemented in any prior code path

Changes

Commit 1: Defer issue creation until catalog PR exists

  • requires_issue_creation in test_cases_processor.py: checks metadata.catalog.destined and requires metadata.catalog_tracking.pr_number before allowing issue creation
  • process_test_requirements in test_requirements.py: catalog PR creation moved before issue creation in the processing loop

Commit 2: Wire split-style tracking issue template

  • create_tracking_issue_for_catalog_test_case() in test_requirements.py: renders tracking_issue.j2 from test case metadata, supporting both same-run and previous-run catalog PRs
  • _extract_os_from_catalog_branch(): helper to extract OS from catalog branch name pattern feat/{os}/add-{stem}
  • process_test_requirements loop branches on metadata.catalog.destined to choose split vs collapsed issue template

Commit 3: Apply labels to catalog PRs

  • create_catalog_pr_for_test_case now accepts a labels parameter and calls set_labels_on_issue after PR creation (the GitHub PR creation API does not support labels inline)
  • process_test_requirements passes test case labels through to catalog PR creation

Commit 4: Transform catalog PR labels

  • Catalog PR labels are built from test case labels with script-already-created removed and quicksilver added
  • Issue labels remain unchanged — they use whatever is defined on the test case

Tests

  • 4 unit tests for catalog-destined issue creation gating
  • 4 unit tests for _extract_os_from_catalog_branch
  • 8 unit tests for create_tracking_issue_for_catalog_test_case
  • 2 unit tests for catalog PR label application
  • 2 unit tests for catalog PR label transformation (quicksilver added, script-already-created removed)
  • 3 integration tests for end-to-end flow (same-run tracking issue, previous-run tracking issue, non-catalog collapsed template)

Test plan

  • All 348 unit tests pass
  • Manual validation against Google-GDC-XR-to-Nexus-Migration project in CI

🤖 AI Generation Metadata

  • AI Generated: Yes
  • AI Tool: claude-code
  • AI Model: opus-4.6
  • AI Contribution: ~85%
  • AI Reason: defer issue creation + split-style tracking issues + catalog PR labels
  • Human Oversight: Code reviewed and approved by chart2

ChristopherJHart and others added 2 commits February 6, 2026 08:36
…-destined test cases

For catalog-destined test cases, project issues should only be created
after a catalog PR exists so the issue can reference it. This prevents
orphaned issues from being created when test cases have no catalog PR yet.

Changes:
- requires_issue_creation now checks metadata.catalog.destined and
  requires metadata.catalog_tracking.pr_number before allowing issue
  creation for catalog-destined test cases
- Reorder process_test_requirements loop: catalog PR creation runs
  before issue creation so both happen in the same CI run
- Add unit tests for new catalog-destined gating behavior
- Add integration tests for single-run catalog PR + issue creation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…st cases

For catalog-destined test cases, process_test_requirements now creates
tracking issues using tracking_issue.j2 (split style with catalog PR
reference and task checklist) instead of tac_issues_body.j2 (collapsed
style with test requirement details only). Non-catalog test cases
continue to use the collapsed template.

Adds create_tracking_issue_for_catalog_test_case() which renders the
tracking template from test case metadata, supporting both same-run
catalog PRs and catalog PRs from previous runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ChristopherJHart ChristopherJHart changed the title fix: defer project issue creation until catalog PR exists feat: split-style tracking issues and deferred creation for catalog-destined test cases Feb 6, 2026
ChristopherJHart and others added 2 commits February 6, 2026 09:28
create_catalog_pr_for_test_case now accepts a labels parameter and
calls set_labels_on_issue after PR creation, since the GitHub PR
creation API does not support labels inline. The process_test_requirements
loop passes test case labels through to catalog PR creation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…alog PRs

Catalog PRs now get the "quicksilver" label added and the
"script-already-created" label removed before label application.
Issue labels are unchanged — they continue to use whatever is
defined on the test case.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ChristopherJHart ChristopherJHart marked this pull request as ready for review February 6, 2026 15:11
@ChristopherJHart ChristopherJHart merged commit 5667bd5 into master Feb 6, 2026
2 checks passed
@ChristopherJHart ChristopherJHart deleted the fix/defer-issue-creation-until-catalog-pr branch February 6, 2026 15:12
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.

1 participant