Repository navigation
Description
Problem
The owner approved the pipeline split on 2026-11-13 (tracker #5482). In that design, no job writes a due mark, and due_jobs of #5504 is the only source of due work. So #4687 removes the due marks brain-repair and brain-consolidate. Work that a run leaves then waits for the next daily run of brain-daily.
ADR 0023 names two triggers between the daily runs:
- Repair runs when the index marker is missing or has an old schema, for example after a loss of
valkey-roadmap. - Consolidate runs while shortlists with no verdict remain. On 2026-11-10, the judge read 6 of 82 shortlists (feat(roadmap): run brain repair, consolidate and evaluate daily #4687).
No due predicate gives these triggers now. But the first trigger needs none for the index of #4676 (#7320): the sync reads a missing marker, or a marker of another schema, as an empty watermark, and the next alternatives round copies each check again (src/devops_cli/roadmap/brain_index.py:117, src/devops_cli/roadmap/brain_sync.py:219). #5502 names the brain due predicate in the job table.
Scope
- Add the brain predicate to
due_jobs:- The repair task is due when the index marker of the repository is missing or has an old schema (ADR 0023).
- The consolidate task is due while unjudged shortlists remain.
- The sweep of feat(roadmap): run the reconcile sweep on a cluster schedule #4574 creates a run of the due task only, at most once a day for each task.
- The run uses the repair and consolidate tasks of feat(roadmap): run brain repair, consolidate and evaluate daily #4687.
- The pipeline table of
docs/ROADMAP_WORKFLOW.mdnames this predicate.
Acceptance criteria
- Test first: a test of
due_jobsgives the repair task for a missing index marker and for a marker with an old schema. The test fails on the base. - A test:
due_jobsgives the consolidate task while an unjudged shortlist remains. It gives no brain task when the marker is current and each shortlist has a verdict. - A test: the sweep creates at most one run of each brain task in one day.
uv run devops docs checkpasses.
Dependencies
- feat(roadmap): one due_jobs function names the due jobs of an item #5504
- feat(roadmap): run the reconcile sweep on a cluster schedule #4574
Source
Source: #4624
Alternatives check of 2026-11-27: none.
Tool: none found.
Reason: Searches returned only generic scheduling and deadline-check documentation, nothing that derives due work from a project's index marker or unjudged shortlists. The predicate belongs in the project's own due_jobs, as the issue body already records.
Lacks:
- No tool reads a Valkey index marker to make repair due
- No tool marks consolidate due from shortlists without a verdict
- No tool reuses the sweep's last-success mark for one run a day
Proposed design
Problem statement
Add the brain due predicate to due_jobs for the repair and consolidate tasks. The pipeline split removes the due marks, so no due predicate makes these tasks due between the daily brain-daily runs. ADR 0023 gives two triggers: a missing or old index marker, and shortlists with no verdict.
Acceptance criteria
Requirement: Repair task due from a missing index marker
due_jobs SHALL return the repair task when the index marker of the repository is missing.
Scenario: Missing index marker
- WHEN The test calls
due_jobsfor a repository whose index marker is missing. - THEN The call returns the repair task, and the same test fails on the base commit because
due_jobsreturns no repair task.
Requirement: Repair task due from an old index schema
due_jobs SHALL return the repair task when the index marker holds a schema older than the current schema.
Scenario: Old index schema
- WHEN The test calls
due_jobsfor a repository whose index marker holds a schema older than the current schema. - THEN The call returns the repair task, and the same test fails on the base commit because
due_jobsreturns no repair task.
Requirement: Consolidate task due from an unjudged shortlist
due_jobs SHALL return the consolidate task while at least one shortlist holds no verdict.
Scenario: One shortlist with no verdict
- WHEN The test calls
due_jobswith a current index marker and one shortlist that holds no verdict. - THEN The call returns the consolidate task.
Requirement: No brain task from a current brain
due_jobs MUST return no brain task when the index marker is current and each shortlist holds a verdict.
Scenario: Current marker and judged shortlists
- WHEN The test calls
due_jobswith a current index marker and each shortlist holding a verdict. - THEN The call returns neither the repair task nor the consolidate task.
Requirement: One run of each brain task a day
The sweep SHALL create a run of the due brain task only, and at most one run of each brain task in one day.
Scenario: Both brain tasks stay due
- WHEN The test calls the sweep selection twice in one UTC day while the repair task stays due and one shortlist holds no verdict.
- THEN The first call creates one run of the repair task and one run of the consolidate task, and the second call creates no run of either task.
Requirement: The workflow document names the brain predicate
docs/ROADMAP_WORKFLOW.md MUST name the brain due predicate of due_jobs and the two triggers that it reads.
Scenario: Docs check after the document edit
- WHEN A developer runs
uv run devops docs checkafter the workflow document names the brain due predicate. - THEN The command exits 0 and reports no error.
Existing Tool Considered
The alternatives check of 2026-11-27 in the issue body records the verdict none and names no tool. The change builds the predicate in due_jobs itself. Cost: about 80,000 tokens to build, about 15,000 tokens for each later fix, and about 4 hours of elapsed time.
Key questions
- Does
due_jobsexist at the base commit, and who calls it?: Yes.due_jobsexists, andfix_checks_row.pyis its caller. [sources: src/devops_cli/roadmap/fix_checks_row.py] - Where does the brain due predicate live?: Add one branch to
due_jobs. The existing callerfix_checks_row.pyalready asksdue_jobs, so one function holds every due rule. (best practice) [sources: src/devops_cli/roadmap/fix_checks_row.py, docs/ROADMAP_WORKFLOW.md]- Chosen: A branch in
due_jobs. The callerfix_checks_row.pyalready asksdue_jobs, so one function holds every due rule. - Rejected: A new module for the brain due work. It puts the due rules in two places and adds a second caller path.
- Rejected: The rule inside the sweep row. The row would hold the rule, and no other caller could ask it.
- Chosen: A branch in
- How does the repair predicate read the index marker?: Read the index marker from the project brain in Valkey. A missing marker and a marker of another schema make the repair task due. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/brain_index.py:117, src/devops_cli/roadmap/brain_sync.py:219]
- Chosen: Read the Valkey index marker. CONTEXT.md says Valkey holds the project brain, and the predicate reads the live state with no network call.
- Rejected: Read the durable copies over GitHub. A predicate on each sweep tick would make GitHub requests for each repository.
- Rejected: Read a local cache file. A local file is not the live marker and can be stale after a loss of
valkey-roadmap.
- Where does the consolidate predicate read unjudged shortlists?: Read the latest consolidate plan file under
.data/roadmap/consolidate/. Count the shortlists with no verdict. (best practice) [sources: docs/ROADMAP_WORKFLOW.md, CONTEXT.md]- Chosen: Read the latest consolidate plan file. The consolidate command writes its plan to that file, and the plan is the record of the shortlists.
- Rejected: Read the project brain in Valkey. The project brain holds the alternatives index, not the consolidation shortlists.
- Rejected: Query GitHub for open items. It would make requests on each sweep tick and would not hold the judge verdicts.
- How does the sweep keep at most one run of each brain task in one day?: Read the last-success mark that the sweep writes for each job. Create a run of a brain task only when the task is due and the mark holds an earlier UTC day. (best practice) [sources: CONTEXT.md, docs/ROADMAP_WORKFLOW.md]
- Chosen: The last-success mark of the task. CONTEXT.md says the sweep writes the last success of each job, so the mark holds the day of the last run.
- Rejected: A new per-day key in Valkey for each task. It keeps a second record of a fact that the last-success mark already holds.
- Rejected: A query of the open runs of the task. The sweep would ask GitHub on each tick and for each repository.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 21, 2026
#5504 creates the due_jobs function. The candidate adds the brain predicate to that function.devops-cli-service commentedon Nov 21, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (3)
Searches run:
Sources:
devops-cli-service commentedon Nov 22, 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.
dan-petty commentedon Nov 27, 2026
Design check, 2026-11-26
Body, 1 correction: the sync of #4676 rebuilds the index after a loss. A missing marker, or a marker of another schema, gives an empty watermark (
src/devops_cli/roadmap/brain_index.py:117-122). The next alternatives round then copies each check, at most 500 in one round (src/devops_cli/roadmap/brain_sync.py:219-245, #7320).So a rebuild of the item, tool and reference entries starts with no predicate. The sync does not rebuild insights (#4687, #4693). The consolidate predicate is not changed.
Refine block: it says that Valkey holds the index marker and the shortlists. The marker is the hash
brain-syncinvalkey-roadmap. Not verified: where the shortlists are.Dependencies: #5504 and #4574 are open.
due_jobsdoes not exist yet.run_due_jobsis atsrc/devops_cli/roadmap/run.py:2260.Open question: the scope uses the tasks of #4687 (open). The Dependencies do not name it.
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 and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 28, 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.