Skip to content

feat(roadmap): the roadmap job tallies each release's joins, descopes and trims by reason, and reports them in its plan and as gauges #1126

Closed

Description

@dan-petty

Problem

Most of a release's items join it after it starts. No part of the tooling counts this, so the roadmap jobs can't tell whether their rules keep releases small.

Measured on 2026-10-03 with read-only GitHub REST calls:

  • v0.2.25 (still open) holds 64 issues. 42 of them were opened on or after 2026-10-02, after v0.2.24 shipped (2026-10-01 22:39 UTC), the moment v0.2.25 started.
  • Issues per release: v0.2.22 had 26, v0.2.23 102, v0.2.24 45 and v0.2.25 64. Pull requests merged into each release branch: 57, 131, 51 and 58 (v0.2.25 so far). The cap is 12 (release_cap, which .github/roadmap.toml leaves at its default).
  • The owner wants frequent, smaller releases and leaves prioritization to the roadmap tooling. To steer toward that, and to show whether its own rules hold, the tooling needs one number per release that it can read.

What records joins after a start today, at release/v0.2.25 (132ecc5; the files cited here are unchanged at d37120b):

  • devops roadmap reprioritize (feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) #740) keeps state, not counts.
    • The run record card holds Started (the release the job last started) and Size (that release's open items at the time). The next start overwrites both (apply_reprioritization, src/devops_cli/roadmap/reprioritize.py:2136-2164), so the size at start of a shipped release is lost.
    • Each item in the admitted set has an Admitted mark that names the release (JobMark, src/devops_cli/roadmap/store.py:114-135). An item in the current release without that mark joined after the start, and the next run judges it. A critical fix admitted later gets the same mark as an item admitted at the start, and moving an item out clears the mark (_final_marks, reprioritize.py:1950-1984). The marks therefore can't show what joined or what left.
    • The job posts a one-line reason comment for every change it makes (Reason, reprioritize.py:277-299; TRANSITIONS, :320-353). Those comments are the only record of why an item moved, and counting them takes one comment read per item.
    • Nothing under src/devops_cli/roadmap/ emits telemetry.
  • Project metrics (emit_project_metrics_telemetry, src/devops_cli/github/metrics.py:389-425) cover open and closed items per milestone, commits and pull requests per release tag, and the interval between releases. They have no baseline at start, and they count no joins, descopes or trims. fix(telemetry): the project velocity dashboard reads the latest snapshot of each gauge, and the project gauges drop the _total suffix #974 (backlog) turns them into gauges that are emitted when devops gh or devops pr runs. Today InstrumentKind has only COUNTER and HISTOGRAM (src/devops_cli/telemetry/instruments.py:17-21).
  • The rule has not been in force yet. The job runs only on a migrated board (_require_migrated, reprioritize.py:928). Until feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981 (v0.2.26) lands, it runs only when someone starts it by hand, so v0.2.22 to v0.2.25 grew with no admission rule in force. Once the rule binds, only a critical fix can join after the start. The open questions are then:
    • whether the rule holds;
    • how many fixes join;
    • how many joins are turned away;
    • how much descoping and trimming each release goes through.

Acceptance criteria

  • Ledger on the item. When the job finishes a change, its last job-record write (the one _final_marks builds, which clears Pending) adds one entry to the item's new Tally mark. The mark holds a JSON list of [release milestone number, reason] entries, read and written through a pydantic TypeAdapter as the Pending mark is. A change that also admits the critical fix it readies or nudges (Decision.admits, reprioritize.py:481-496) writes [release, reason, "critical_fix"], so that join is counted as well as the stall. Because the entry goes in that same write, each change is counted exactly once, even when one run stops part-way and a later run finishes the change. Tests on the in-memory adapter:

    • StoppingStore (tests/roadmap_faults.py) stops a descope, an admission and a top-up at each of their writes. After the run that finishes each change, the item has exactly one entry for it.
    • A critical fix that joins already stalled is readied and admitted in one change, with one entry that the read model counts as a join and as kept.
    • A change dropped because a person's edit wins adds no entry.
    • Decisions whose action is KEEP or START_NEXT add no entry.
    • Two changes to one item in one run add two entries.
    • Entries name the release by milestone number, so a renamed release keeps its entries.
    • An item with 50 entries round-trips through the GitHub adapter's job-record encoding. An older version that reads the record keeps Tally as an unknown key (_JOB_RECORD_KEYS, src/devops_cli/roadmap/github_store.py:489-490).
  • Size history. At a start or a first run, the run record write that sets Size also sets Sizes: a JSON map from milestone number to size at start, holding the last 10 releases. It is still one write, so the commit point described in the module docstring does not move. Test: after two starts, the run record gives both releases' sizes.

  • Machine invariant. The lifecycle machine (tests/test_roadmap_lifecycle_properties.py) gets one invariant. Its message starts with a CONTEXT.md term. After every finished run, it checks that each item has as many Tally entries as the job has posted reason comments on it, and that every entry holds a milestone number and a Reason value. The count is compared, not the comment text, so the check parses no comment. A change whose comment is posted is always finished (_prepare, reprioritize.py:1218-1262), so the counts match whenever a run finishes. The gate settings stay as they are, and the DEVOPS_PROPERTY_PROFILE=deep run passes.

  • Read model. release_growth(items, run_record, releases) is a pure, public function, documented in the module docstring next to decide. For each release that has entries or a recorded size, it returns the size at start and the entry counts in four groups:

    • joined: critical_fix (admitted); p0_feature and cut (sent to the next release); admission (sent to the backlog);
    • descoped: cap, over_size, blocked, dependency, needs_split, others_done, stalled;
    • start: top_up, trim, not_ready_at_start, blocked_at_start;
    • kept: fix_stalled, review_idle.

    An entry with a third element critical_fix counts in joined as well as in its own group. A test walks Reason and fails if a reason is in no group, or in more than one, unless it belongs only to silent transitions (_SILENT, reprioritize.py:359: today fix_stays, fix_new_at_start and shipped). Any reason added later has to be placed in a group.

  • Report. devops roadmap reprioritize prints a "Release growth" section for the current release and the release before it, read before the run makes any writes. Example: v0.2.26: 12 at start; joined 3 (1 critical fix admitted, 2 sent on); descoped 2 (stalled 1, blocked 1); start: pulled in 2, trimmed 1. The MCP tool roadmap_reprioritize returns the same text. The strings live in MESSAGES.roadmap, and a test renders the section from the in-memory adapter.

  • Gauges when the job runs. The emission lives in the reprioritization job's own code path, the one devops roadmap reprioritize calls after it plans and applies, so feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981's devops roadmap run and the Service emit through it too. Whichever of feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981 and this item lands second calls it from the due job's row. Every run emits a snapshot unless it is a dry run (--dry-run or the global one, which the MCP tool's preview passes). That includes a preview without --confirm and a run with nothing to write, which today returns before the preview message (src/devops_cli/commands/roadmap.py:151-152). A --confirm run that finishes adds its own finished changes to the snapshot. The snapshot is built from the board the run already read, with no extra GitHub call, and holds:

    • devops_cli_roadmap_release_size_at_start{release};
    • devops_cli_roadmap_release_decisions{release, group, reason}, non-zero counts only.

    The points are OTLP gauges sent through emit() with fix(telemetry): the project velocity dashboard reads the latest snapshot of each gauge, and the project gauges drop the _total suffix #974's InstrumentKind.GAUGE, and release is the title as it reads now. The skip conditions are fix(telemetry): the project velocity dashboard reads the latest snapshot of each gauge, and the project gauges drop the _total suffix #974's: telemetry disabled, CI or GITHUB_ACTIONS set, dry run, and PYTEST_CURRENT_TEST. A failed collection or export is logged at debug level and changes neither the output nor the exit code. A run that stops part-way emits nothing. Tests:

    • the Captured client receives the points, from a preview, from a run with nothing to write and from a finished --confirm run;
    • a store fake that counts calls records none from the emission;
    • each skip condition suppresses the emission.
  • Dashboard. The Project & Engineering Velocity dashboard (k8s/monitoring/dashboards/project-metrics.json) gets a "Release growth" row. Its panels read the gauges through last_over_time(...[$__range]), the form fix(telemetry): the project velocity dashboard reads the latest snapshot of each gauge, and the project gauges drop the _total suffix #974 uses, and show per release:

    devops grafana dashboards lint k8s/monitoring/dashboards reports 0 errors and 0 warnings, and fix(telemetry): the project velocity dashboard reads the latest snapshot of each gauge, and the project gauges drop the _total suffix #974's dashboard invariants in tests/test_telemetry_instruments.py cover the new queries.

  • Docs and terms. docs/TELEMETRY.md is regenerated with devops docs generate. CONTEXT.md defines Release growth: the items that joined a release after its start, were turned away, descoped or trimmed, as the job's tally counts them. The task file and the changelog fragment use this term.

  • The tests run offline, with the network guard in tests/conftest.py left on. Together the new tests take under 1 s, measured with --durations. uv run devops ci passes.

  • Pending a person: once the board is migrated, run devops roadmap reprioritize against it without --confirm (a preview emits too, and writes nothing). Check that the plan shows the "Release growth" section and that the dashboard row shows the current release's size at start. After the next start, check that the previous release's numbers are still shown.

Key questions

Strategic alignment

Amended 2026-10-04: report the agent filing quota and propose its tuning

The quota, its metrics and the per-release tuning rule (including how release_item_target moves toward 30) are defined in #1153. This item reports them and proposes the tuning; it does not restate the rule.

Update 2026-10-08: refinement

Gauges exist (#1253); the Service records /metrics and emits OTLP (roadmap/run.py:593-595), so these gauges do both. _SILENT holds actions (reprioritize.py:378), so a reason only on KEEP or START_NEXT rows needs no group. Since #1349 a person's join is admitted under the bypassed rule's reason with the Joined mark (:959-979, :2080-2081), so its Tally entry carries person, and a test covers both reasons.

Activity

  1. added
    type/feature
    scope/telemetry
    on Oct 3, 2026
  2. added
    scope/github
    priority/p2-medium
    on Oct 3, 2026
  3. added this to the v0.2.35 milestone on Oct 11, 2026
  4. dan-petty commented on Oct 11, 2026

    @dan-petty
    OwnerAuthor

    Moved to v0.2.35: v0.2.35 started with fewer than its 16 items and was topped up to 16 from Ready items, critical fixes and P0 features first. (devops roadmap reprioritize)

  5. added a commit that references this issue on Oct 13, 2026
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

    priority/p2-mediumscope/githubscope/telemetrytype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions