Repository navigation
Add a Linked JSON Output to the Backlog Report and Pin Every Inline Script Dependency Exactly - #4157
Conversation
…cript Dependency Exactly backlog_metrics.py takes --format json in place of --format html. The document carries the report's figures, each counted repository, issue, pull request, and workflow run beside its html_url, and the headline totals at its top level. The Markdown output links each repository and each issue and pull request count. scripts/README.md documents the JSON shape and a test pins it. The script also takes the interrupt rule. Every PEP 723 inline dependency is pinned to the version its open bound resolves today, with mdurl beside each markdown-it-py pin, and tests/requirements.txt pins the same. PinTests now scans every tracked script and holds each pin exact and equal everywhere it is stated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Correct the Notes Description Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and Compute the Totals Once Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Active issues remain because the open-issues link is unbounded by the report end date, making archived reports inconsistent with the counted open_now value and requiring corresponding documentation and test updates.
2 open issues
What changed in this PR
This PR adds linked JSON output for backlog_metrics.py, improves Markdown report links, removes the HTML format, and pins all inline script dependencies exactly.
Changes:
- Adds JSON serialization with repository, issue, pull request, and workflow URLs.
- Adds Markdown links and signal-aware child-process handling.
- Pins inline dependencies and expands tests for output, interruption, and dependency consistency.
| File | Description |
|---|---|
| tests/test_backlog_metrics.py | Adds tests for JSON output, report links, format removal, signal interruption, and repository-wide dependency pins. |
| tests/requirements.txt | Pins test dependencies and required transitive packages to exact versions. |
| spec/workflow_reuse.py | Pins Markdown and YAML dependencies. |
| spec/validate.py | Pins Markdown dependencies. |
| spec/fidelity_honesty.py | Pins Markdown and YAML dependencies. |
| spec/audit.py | Pins Markdown and YAML dependencies. |
| scripts/README.md | Documents JSON output, linked Markdown metrics, and exact dependency pinning. |
| scripts/pr_review.py | Pins Markdown dependencies. |
| scripts/pr_review_copilot.py | Pins Markdown dependencies. |
| scripts/pr_cleanup.py | Pins Markdown dependencies. |
| scripts/central_config.py | Pins EditorConfig and YAML dependencies. |
| scripts/carry.py | Pins Markdown dependencies. |
| scripts/canonical_review.py | Pins Markdown dependencies. |
| scripts/build_dist.py | Pins Markdown and YAML dependencies. |
| scripts/backlog_metrics.py | Adds JSON output, linked Markdown metrics, exact dependency metadata, and signal handling. |
| scripts/agent_policy.py | Pins EditorConfig, YAML, and TOML dependencies. |
| .github/actions/prose-gate/prose_lint.py | Pins Markdown, URL, and Pygments dependencies. |
Review effort: Lite
…ort's Signal Test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4157 +/- ##
===========================================
- Coverage 81.60% 76.75% -4.86%
===========================================
Files 26 41 +15
Lines 9070 14279 +5209
===========================================
+ Hits 7402 10960 +3558
- Misses 1668 3319 +1651
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… Document the Policy History's Markers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…han in the Trigger Text Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ored SIGINT Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
|
@coderabbitai review |
|
/review |
Action not completed
|
… Rules (#4189) ## Summary Promotes the backlog-burndown rounds and changes from other hub sessions from `develop` to `main`. - Hooks and the prose gate: #4132, #4134, #4136, #4145, #4152, #4184. The Husky hook reads its path list once and diffs a merge against `MERGE_HEAD`. Interrupts re-raise their signal, a Markdown code span reads as quoted data, and the gate picks a commit's diff base and recognizes a conflicted promotion's branch cut from `main`. - Procedures and carried rules: #4133, #4139, #4141, #4149, #4166, #4177, #4179, #4183, #4185. Resync, audit and check-this-repo procedure gaps, code style and shell interrupt rules, review-loop gaps across four skills, the context and delegation section of `AGENTS.md`, question rules in governance, the promotion line in pull request bodies, closing-keyword behavior on promotion, and the history-rewrite premise. - Review and cleanup tooling: #4138, #4148, #4154, #4156, #4157, #4163, #4164, #4168, #4174, #4180. Cleanliness reads, parked handoffs, the backlog report's JSON output, exact inline script pins, trusted inputs, env-file includes, the bounded review wait, side-reviewer matching, and a Copilot billing-failure notice read as a refusal. - Workflow and runbook contract: #4153, #4155, #4169, #4171, #4178, #4182. The runtime-secrets check, a registry entry and spec references, the Copilot runbook pointers, credential-free checkout steps, and the deploy-key and runner wording. - From other hub sessions: #4159 (a repository's own .NET line under a fleet default), #4161 (the 1Password CLI as an optional host tool), #4162 (Codex's Windows installer and one managed opencode copy). These carry no promotion line. #4182 carries no promotion line by design, and #4175 holds the split-out part of #4057's scope. Both #1448 and #4175 stay open. Fixes #1071 Fixes #1154 Fixes #1391 Fixes #1471 Fixes #1594 Fixes #1620 Fixes #1627 Fixes #1650 Fixes #1801 Fixes #2853 Fixes #3620 Fixes #3668 Fixes #3697 Fixes #3766 Fixes #3787 Fixes #3837 Fixes #3840 Fixes #3842 Fixes #3844 Fixes #3865 Fixes #3882 Fixes #3890 Fixes #3894 Fixes #3912 Fixes #3916 Fixes #3954 Fixes #4014 Fixes #4015 Fixes #4016 Fixes #4043 Fixes #4050 Fixes #4057 Fixes #4058 Fixes #4062 Fixes #4084 Fixes #4097 Fixes #4098 Fixes #4099 Fixes #4104 Fixes #4108 Fixes #4114 Fixes #4115 Fixes #4117 Fixes #4118 Fixes #4119 Fixes #4121 Fixes #4122 Fixes #4123 Fixes #4131 Fixes #4135 Fixes #4140 Fixes #4142 Fixes #4143 Fixes #4144 Fixes #4151 🤖 Generated with [Claude Code](https://claude.com/claude-code)


Summary
scripts/backlog_metrics.pygains--format jsonand drops--format html, per the maintainer's 2026-11-13 comment on the issue. The JSON document carries the same figures as the Markdown report. Each counted repository, issue, pull request, and workflow run carries itshtml_url, and the headline totals sit in a top-leveltotalsobject.scripts/README.mddocuments the shape, andtests/test_backlog_metrics.pypins it.gh run listrather than from a search.backlog_metrics.pytakesCODESTYLE.md"Interrupts" with this edit. On SIGINT or SIGTERM it stops theghcall in flight, prints one line, and ends by the signal. It passes over a later signal, as the prose gate does, so the SIGTERMuv runforwards after a Ctrl-C cannot cut the unwind short. A test signals it mid-call and checks that theghchild is gone.agent_policy.py,central_config.py, and ten more scripts underscripts/andspec/. Each markdown-it-py pin bringsmdurl==0.1.2with it, the one package markdown-it-py requires.tests/requirements.txtpins the same versions. The versions are the ones the open bounds resolve today, so no script's behavior changes.PinTestsnow finds every tracked script's inline block rather than naming two files. It checks that each dependency, and eachtests/requirements.txtline, is an exact pin, and that a package takes one version everywhere. It also checks that each package a pinned one requires is pinned beside it.Downstream
ptr727/HomeAutomation-Config#1800's
scripts/fleet-report.shruns--format html, which this change refuses with exit2. That repository switches to--format jsonwhen it renders its own report, per the design that issue records. This pull request writes nothing there.Local review
.github/actions/prose-gate/prose_lint.py, which lives beside its composite action so a reusable workflow reaches it at the pinned hub commit withoutscripts/. So it cannot import a module fromscripts/. Withinscripts/,backlog_metrics.pyholds the only copy, andscripts/docker_lint.pyuses a different, SIGTERM-to-exit handler. A primitive for the nextscripts/caller is that change's to add.items.issues_open.policy_from_defaultbeside a barepolicy_trigger. The Markdown totals, review tables, and billing lines are now printed from the figures the JSON carries. The JSON test pins every field name. The signal test reusestests/test_pre_commit_hook.py's harness. The README documents thepolicy_changesmarkers.GOVERNANCE.md"Trust Boundaries and Hardening Effort": the signal test's skip covering its SIGTERM subtest too, where the suite inherits an ignored SIGINT. That is a suite started in the background from a non-interactive shell, which neither CI nor the documented run command does, and the skip prints. The same class intests/test_prose_lint.py's signal test is pre-existing, outside this change's files, and declined for the same reason: it fails loudly rather than silently, and only in that launch.Verification
uv run --no-project --with-requirements tests/requirements.txt python -m unittest discover -s testsruff format --check,ruff check, andmypyover the tree, and the prose gate over the branch diff.PinTestsfails when one script reverts to>=4, one pins another markdown-it-py version, or one dropsmdurl. The interrupt test fails when the SIGTERM handler is removed.Closes on promotion: #4151, #4043
🤖 Generated with Claude Code