Skip to content

[PHASE 1] Move Tests Out of .jest-skip/ and Add Missing Coverage #602

Open
1 of 2 issues completed
Open

Description

@ashleyshaw

Problem

Tests disabled in .jest-skip/ directory; critical gaps in coverage; error branches untested.

Acceptance Criteria

  • Test files moved from .jest-skip/ to scripts/agents/__tests__/
  • All tests pass in CI (npm test)
  • Test coverage ≥ 80% for both agents
  • All error branches tested (missing token, API failure, etc.)
  • Blocker detection tested thoroughly
  • .jest-skip/ directory removed (once tests moved)

Implementation Plan

Move & Structure

  1. Move .jest-skip/planner.agent.test.js → scripts/agents/__tests__/planner.agent.test.js
  2. Move .jest-skip/reviewer.agent.test.js → scripts/agents/__tests__/reviewer.agent.test.js

Planner Tests

Add tests for:

Reviewer Tests

Add tests for:

  • Missing GITHUB_TOKEN → should fail with clear error
  • CI failure state (state !== "success") → should flag as blocker
  • No changed files → should handle gracefully
  • Changelog detection edge cases:
    • Case-insensitive (CHANGELOG.md, changelog.md, Changelog.MD)
    • Multiple names (CHANGELOG.md, HISTORY.md, NEWS.md)
    • In root and /docs directory
  • Blocker detection:
    • Both CI + changelog blockers
    • No blockers (ready to proceed)
  • Dry-run mode → should not post comment
  • Comment posting success → verify octokit called
  • Comment posting failure → should fail gracefully

Test Execution Plan

# Run all tests
npm test

# Run with coverage
npm test -- --coverage scripts/agents

# Check coverage report
# Should show ≥ 80% for:
# - scripts/agents/planner.agent.js
# - scripts/agents/reviewer.agent.js

Effort Estimate

Medium (2-3 hours)

Priority

🔴 CRITICAL - Blocks CI validation

Dependencies

Blocks

  • Enables all Phase 2 issues

Related Issues

  • Blocked by: Issue 1.1, 1.2, 1.3
  • Reference: ai/improvement-plan-planner-reviewer.md (Issue 1.4)
  • Test patterns: instructions/quality-assurance.instructions.md

References

  • .jest-skip/planner.agent.test.js
  • .jest-skip/reviewer.agent.test.js
  • tests/test-helpers.js (verify mock functions exist)
  • ai/audit-planner-reviewer-agents.md (Section 4)

Definition of Ready (DoR)

  • Clear problem statement and expected outcome
  • Acceptance criteria defined
  • Related issues/dependencies identified
  • Required resources/approvals listed

Definition of Done (DoD)

  • All acceptance criteria met
  • Changes tested and validated
  • Documentation updated
  • Changes merged and deployed
  • Stakeholders notified

Activity

  1. linear-code commented on May 31, 2026

    @linear-code
  2. ashleyshaw commented on May 31, 2026

    @ashleyshaw
    MemberAuthor

    Related Work: PR #694 includes updates to planner and reviewer agent files as part of project archival status updates. Test coverage improvements from this issue will apply to the updated agent implementations once merged.


    Generated by Claude Code

  3. added a commit that references this issue on Jun 1, 2026
  4. added this to the milestone on Jun 1, 2026
  5. ashleyshaw commented on Jun 1, 2026

    @ashleyshaw
    MemberAuthor

    Completed in this pass after child and dependency chain execution (#746, #599, #600, #601).

    What was completed:

    • Re-activated planner/reviewer tests from skipped state into active suites:
      • scripts/agents/__tests__/planner.agent.test.js
      • scripts/agents/__tests__/reviewer.agent.test.js
    • Added module consistency verification:
      • scripts/agents/__tests__/module-system-consistency.test.js
    • Removed superseded skipped test files:
      • .jest-skip/planner.agent.test.js
      • .jest-skip/reviewer.agent.test.js
    • Added reviewer workflow dry-run controls (workflow_dispatch + workflow_call input + DRY_RUN env).

    Validation evidence:

    • Focused suite results: 20/20 tests passed.
    • Focused coverage:
      • planner.agent.js: 82.20% statements
      • reviewer.agent.js: 91.34% statements
    • Full readiness gates: validate:frontmatter, validate:workflows, validate:agents, validate:skill-manifests, validate:plugins, and npm test all passing.

    Parent issue acceptance criteria for this phase are satisfied; closing.

  6. github-actions commented on Jun 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.

  7. 2 remaining items

  8. added this to the v1.4 milestone on Jul 22, 2026
  9. self-assigned this
    on Sep 8, 2026
  10. 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:priority:normal
    • migrate:type:test
    • migrate:type:audit

    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

Fields

Priority

None yet

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions