Skip to content

feat(roadmap): collect the git facts of a project review window #4686

Closed

Description

@dan-petty

Problem or Motivation

No command reviews a version range or a period.

  • devops gh metrics selects releases by count (--limit 10). Its "Total Releases Tracked" stat shows 10, and the repository has 274 v* tags.
  • Tag times use mixed time zones: v0.112.1 has the creatordate 07:51:23-07:00 and v0.111.0 has 05:38:00Z. A string compare of the times gave 23 issues in place of 74. A trial missed v0.55.4 and counted 110 tags in place of 111.
  • PyDriller and git disagree at the range edges (38 against 37 commits).
  • Hotspots break on renames: roadmap/stage_change.py had 13 commits at the old path and 36 at the new path in the week.

Proposed Solution & Architectural Design

Add devops roadmap review run with --version, --since/--until, --week, --last, --repo, --out, --dry-run and --json, in a new package src/devops_cli/roadmap/project_review/.

  • Window resolver:
    • a tag becomes its commit (git rev-parse <tag>^{commit}); a time becomes the last first-parent commit on the default branch at or before it (git rev-list -1 --first-parent --before=<T>);
    • each time becomes an aware UTC value before any compare;
    • the window is half-open: the base commit and the start time are out, the head commit and the end time are in;
    • a window id that is safe for URLs and keys (v0.111.0..v0.112.1, 2026-W45, 20261104T1451Z..20261111T1451Z);
    • the previous window of the same kind and length.
  • git reader:
    • git log --first-parent -M --numstat;
    • net change (git diff --shortstat base head) and churn (the sum of numstat), each with its definition;
    • generated files and lock files apart;
    • commit types through roadmap/commit_title.py;
    • tags through git for-each-ref with creatordate:unix.
  • Hotspots follow renames (-M).
  • lizard 1.24.3 reads git archive of base and head for the top files.
  • A pydantic model of data.json, with an exported JSON Schema. Each fact has id, value, unit, n, source, query, read_at and status (ok, expired, skipped or error), with a reason.
  • --dry-run prints the planned commands and sends 0 requests.
  • lizard goes into a new optional extra review (owner decision of 2026-11-11). The dev environment, CI and the Service image install it.

Target Subsystem

SDLC, Git & PR Governance (a new package src/devops_cli/roadmap/project_review/, and the review extra in pyproject.toml).

Existing Tool Considered

git covers the window and the change facts (log --first-parent -M --numstat, diff --shortstat, for-each-ref). lizard 1.24.3 (MIT) covers complexity. pydantic covers the model and its JSON Schema. PyDriller is rejected: it disagrees with git at the range edges (38 against 37 commits). The custom code is the window resolver and one thin git reader. Cost (estimate): about 250-350 lines with tests, one issue-size item, about 0.33-0.50 USD on the DeepSeek implement path and 1-2 days elapsed.

Acceptance Criteria

On this repository:

  • --version v0.111.0..v0.112.1 gives 37 commits, 421 files, a net change of +14,553/-1,600 and 2 releases, with v0.111.0 excluded.
  • --since 2026-11-04T14:51:23Z --until 2026-11-11T14:51:23Z gives 545 commits and 111 tags (57 minor), with v0.55.4 included.
  • The hotspot row of roadmap/stage/stage_change.py counts the commits at both paths.

Tests:

  • a fixture repository with two tags in different time zones;
  • a test that the base tag is excluded;
  • --dry-run passes under the socket guard with 0 requests.

The 7-day collection takes under 15 s.

Dependencies

None.

Source: #4679

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It fills a gap in review tooling but is not a blocker or a security fix.
    • Value: Medium. It gives users a reliable way to collect git facts for a version range or period, which no existing command provides.
    • Effort: Medium. The body estimates 250 to 350 lines with tests and 1 to 2 days of work.
    • Related: feat(gh): project and release metrics analytics and grafana dashboard #926, which asks for a different change. Both deal with project and release metrics, but 926 delivers ongoing metrics via devops gh metrics and a Grafana dashboard, while the candidate adds a one-shot git-fact collector for a specific window.
  4. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  5. removed
    status/in-progress
    owner/agent
    on Nov 11, 2026
  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor
  7. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 22:57 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions