Add activity_report operation to agentic maintenance workflow#27212
Add activity_report operation to agentic maintenance workflow#27212
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/267bf5c1-a299-43c5-be20-17cdb0ab2a0c Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/267bf5c1-a299-43c5-be20-17cdb0ab2a0c Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@ . The name of the command should use dashes. Second, the title should be [aw] agentic status report. @copilot |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/37d80ed2-4179-4462-ac6e-bbe23dc36ad5 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
🧪 Test Quality Sentinel ReportTest Quality Score: 87/100✅ Excellent test quality
Test Classification DetailsView All 7 Test Classifications
Build Tags
Mocking Assessment (JavaScript)The JavaScript test mocks Test Inflation
Language SupportTests analyzed:
Verdict
📖 Understanding Test ClassificationsDesign Tests (High Value) verify what the system does:
Implementation Tests (Low Value) verify how the system does it:
Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators. References: §24637081325
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 87/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 7 tests verify behavioral contracts, with solid error/edge case coverage in the JavaScript tests (rate-limit handling, false-case detection).
|
Warning The 🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (135 new lines in AI has analyzed the PR diff and generated a draft ADR to help you get started: 📄 Draft ADR: The draft captures the key decision identified in the diff: implementing What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
References: §24637081313
|
There was a problem hiding this comment.
Pull request overview
Adds a new activity_report maintenance operation to the agentic maintenance workflows to generate markdown activity summaries (24h/7d/30d) and open a labeled GitHub issue with the report, including rate-limit-aware behavior.
Changes:
- Introduces
run_activity_report.cjsplus Vitest coverage to generate logs-based markdown reports and create a[AW activity report]issue. - Wires
activity_reportinto main + side-repo workflow generators, updates job/operation conditions, and regenerates.github/workflows/agentics-maintenance.yml. - Updates Go workflow tests/integration tests to assert the new operation/job is present and correctly conditioned.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/side_repo_maintenance_integration_test.go | Asserts side-repo generated workflow includes the new activity_report job. |
| pkg/workflow/side_repo_maintenance.go | Adds activity_report to side-repo maintenance workflow inputs and generates a dedicated job. |
| pkg/workflow/maintenance_workflow_yaml.go | Adds activity_report operation choice and generates a dedicated job in the main maintenance workflow generator. |
| pkg/workflow/maintenance_workflow_test.go | Extends generator tests to cover activity_report job conditions and operation option wiring. |
| actions/setup/js/run_activity_report.test.cjs | Adds tests covering successful report generation and rate-limit skipping behavior. |
| actions/setup/js/run_activity_report.cjs | New implementation that runs gh aw logs across time ranges and opens an issue with the resulting markdown. |
| .github/workflows/agentics-maintenance.yml | Regenerated workflow including activity_report operation + job. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/7 changed files
- Comments generated: 3
| permissions: | ||
| actions: read | ||
| issues: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: ` + getActionPin("actions/checkout") + ` | ||
| with: | ||
| persist-credentials: false |
There was a problem hiding this comment.
The generated activity_report job includes an actions/checkout step (and later runs build/install steps), but its permissions block lacks contents: read. With explicit job permissions, this will disable contents access and can break checkout on private repos. Add contents: read to the job permissions (consistent with the existing create_labels / validate_workflows jobs).
| permissions: | ||
| actions: read | ||
| issues: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: ` + getActionPin("actions/checkout") + ` | ||
| with: | ||
| persist-credentials: false |
There was a problem hiding this comment.
The side-repo activity_report job checks out the repository but its job-level permissions: does not include contents: read. Because setting permissions makes all other scopes none, checkout can fail on private repos. Add contents: read here (mirroring the create_labels job’s permissions in this same file).
| if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'activity-report' && (!(github.event.repository.fork)) }} | ||
| runs-on: ubuntu-slim | ||
| permissions: | ||
| actions: read |
There was a problem hiding this comment.
The activity_report job checks out the repo and builds/runs tooling, but its job-level permissions: omits contents: read. When permissions is set, unspecified scopes default to none, which can cause actions/checkout (and any git operations) to fail on private repos. Add contents: read (matching e.g. the create_labels job) to this job’s permissions.
| actions: read | |
| actions: read | |
| contents: read |
|
@copilot use underscores to match the others, be consistent with naming conventions |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f36a3c23-cf51-4452-8735-342ff7556fa0 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/14261d82-e94d-44ea-a9cb-7ce48cf40810 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot at least 1000 reports |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/907ed0e7-a686-4cc8-b8b5-9985215319bf Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in commit
Updated in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Hey This one looks ready for maintainer review. 🚀
|
|
@copilot increase timeout to 2 hours for the job |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/3ee21205-4c7f-42f8-bae5-186916afc5a1 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot setup the cache so that the last cache wins with resolution s |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/3ee21205-4c7f-42f8-bae5-186916afc5a1 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/3ee21205-4c7f-42f8-bae5-186916afc5a1 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in commits Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/63d7139a-2204-468c-97f5-35631eb4bf35 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot use runid in actions/cache key to always update the cache. Update the go code that generates the .yml and recompile. |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/63d7139a-2204-468c-97f5-35631eb4bf35 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/12531c2f-2b64-4d48-a924-0808d53f98c2 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot remove 30d part of the report . |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/398968c8-4b25-42c6-a1f1-6c382a43f2f3 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Summary
activity_reportmaintenance operation for agentic maintenance workflowsgh aw logs --format markdownfor-1d,-1w, and-1mo--count 1000so reports are not limited by the default 10-run query size[aw] agentic status reportlabeledagentic-workflowswith copy-ready markdown sections<details>/<summary>for progressive disclosure###) and belowactions/cacheat./.cache/gh-aw/activity-report-logs${{ github.run_id }}so each run writes a fresh cache while restore keys select the latest matching cacheGH_AW_ACTIVITY_REPORT_OUTPUT_DIRinto activity report execution so cached logs are reusedactivity_reportjob permissions includecontents: readalongside explicit scoped permissionsactivity_reportjob timeout to 2 hours (timeout-minutes: 120) in both main and side-repo maintenance workflows.github/workflows/agentics-maintenance.ymlValidation
make fmtmake fmt-cjsnpm run test -- run_activity_report.test.cjs run_operation_update_upgrade.test.cjs(inactions/setup/js)go test -v -run "TestGenerateMaintenanceWorkflow" ./pkg/workflow/go test -v -run "TestGenerateMaintenanceWorkflow_OperationJobConditions|TestSideRepoMaintenanceWorkflowGenerated_EndToEnd" ./pkg/workflow/go test -tags=integration -v -run "TestSideRepoMaintenanceWorkflowGenerated_EndToEnd" ./pkg/workflow/make lintmake lint-cjsmake test-unitmake agent-finish(fails in this sandbox on pre-existing external-network-dependent test:frontmatter_hash_github_api.test.cjswithBlocked by DNS monitoring proxy)parallel_validation: