Skip to content

Phase 2: Automation Scripts Tests (Metadata, DoR/DoD, Triage, Labels) #2148

Description

@ashleyshaw

Phase 2: Automation Scripts

Timeline: Weeks 2-3 (Aug 26-Sep 6)
Priority: P1 — Automation reliability
Effort: 5-7 days
Target Coverage: 80%+ per script

Scripts in Scope

Script Lines Complexity Est. Tests
audit-issue-metadata.js 200+ Medium 12
dor-dod-templates.js 250+ Medium 15
pr-triage-orchestrator.js 300+ High 20
bulk-issue-metadata-updater.js 200+ Medium 12
label-heuristics.js 500+ High 15
label-sync.js 350+ High 12

Total Expected: 60-80 test cases

Deliverables

  • Test file: scripts/automation/__tests__/audit-issue-metadata.test.js
  • Test file: scripts/automation/__tests__/dor-dod-templates.test.js
  • Test file: scripts/automation/__tests__/pr-triage-orchestrator.test.js
  • Test file: scripts/automation/__tests__/bulk-issue-metadata-updater.test.js
  • Test file: scripts/agents/includes/__tests__/label-heuristics.test.js
  • Test file: scripts/agents/includes/__tests__/label-sync.test.js
  • Test fixtures for each script
  • PR created with all tests passing
  • Coverage report showing 80%+ per script

Test Focus Areas

Audit Issue Metadata

  • Issue field validation
  • Frontmatter parsing
  • Audit report generation
  • Batch processing

DoR/DoD Template Injection

  • Section detection
  • Template injection without duplication
  • Markdown preservation
  • Edge cases (nested formatting, special chars)

PR Triage Orchestrator

  • PR metadata extraction
  • Label suggestion
  • Review assignment
  • Conflict resolution
  • Error handling

Bulk Metadata Updater

  • Batch processing
  • Partial failure handling
  • Retry logic
  • Status reporting

Label Heuristics

  • Label inference from issue context
  • Priority scoring
  • Type detection
  • Area mapping

Label Sync

  • Extract labels from linked issue
  • Apply labels to PR
  • Conflict resolution
  • Stale label detection

Success Criteria

  • ✅ All 6 scripts have test files
  • ✅ 60+ test cases written and passing
  • ✅ 80%+ code coverage per script
  • ✅ Fixtures created for all test scenarios
  • ✅ PR merged to develop

Related Epic

Test Coverage Expansion Initiative (Master Epic)


Status: 🔲 Not Started (Queued after Phase 1)
Planned Start: 2026-08-26
Target Completion: 2026-09-06
Created By: Claude Code

Activity

  1. added theissue type on Aug 19, 2026
  2. linear-code commented on Aug 19, 2026

    @linear-code
  3. github-actions commented on Aug 19, 2026

    @github-actions
    Contributor

    ⚠️ This issue does not follow a required issue template.

    Missing required section(s): Definition of Ready (DoR), Definition of Done (DoD)

    The issue will remain open and flagged until the body is corrected.
    Please update the issue with one of the official templates:

    If this was opened by automation, update the automation to preserve the template sections before creating the issue.

  4. github-actions commented on Aug 19, 2026

    @github-actions
    Contributor

    ⏱️ Aging and SLA annotation

    • Age: 0 day(s)
    • SLA state: Within SLA
    • Thresholds: warn at 7 days, breach at 14 days
    • Last updated: 2026-08-19T17:45:30.956Z

    Maintained by project-meta-sync workflow.

  5. self-assigned this
    on Aug 20, 2026
  6. github-actions commented on Aug 20, 2026

    @github-actions
    Contributor

    Milestone Allocation

    
    
  7. added this to the v1.1 milestone on Sep 3, 2026
  8. github-actions commented on Sep 8, 2026

    @github-actions
    Contributor

    ⚠️ Bare Labels Detected

    This issue has labels that are not in the canonical taxonomy:

    • migrate:status:needs-more-info
    • migrate:type:task
    • migrate:area:testing
    • priority:high

    Valid Canonical Labels

    Please use labels with a prefix from the canonical taxonomy:

    • Type: type:bug, type:feature, type:task, type:documentation, etc.
    • Status: status:needs-triage, status:in-progress, status:done, etc.
    • Priority: priority:critical, priority:high, priority:normal, priority:low
    • Area: area:ci, area:docs, area:labels, area:security, etc.
    • Meta: meta:needs-changelog, meta:duplicate, meta:blocked, etc.

    For the complete list, see .github/labels.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Fields

Priority

None yet

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions