Skip to content

chore: complete pending CodeRabbit improvements for agent hooks (#1126 Phase 2) #1129

Description

@ashleyshaw

Overview

This issue tracks Phase 2 of CodeRabbit improvements from #1126. These enhancements require the implementation of 4 new hooks and 1 cookbook guide created during the agent standardization initiative.

Blocking Dependencies

These improvements cannot be applied until the following files are created:

  • hooks/agent-security-auditor with tests
  • hooks/agent-spec-validator with tests
  • hooks/multi-provider-consistency-checker with tests
  • hooks/plugin-integrity-checker with tests
  • cookbook/playwright-agent-creation-guide.md

See: Issue #1079 (Agent Standardization Initiative)

Pending Improvements (8 items)

Test Fixture Cleanup (3 hooks)

Add afterEach() cleanup blocks to:

  • hooks/agent-security-auditor/__tests__/agent-security-auditor.test.js
  • hooks/agent-spec-validator/__tests__/agent-spec-validator.test.js
  • hooks/multi-provider-consistency-checker/__tests__/multi-provider-consistency-checker.test.js

Impact: Medium — Ensures test isolation and prevents state leakage

JSDoc Documentation (5 helpers)

Add JSDoc comments to helper functions:

  • hooks/agent-security-auditor/__tests__/agent-security-auditor.test.js — tmpDir()
  • hooks/agent-security-auditor/index.js — getAllFiles(), lineOf()
  • hooks/agent-spec-validator/__tests__/agent-spec-validator.test.js — tmpAgent()
  • hooks/multi-provider-consistency-checker/__tests__/multi-provider-consistency-checker.test.js — tmpAgent()
  • hooks/multi-provider-consistency-checker/index.js — readProviders()

Impact: Low — Improves code maintainability and IDE support

Enhance hooks/package.json

Add npm scripts and Jest devDependency:

{
  "scripts": {
    "test": "jest",
    "lint": "eslint index.js __tests__",
    "validate": "node scripts/validate-hook-config.js"
  },
  "devDependencies": {
    "jest": "^29.0.0"
  }
}

Impact: Medium — Enables standalone hook testing and validation

Expand Test Coverage

Add test cases for edge cases:

  • agent-spec-validator: Empty/non-array capabilities validation
  • multi-provider-consistency-checker: Unsupported provider rejection
  • plugin-integrity-checker: Invalid JSON, unsafe refs, non-string refs, missing README

Impact: High — Increases robustness and prevents regressions

Fix Cookbook Schema Link (1 file)

File: cookbook/playwright-agent-creation-guide.md (line 55-57)
Change: Update relative path to absolute

From: `schema/multi-provider-agent.schema.json`
To: `.github/schema/multi-provider-agent.schema.json`

Impact: Low — Ensures cookbook links work from any location

Document Plugin Integrity Hook (1 file)

File: hooks/plugin-integrity-checker/README.md
Add sections:

  • Hook invocation instructions
  • Target path inputs
  • Validation result fields
  • Exit-code behavior
  • Error handling examples

Impact: Low — Improves discoverability and usage

Isolate Plugin Integrity Unit Tests (1 file)

File: hooks/plugin-integrity-checker/__tests__/plugin-integrity-checker.test.js
Action: Move "validates the real lightspeed-playwright-testing plugin" test to integration suite
Reason: Keep unit tests hermetic (no external file dependencies)

Impact: Medium — Ensures tests are reliable and fast

Timeline

Related Issues

Definition of Ready (DoR)

  • All blocking hook files created and merged
  • All blocking cookbook files created and merged
  • Estimated effort and complexity assessed
  • Acceptance criteria defined per improvement

Definition of Done (DoD)

Labels

code-quality, testing, documentation, coderabbit-review

Activity

  1. added this to the v1.0 milestone on Jul 22, 2026
  2. linear-code commented on Jul 22, 2026

    @linear-code
  3. github-actions commented on Jul 22, 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-07-22T17:27:35.088Z

    Maintained by project-meta-sync workflow.

  4. modified the milestones: v1.0, v1.1 on Aug 29, 2026
  5. 7 remaining items

  6. 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:documentation
    • migrate:type:test
    • migrate:type:improve

    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.

  7. eleshar commented on Sep 23, 2026

    @eleshar
    Contributor

    Closing as stale: no linked open PR and no activity since 2026-07-22, and it belongs to a plan that predates the current agents and skills consolidation (#3464). Reopen if it is still needed.

  8. eleshar commented on Sep 23, 2026

    @eleshar
    Contributor

    Reopening: this is planned work that has not started, not work that is superseded. It should not have been closed in the #3464 sweep. Sorry for the noise.

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