Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 6.68 KB

TO_DO.md

File metadata and controls

52 lines (36 loc) · 6.68 KB

To Do

Note: Remove items from this list once they are completed — do not leave completed items marked [x]. The CHANGELOG.md and the archived plans under docs/superpowers/plans/archived/ are the historical record.

Security & Content Checks (top priority)

  • Broaden generated-content guardrails beyond the current filename-only forbid-generated-reports hook (matches github-usage-*.json) into a content-aware check in scripts/security + the Security CI workflow that flags committed files containing:
    • absolute local paths (e.g. /Users/, C:\, /tmp/, /var/)
    • unredacted report output in email bodies (plain-text + HTML), text, and PDF exports — email is the main gap today (redact.py covers file exports only, not email bodies; PDF output needs verification), plus generated report artifacts in any format (.json, .txt, .pdf, .xlsx, .csv)
  • Add a dependency/vulnerability CI step: run pip-audit (already a [dev] dep, currently only invoked implicitly via scripts/security) as an explicit always-failing job in .github/workflows/security.yml.
  • Add tests for the above: content-check unit tests with absolute-path/report-artifact fixtures, redaction coverage for email/PDF output, and the dependency/complexity/coverage gates' behavior.
  • Add an inventoried scripts/sonarqube helper that runs a local SonarQube scan (Docker sonarqube container + sonar-scanner, token via env var, output under tmp/ or reports/), documented in the README scripts section and docs/repo-harness-guidance.md alongside scripts/security.

Email Report Follow-Ups

  • Add cached or persisted artifact/release storage snapshots so monthly email reports can compare storage details over time.
  • Surface per-repo artifact scan errors in CSV/XLSX exports and the "Unavailable Data" sections (currently only the text/HTML email and PDF list skipped repos), and add per-repo error handling to get_release_asset_details (one repo failure still aborts that whole section via _try_section).

Actions / Local Full Report

  • CSV/XLSX/PDF columns/sheets for private rankings and workflow breakdown — add TODO comments at repo_consumers readers in export_csv.py, export_xlsx.py, and export_pdf.py.
  • Private-only artifact-scan ranking (artifact section already groups by visibility; billed storage ranking shipped in archived plan).
  • Legacy/full-report artifact scan hides repos whose artifact fetch fails (e.g. a 403 when the token lacks Actions: Read-only), in three ways: storage._collect_repo_artifacts swallows the RuntimeError, so (a) a repo with no release assets is dropped entirely by the total_storage <= 0 and not items check in _analyze_one_repo, (b) a repo that also has release assets is kept with artifact_storage_gb: 0, silently understating quota-carrying storage, and (c) get_storage_analysis drops any repo whose analysis raises KeyError/RuntimeError. Thread the per-repo error through get_storage_analysis and render skipped entries, matching the email path (report_optional.get_artifact_storage_details). Pre-existing gap noted in PR #41 review; the retry fix only changed how fast the 403 surfaces.
  • Workflow breakdown for more than the single top private repo (extend beyond the one-repo wall-clock section).
  • Opt-in monthly deep run analysis (top private repo by gross cost; job-level approx + calendar-month cache) — see plan.
  • Retire dead Actions OS-from-runs path (honesty) — see plan.
  • Deep-analysis follow-ons (email section, top-N repos, export columns, auto-enable without flag) — deferred items in opt-in deep-run plan Phase 6.

Code Health

  • Split src/github_usage/report_products.py (504 lines, at the 500-line soft limit in scripts/check-sizes; AGENTS.md asks for extraction from ~400). The CodeQL suppression comments added in PR #42 took it from 500 to 504, and the check is advisory so nothing fails. Extract the legacy Copilot/product print blocks into a submodule rather than adding more to it.

  • Refactor src/github_usage/setup_config.py (507 lines, over the 500-line limit per scripts/check-sizes). Extract a focused submodule — e.g. profile schema/loading (load_report_profiles, find_profile, ensure_profiles, _default_profile) and/or the TOML writer helpers (_emit_*_block, write_config) — to bring the file back under the threshold. Also watch setup_wizard.py (461 lines) and the _manage_profiles()/_run_email_report() functions, which are approaching their limits.

  • Rename internal legacy_* modules/symbols to “local full report” naming (legacy_report_data → e.g. local_report_data, cache kind="legacy", CLI/TUI internals, tests). User-facing copy already says “local full report”; this is the code rename. Keep a thin legacy compatibility shim if external imports still need it.

  • Extract the remaining API-usage tracking orchestration from the report builders (report_data.py 487 lines, legacy_report_data.py 395 lines — both at/over the early-extraction threshold). Keep the merge math in report_api_usage.py; move section-fetch orchestration (_fetch_sections, _fetch_legacy_billing_sections) into a focused submodule so the builders stay thin. Flagged in review on PR #39; deferred to keep that PR's diff small.

  • Add tests to raise overall src coverage from the current ~76% to 80%. Update scripts/coverage-check default from COVERAGE_TOTAL_MIN=75 to 80 once achieved.

Configuration & Setup

  • Write Windows-compatible PowerShell versions of all scripts (setup, check, smoke, docs-check, etc.).
  • Create a start.ps1 PowerShell entrypoint script for Windows.

Deferred

  • Add optional CC/BCC delivery fields for team and finance distribution.
  • Evaluate report retention destinations such as GitHub Releases, S3, or shared drives after export/output support exists.

Blocked, Indefinitely Deferred

  • Add a --month YYYY-MM flag so users can query a specific billing period. Deferred — see docs/api-discovery-month.md; GitHub's billing endpoints ignore since/until parameters.
  • Add historical email reports with github-usage email-report --month YYYY-MM after GitHub billing API period/filter behavior is specified and tested. Blocked by the same API gap as the local full report --month flag.
  • Add month-over-month and year-over-year comparison sections once historical report data is available.