Repository navigation
Raise email report repo cap from 50 to 100 #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
80ede97
Raise email report repo cap from 50 to 100
kgrizz-git 62b3448
Record email-report template drift follow-up
kgrizz-git 5c163c1
Add API call tracking plan
kgrizz-git 2cd650f
Address Greptile feedback on API call tracking plan
kgrizz-git f2e4883
Add template drift fix plan
kgrizz-git 24c7482
Fix Sourcery findings: per-repo artifact errors, exact cap assertion
kgrizz-git 6b1950d
Address CodeRabbit findings on API call tracking plan
kgrizz-git e0820d1
Address CodeRabbit finding on template drift plan
kgrizz-git f95c2fb
Render artifact per-repo scan errors in email and PDF
kgrizz-git 7b2eb8c
Address CodeRabbit review comments on API call tracking plan
kgrizz-git 47c545d
Address step-5-preview review: error rows first, changelog, stronger …
kgrizz-git 1a1b18b
Clarify legacy carve-out and scope labels in API tracking plan
kgrizz-git 9e5bc7c
Fix 3 new SonarCloud issues in email_report_html.py
kgrizz-git 13c200a
Add missing docstrings to touched renderers
kgrizz-git 5013151
Require pre-init baseline for GUI legacy path in plan
kgrizz-git File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
136 changes: 136 additions & 0 deletions
136
docs/superpowers/plans/2026-11-09-template-drift-pip-nosonar.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| > **Status:** IN PROGRESS | ||
|
|
||
| > Line numbers cited below are accurate as of 2026-11-09; relocate by anchor (comment text / step name) if they drift. | ||
| > | ||
| > **Terminology:** user-facing name is **local full report** (CLI/TUI). Code modules still use `legacy_*` until the rename tracked in `TO_DO.md`. | ||
| > | ||
| > **Implementation log:** (none yet) | ||
|
|
||
| # Port Manual pip-install Comment + NOSONAR into email-report Template | ||
|
|
||
| ## Problem | ||
|
|
||
| The committed workflow `.github/workflows/email-report.yml:72-75` carries a | ||
| hand-added 3-line explanatory comment plus a `# NOSONAR` suppression on the | ||
| `pip install -e .` step: | ||
|
|
||
| ```yaml | ||
| # Editable install of this repo's own package. pip does not read uv.lock; | ||
| # the core package currently declares no runtime dependencies, so nothing | ||
| # else is resolved here. | ||
| - run: pip install -e . # NOSONAR | ||
| ``` | ||
|
|
||
| The generator template `.github/workflows/email-report.yml.template:72` emits | ||
| only the bare step: | ||
|
|
||
| ```yaml | ||
| - run: pip install -e . | ||
| ``` | ||
|
|
||
| `render_workflow()` (`setup_workflow.py:109-147`) passes static template text | ||
| through unchanged, so the next setup regeneration (option 5 / wizard / | ||
| `write_workflow`) silently drops both the comment and the suppression. The | ||
| suppression loss is the real risk: it currently silences | ||
| `githubactions:S8541`/`S8544` (unpinned package versions / dependencies — | ||
| see `CHANGELOG.md` and commit `d7f143f5`), which would fire again on the next | ||
| regenerated workflow. | ||
|
|
||
| One correction before porting: the comment's last line ("nothing else is | ||
| resolved here") overclaims. `pyproject.toml:2` (`[build-system] requires`) | ||
| pins only `setuptools>=77.0.3` — a range, not a pin — and pip resolves that | ||
| build backend in an isolated env, not from `uv.lock`. The suppression remains | ||
| appropriate (the only unpinned resolution is the setuptools build backend for | ||
| this repo's own package install in CI; no third-party runtime code is installed | ||
| unpinned — `dependencies` is empty), but the comment must say so honestly. The | ||
| corrected wording below replaces the third line; it goes into the template | ||
| **and** the committed workflow identically so parity holds. | ||
|
|
||
| Tracked in `TO_DO.md` (Code Health): remove that item when this plan is | ||
| complete (per repo rule, completed items are removed, not checked off). | ||
|
|
||
| ## Scope | ||
|
|
||
| - Single edit to `email-report.yml.template`: expand the single line 72 into | ||
| the 4-line block below (corrected third line — see Problem). Apply the | ||
| identical block to the committed `email-report.yml:72-75` so the two files | ||
| stay byte-identical outside the generator placeholders: | ||
|
|
||
| ```yaml | ||
| # Editable install of this repo's own package. It declares no runtime | ||
| # dependencies, but pip still resolves the setuptools>=77.0.3 build | ||
| # backend in an isolated env (not from uv.lock). | ||
| - run: pip install -e . # NOSONAR | ||
| ``` | ||
|
|
||
| Bare `# NOSONAR` is the repo standard; parameterized forms like | ||
| `# NOSONAR(rule)` are invalid and rejected by `python:S7632` (commit | ||
| `d7f143f5`). The suppression guards the *regenerated workflow output*, | ||
| not the template file itself. | ||
| - No change to `render_workflow()` — static text passes through; no new | ||
| placeholder needed. | ||
| - No change to the committed `email-report.yml` — it already has the block. | ||
| - Verify there is no *other* committed-vs-template drift while here (last | ||
| verified 2026-11-09: the pip-install block was the only delta). | ||
|
|
||
| ## Out of scope | ||
|
|
||
| - Changing install behavior or the suppression itself. | ||
| - Other workflow/template drift (none known). | ||
| - The API-call-tracking plan and the `--max-repos` cap raise (same branch, | ||
| separate commits). | ||
|
|
||
| ## Done criteria | ||
|
|
||
| - Template and committed workflow contain the corrected comment block and the | ||
| `# NOSONAR` suffix verbatim (identical in both files). | ||
| - `render_workflow()` output from an in-memory test config matching the | ||
| committed workflow's parameters (`include_consumers=True`, | ||
| `include_artifact_storage=True`, `email_format="html"`, `max_repos=100`, | ||
| `warn_over=["25", "80%"]`) equals the committed `email-report.yml` | ||
| byte-for-byte (zero drift across all static template lines). Do NOT verify | ||
| against the local gitignored `.github-usage/config.toml`: it varies per | ||
| machine, so a local-config parity check passes only by coincidence. | ||
| - New/updated tests pin the block in both files (see Test plan). | ||
| - `scripts/check` and `scripts/docs-check` pass. | ||
| - SonarCloud PR check stays green, confirming the regenerated workflow keeps | ||
| its `S8541`/`S8544` suppression. If Sonar flags anything new, stop and | ||
| reassess rather than forcing it through. | ||
| - No `CHANGELOG.md` entry: template-only change, not user-visible behavior | ||
| (per `AGENTS.md` done criteria, docs/changelog updates are for user-visible | ||
| changes). | ||
| - Remove the `TO_DO.md` item and move this plan to | ||
| `docs/superpowers/plans/archived/` in the same change set, before | ||
| commit/merge (per `AGENTS.md` documentation lifecycle), with the status | ||
| banner set to the canonical `> **Status:** COMPLETE` form. | ||
|
|
||
| ## Test plan | ||
|
|
||
| - `tests/test_setup_workflow.py`: extend with an assertion that | ||
| `render_workflow()` output contains the comment text and the | ||
| `pip install -e . # NOSONAR` line (guards the template, the generator's | ||
| only input for this block). | ||
| - `tests/test_workflow_templates.py`: assert the committed workflow and the | ||
| template agree on the pip-install block (same corrected comment + same | ||
| `# NOSONAR`), guarding drift in both directions. | ||
| - Parity check as a test (not a manual local-config diff): render from an | ||
| in-memory config matching the committed workflow's parameters | ||
| (`include_consumers=True`, `include_artifact_storage=True`, | ||
| `email_format="html"`, `max_repos=100`, `warn_over=["25", "80%"]`) and | ||
| assert byte-equality with the committed `email-report.yml`, so the check is | ||
| machine-independent (the local gitignored `config.toml` varies per | ||
| workstation and must not be the reference). | ||
| - Keep assertions to `assertIn` on the distinctive strings (comment first | ||
| line, `# NOSONAR` on the pip-install line) rather than full-file compares, | ||
| so unrelated profile-arg changes do not break them. | ||
|
|
||
| ## Task breakdown | ||
|
|
||
| - [ ] Port the comment + `# NOSONAR` into `email-report.yml.template`. | ||
| - [ ] Add the `test_setup_workflow.py` render assertion and the | ||
| `test_workflow_templates.py` parity assertion. | ||
| - [ ] Verify static parity via the updated unit tests (in-memory config | ||
| matching the committed workflow's parameters, not the local gitignored | ||
| config); run `scripts/check` and `scripts/docs-check`. | ||
| - [ ] Confirm SonarCloud check green on the PR; remove the `TO_DO.md` item; | ||
| archive this plan. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.