Skip to content

feat: Reporting Agent v2 — multi-repo, session cache, pluggable storage - #2489

Open
ashleyshaw with Copilot wants to merge 6 commits into
developfrom
copilot/reporting-agent-v2-integration
Open

feat: Reporting Agent v2 — multi-repo, session cache, pluggable storage#2489
ashleyshaw with Copilot wants to merge 6 commits into
developfrom
copilot/reporting-agent-v2-integration

Conversation

Copilot AI commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Upgrades scripts/agents/reporting.agent.js from v1 to v2.0.0. All v1 exports remain fully backwards-compatible.


name: "Feature PR"
about: "New features or enhancements"
title: "feat: {short summary}"
labels: ["status:needs-review", "area:feature"]

Feature Pull Request

This repository enforces changelog, release, and label automation for all PRs and issues.
See the organisation-wide Automation Governance & Release Strategy for contributor rules.

Linked issues

Changelog

Added

  • Multi-repository reportsgenerateMultiRepoReport() aggregates data across multiple repos; parseRepoRef() normalises "owner/repo" strings or { owner, repo } objects (validates exactly one /); buildRepoCacheKey() produces stable cache keys; runAgent({ action: "generate:multi-repo" }) dispatcher entry.
  • Session cache — in-process TTL cache (cacheGet/cacheSet/cacheClear/cacheSize) for memoising expensive per-repo computations within a single agent run; exposed via runAgent({ action: "cache:*" }).
  • Pluggable storage backendsetStorage/resetStorage/createMemoryStorage replace hard-coded fs calls in saveReport, enabling injection of an in-memory backend in tests.
  • AGENT_VERSION constant ("2.0.0") exported and returned by the default runAgent action.
  • 50 regression tests covering all new and existing behaviour (scripts/agents/__tests__/reporting.agent.test.js).
  • Migration guide at .github/reports/migration/reporting-agent-v2-migration-guide-2026-08-29.md.

Changed

  • saveReport now routes writes through the active storage backend instead of calling fs directly.
  • runAgent default response now includes version alongside categories and message.
  • Removed unused import.meta.url / fileURLToPath import (was blocking Jest transforms).

Fixed

  • runAgent cache:get no longer calls cacheGet twice (double expiry-check side-effect).
  • parseRepoRef now rejects three-segment strings like "owner/org/repo" explicitly.

Removed


Checklist (Global DoD / PR)

  • All AC met and demonstrated
  • Tests added/updated (unit/E2E as appropriate)
  • Accessibility checklist completed (where relevant):
    • Semantic HTML and heading order verified
    • Keyboard navigation and visible focus states verified
    • ARIA used only where needed
    • Contrast and non-colour cues reviewed (WCAG 2.2 AA or higher)
  • Docs/readme/changelog updated (if user-facing)
  • Security checklist completed (where relevant):
    • Untrusted input validated and sanitised
    • Output escaped for its rendering context
    • Privileged actions enforce nonce and capability checks
    • No secrets/sensitive data introduced; OWASP risks reviewed
  • Code/design reviews approved
  • CI green; linked issues closed; release notes prepared (if shipping)

Copilot AI and others added 3 commits August 29, 2026 15:18
Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
…ent.js

Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
…owner/repo format, fix test count in migration guide, add three-segment parseRepoRef test"

Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Reporting Agent to use v2 features and ensure compatibility feat: Reporting Agent v2 — multi-repo, session cache, pluggable storage Aug 29, 2026
Copilot AI requested a review from ashleyshaw August 29, 2026 15:27
@ashleyshaw
ashleyshaw requested a lite review from Copilot August 29, 2026 16:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ashleyshaw
ashleyshaw marked this pull request as ready for review August 29, 2026 16:30
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2489

CI Status:pending
Files changed: 5

Recommendations

  • CI checks not green

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2489

CI Status:pending
Files changed: 5

Recommendations

  • CI checks not green

@ashleyshaw
ashleyshaw enabled auto-merge (squash) August 29, 2026 16:50
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🚫 This PR description is missing required template content.

Missing required section(s): Linked issues, Global DoD checklist

Please update the PR body using one of the repository PR templates:

Empty placeholders, unchecked checklist boxes, and stub issue references do not count.

@ashleyshaw ashleyshaw added this to the v1.1 milestone Aug 30, 2026
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #2489

CI Status:pending
Files changed: 5

Recommendations

  • CI checks not green

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Branch Naming Issue

This PR's branch name copilot/reporting-agent-v2-integration doesn't follow the standard pattern.

Standard pattern: {type}/{scope}-{title} (e.g., feat/something, fix/bug-name)

Based on linked issue type: task

Correct template should be: pr_feature.md

No action required — this is informational. Future PRs should use the correct branch name.

See Branching Strategy for more info.

@claude claude Bot added area:ci Build and CI pipelines area:documentation Docs & guides area:scripts Scripts & tooling area:tests Test suites & harnesses lang:js JavaScript/TypeScript lang:json JSON config/content lang:md Markdown content/docs labels Sep 2, 2026
@claude claude Bot added the type:bug Bug or defect label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Build and CI pipelines area:documentation Docs & guides area:scripts Scripts & tooling area:tests Test suites & harnesses lang:js JavaScript/TypeScript lang:json JSON config/content lang:md Markdown content/docs type:bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reporting Agent v2 Phase 4.1: Reporting Agent v2 Integration

3 participants