Repository navigation
Description
Problem or Motivation
Each roadmap row has its own due rule. Refine writes the stage_due stamp, and open items plan more due keys: roadmap:v1:due:* in #4565, #4567, #4568 and #4574, and fix-checks:<pr> in #5024. A mark can expire, get lost or disagree with the record. The approved pipeline split design (tracker #5482) makes one pure function the only source of what is due.
Proposed Solution & Architectural Design
- Add
src/devops_cli/roadmap/due.pywithdue_jobs(subject) -> frozenset[Job]. It is a pure function over the labels, the record block, the PR facts and the unit list. It usesphase(feat(roadmap): the phase of each item drives the stuck-item alert #5495). - Give it the predicates of the jobs that run today: intake, retitle, alternatives, refine, stage, implement, fix_plan and the status rows. Each new job item adds its own predicate.
- Skip an item with
owner/agent,owner/human,needs-split, a person cause or a running unit. - Each research and premise key uses the outside hash (
body_hash.py), so a refine write makes neither due. devops roadmap explain <n>prints the phase and the due jobs.- Add the pipeline table to
docs/ROADMAP_WORKFLOW.md: for each of the 24 jobs, its due predicate, result line, intended result, permission row, mode and issue. A job that is not built names its issue. - The rows adopt
due_jobsin their own items: feat(roadmap): one watch row for plan and delivery PRs #5024 first, then the sweep (feat(roadmap): run the reconcile sweep on a cluster schedule #4574).
Target Subsystem
Roadmap Service and roadmap jobs (src/devops_cli/roadmap/, docs/ROADMAP_WORKFLOW.md).
Acceptance Criteria
- Test first: a Hypothesis property test. For each producer write in the phase fixtures,
due_jobsof the state after the write gives the next job, and a second run on the same state gives the same set. The test fails on the base. - A test: a held, claimed or running item has no due job.
- A test: a refine write makes no research or premise job due.
- A test: the Staged rule gives one path for each item, never both.
-
uv run devops docs checkpasses. - Live proof: after the merge and the release,
devops roadmap explainruns in a runner Job as the App on the items of the opendevops-cli-service[bot]PRs and on 5 items closed in the last 14 days. A comment on this issue gives the phase and the due jobs of each item, and each case where a row acted againstdue_jobs.
Existing Tool Considered
Hypothesis 6.170.15 (locked) gives the property test. The IssueOps label pattern and the Prow Tide verdict pattern shape the function. No library gives these predicates. Build: 300,000 to 500,000 agent tokens and 1 day.
Related
Tracker #5482, Phase 2. Depends on #5495 and #5502 (the record that permits it). #5024 uses it for PR subjects. #4574 calls it. #5443 (the agentic workflow specification).
Source: #5482
Alternatives check of 2026-11-29: none.
Tool: none found.
Reason: Searches found only generic rule engines, CEL evaluators and label automations. None gives the roadmap predicates over phase, record block, PR facts and units, so the project must build due_jobs. Hypothesis supplies only the property-test harness.
Lacks:
- Predicates for intake, retitle, alternatives, refine, stage, implement and fix_plan
- Skip rules for owner labels, needs-split, person cause and running unit
- One pure frozenset result over labels, record block, PR facts and units
Proposed design
Problem statement
Each roadmap row has its own due rule. A mark can expire, get lost or disagree with the record. The approved pipeline split design (tracker #5482) makes one pure function the only source of what is due. This item adds due_jobs(subject) in src/devops_cli/roadmap/due.py, exposes it in devops roadmap explain, and documents the 24-job pipeline table.
Acceptance criteria
Requirement: Pure due_jobs module
The roadmap code SHALL provide a pure function due_jobs(subject) in src/devops_cli/roadmap/due.py that returns a frozenset of due jobs.
Scenario: Due jobs for a built job state
- WHEN A test gives
due_jobsthe labels, record block, PR facts and unit list of one built job state. - THEN The function returns a
frozensetthat holds the due job for that state.
Requirement: Predicates for built jobs
The due_jobs function MUST give a due predicate for each job that runs today: intake, retitle, alternatives, refine, stage, implement, fix_plan and the status rows.
Scenario: Each built job has a predicate
- WHEN A test gives
due_jobsa subject for one built job. - THEN The function returns that job when the job is due and leaves it out when the job is not due.
Requirement: Skip conditions
The due_jobs function MUST return an empty set for an item with owner/agent, owner/human, needs-split, a person cause or a running unit.
Scenario: Skip conditions give no due job
- WHEN The item has one of
owner/agent,owner/human,needs-split, a person cause or a running unit. - THEN
due_jobsreturns an emptyfrozenset.
Requirement: Research and premise keys use the outside hash
The research and premise job keys MUST use the outside body hash from body_hash.py.
Scenario: Refine write does not make research or premise due
- WHEN A refine write changes the refine section of the item.
- THEN
due_jobsreturns no research job and no premise job.
Requirement: Staged rule gives one path
The Staged rule MUST give exactly one Staged path for each item and never both paths.
Scenario: Staged item has one path
- WHEN
due_jobsevaluates an item in the Staged state. - THEN The result holds exactly one Staged path.
Requirement: Stable result on a second run
The due_jobs function MUST return the same frozenset on a second run on the same state.
Scenario: Second run on the same state
- WHEN
due_jobsruns twice on the same state. - THEN Both runs return equal
frozensetvalues.
Requirement: Property test after a producer write
The Hypothesis property test SHALL check that due_jobs gives the next job after each producer write in the phase fixtures.
Scenario: Next job after a producer write
- WHEN A phase fixture applies one producer write to a state.
- THEN
due_jobsof the state after the write gives the next job.
Requirement: Property test fails on the base commit
The property test for due_jobs MUST fail on the base commit before the change.
Scenario: Property test on the base commit
- WHEN The property test runs on the base commit without the
due_jobschange. - THEN The test fails.
Requirement: Explain prints the phase and the due jobs
The command devops roadmap explain <n> MUST print the phase and the due jobs of the item.
Scenario: Explain shows phase and due jobs
- WHEN
devops roadmap explain <n>runs on an item. - THEN The output names the phase and the due jobs.
Requirement: Pipeline table in the workflow page
docs/ROADMAP_WORKFLOW.md MUST hold a pipeline table for each of the 24 jobs with its due predicate, result line, intended result, permission row, mode and issue.
Scenario: Docs check accepts the pipeline table
- WHEN
uv run devops docs checkruns ondocs/ROADMAP_WORKFLOW.md. - THEN The command passes and the page holds one row for each of the 24 jobs, and each job that is not built names its issue.
Requirement: Docs check passes
The documentation change MUST pass the docs check.
Scenario: Docs check on the roadmap workflow page
- WHEN
uv run devops docs checkruns. - THEN The command passes.
Requirement: Pending a person after the merge
After the merge and the release, a person MUST run devops roadmap explain in a runner Job as the App on the items of the open devops-cli-service[bot] PRs and on 5 items closed in the last 14 days.
Scenario: Live proof of explain after the merge
- WHEN The merge and the release are done, and a person runs
devops roadmap explainin a runner Job as the App on those items. - THEN A comment on this issue gives the phase and the due jobs of each item and names each case where a row acted against
due_jobs.
Existing Tool Considered
The alternatives check of 2026-11-23 in the issue body gives verdict none and names no tool. It lists what no tool covers; see that block. Hypothesis 6.170.15 supplies only the property-test harness, not the function under test. The plan builds its own code at a written cost of 300,000 to 500,000 agent tokens and 1 day.
Key questions
- Where does the pure due function live and what is its interface?: Add
src/devops_cli/roadmap/due.pywithdue_jobs(subject) -> frozenset[Job]. It reads the labels, the record block, the PR facts and the unit list, and it usesphase. (best practice) [sources: docs/ROADMAP_WORKFLOW.md, src/devops_cli/roadmap/run.py:1661, src/devops_cli/roadmap/fix_checks_row.py]- Chosen: New module
src/devops_cli/roadmap/due.py. The issue proposes a pure function over the four inputs. A separate module keeps it testable and shared. - Rejected: Extend
src/devops_cli/roadmap/run.py.run.pyalready holdsstage_dueand run state. A pure function there is harder to test. - Rejected: Extend
src/devops_cli/roadmap/fix_checks_row.py.fix_checks_row.pyis one row, not the shared source of due jobs.
- Chosen: New module
- Which jobs get a due predicate in the first version?: The jobs that run today: intake, retitle, alternatives, refine, stage, implement, fix_plan and the status rows. Each new job item adds its own predicate. (best practice) [sources: docs/ROADMAP_WORKFLOW.md]
- Chosen: Only the jobs that run today. The issue gives the predicates of the built jobs. A new job adds its predicate with its item.
- Rejected: All 24 jobs including unbuilt jobs. An unbuilt job has no due rule yet. The pipeline table names its issue instead.
- How does
due_jobsskip an item?: It returns an empty set for an item withowner/agent,owner/human,needs-split, a person cause or a running unit. (best practice) [sources: CONTEXT.md, docs/ROADMAP_WORKFLOW.md]- Chosen: Skip on all five conditions. The issue names these conditions. CONTEXT.md defines Claim, Unit of work and Blocked in the same terms.
- Rejected: Skip only on owner labels. It misses
needs-split, a person cause and a running unit.
- How are the research and premise keys computed?: They use the outside body hash from
body_hash.py, so a refine write makes neither due. (best practice) [sources: src/devops_cli/roadmap/body_hash.py, docs/ROADMAP_WORKFLOW.md]- Chosen: Outside body hash from
body_hash.py. The refine section changes on each refine write. The outside hash does not, so research and premise stay not due. - Rejected: Refine section hash. A refine write would make research and premise due, which the issue forbids.
- Chosen: Outside body hash from
- How does a person see the due jobs?: Extend
devops roadmap explain <n>to print the phase and the due jobs. (best practice) [sources: docs/ROADMAP_WORKFLOW.md]- Chosen: Extend
devops roadmap explain. The workflow page already defines explain as the command that says why a job takes or leaves an item. - Rejected: Add a new
devops roadmap duecommand. It duplicates explain and adds a second place for the same facts.
- Chosen: Extend
- How is the pipeline table documented?: Add the pipeline table to
docs/ROADMAP_WORKFLOW.md, with one row for each of the 24 jobs and the issue of each job that is not built. (best practice) [sources: docs/ROADMAP_WORKFLOW.md]- Chosen: Add the table to
docs/ROADMAP_WORKFLOW.md. The page is the one place that names the steps. A test keeps it in step with the workflow labels. - Rejected: Add a separate pipeline document. It splits the job table from the workflow page that readers already use.
- Chosen: Add the table to
- What is the result type of
due_jobs?:frozenset[Job]. The caller needs the set of due jobs, not an order. A set makes the idempotence check direct. (best practice) [sources: docs/ROADMAP_WORKFLOW.md, src/devops_cli/roadmap/fix_checks_row.py]- Chosen:
frozenset[Job]. The caller needs the set, not an order. A set makes the idempotence check direct. - Rejected:
list[Job]. An order is not defined and a second run could reorder the list. - Rejected:
dict[str, bool]. It is verbose and needs a key for every job.
- Chosen:
- What does the Staged rule return?: Exactly one Staged path for each item, never both paths. (best practice) [sources: docs/ROADMAP_WORKFLOW.md, CONTEXT.md]
- Chosen: One Staged path. The issue requires one path. Two paths would let a row act twice on one item.
- Rejected: Both Staged paths. It breaks the single-path rule and can start two actions for one item.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 13, 2026
Both belong to the pipeline split; #5474 is the tracker for all 24 jobs while the candidate is the Phase 2 sub-item that adds the due_jobs function.devops-cli-service commentedon Nov 17, 2026
Alternatives check: none
Reason: Searches for an open, maintained tool that decides which jobs are due from an item's labels, record block, PR facts and unit list returned only generic rules-engine and unrelated documentation pages, none of which carries the roadmap's own job predicates, phase rules, hold/skip conditions or outside-hash keys. The one tool the issue names, Hypothesis 6.170.15 (already locked in the project), only supplies the property-test harness for the acceptance criteria and covers none of the due_jobs function itself, so this is a build.
Tool: none found
Lacks:
devops roadmap explainphase-and-due-jobs output.Tools considered:
Searches run:
Sources:
Checked on 2026-11-17. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 18, 2026
Refine cannot set this item to Ready at fd00bf1 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.