Repository navigation
Conversation
…er fixed finding A scheduled workflow reads the pull requests closed in the month in each NCodeGroup public repository with the caller workflow, aggregates their outcomes markers and review costs, and opens or updates the issue 'Review report YYYY-MM' with the change from the previous month's report.
There was a problem hiding this comment.
🤖 NCode Review at 4dacc6c: 9 new findings on the changed lines.
Not on a changed line:
- 🟠 F10 Should fix: The 'Couldn't list closed pull requests' path has no test
test/report.test.ts:559. runReport catches a failure from listClosedPulls and records a note, then continues with the other repositories (report.ts:557-563). The only failure test injects a 502 on a comments page, which goes through readPull's error path instead. A failing pulls listing is never triggered. Fix: Add a test where one repository's /pulls endpoint returns 500 and another repository is healthy; assert the report contains the healthy repository's pulls and a Notes line naming the failed one. - 🟡 F11 Nit: Duplicate report issues by the workflow for the same month are not tested
test/report.test.ts:514. findReports keeps the oldest of two workflow-authored issues with the same title (report.ts:514). The squatting test only covers duplicates by a different author, so the 'older one is kept' rule is untested. Fix: Add two issues with the same title by github-actions[bot] and assert the older one is updated.
🤖 Review completeVerdict: 💬 Comment — This PR adds 8 reviewers run — 9 findings (run details)
Skipped: api-compat, data-model, infrastructure, intent, performance Findings
Trial: findings are posted as review threads and in the check run. $0.77 on Amazon Bedrock, 104s, at fe612c9. (how to interact) |
# Conflicts: # CHANGELOG.md
…e, and test its paging, caps and failure paths
|
Autopilot: answering #83 (review) and #83 (comment). The findings on changed lines (F1 to F9) are answered in their threads.
|
|
/review |
There was a problem hiding this comment.
🤖 NCode Review at fe612c9: 6 new findings on the changed lines.
3 more were already posted on this pull request.
|
Autopilot: Round 2 answered. No blocker or should-fix is left open. F1 repeats a round-1 finding that was declined because |
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md # README.md
Stacked on #81; GitHub retargets this to main when #81 merges.
Adds
.github/workflows/monthly-report.yml(1st of the month at 06:00 UTC, plusworkflow_dispatchwith optionalmonthandrepositoriesinputs;issues: write,contents: read,GITHUB_TOKENonly; actions pinned by SHA) andtools/report.ts. The script lists the pull requests closed in the month, reads the outcomes marker and the summary comments' review markers from the bot's comments only, and opens or updates the issue "Review report YYYY-MM". The issue shows precision per reviewer and per repository (fixed ÷ (fixed + dismissed), with acknowledged and ignored shown apart), findings per PR, cost split by provider, cost per fixed finding, and the month-over-month change from the previous report's hidden<!-- ncode-review:report {...} -->marker. It uses an injectable fetch, and hermetic tests intest/report.test.tscover the month window, aggregation, the issue body, forged markers and issues, and idempotent re-runs. README and CHANGELOG are updated.Decisions
GITHUB_TOKENcan't list the app's installations, so the script scans the owner's public, non-fork repositories (GET /orgs/NCodeGroup/repos) and keeps the ones with.github/workflows/code-review.yml. Therepositoriesinput replaces the scan with an explicit list. A repository whose check fails for any reason other than a 404 is left out and named under "Notes".review-reportlabel (GitHub creates it on first use). The script only trusts issues opened bygithub-actions[bot]with the exact title, so a squatted or forged issue is ignored. A re-run patches that month's issue, and only when its body changed.$X.XX on …line. A collapsed pre-marker summary is counted as a review with unknown cost.(unattributed).monthinput accepts the current month (for the acceptance run) but rejects a month that hasn't started.Testing
npm run typecheck; npm test: 213 tests, all pass (after merging the updatedissue-47).REPORT_DRY_RUN=1,REPORT_MONTH=2026-10): it found 12 repositories and 59 reviewed PRs, with $16.71 of cost taken from the visible cost lines. No PR has outcomes yet because Record each finding's outcome when a pull request closes #81 isn't deployed.Remaining
Closes #48