Skip to content

docs(adr): record the roadmap job split and the due_jobs rule #5502

Open

Description

@dan-petty

Problem or Motivation

ADR 0021 uses due marks as the transport between jobs. watch sets the due marks fix-checks:<pr> and fix-conflict:<pr>, and the sweep reads them. The router sets a due mark during a hold and after a failed create. The section "The trigger transport stays" and the rejected option "A Valkey stream as the trigger queue" give due marks as the reason. The approved pipeline split design (owner approval 2026-11-13, tracker #5482) removes every due mark: one pure function, due_jobs, is the only source of what is due.

ADR 0021 also has no permission table for each job, no classes for a killed attempt and no per-pod request budget. ADR 0022 section 7 does not say when a -n branch suffix gets built. #4617 adds the links between ADR 0021 and ADR 0022 in the same two files, so this item folds it.

Proposed Solution & Architectural Design

Write one short record that amends ADR 0021, under the ADR rules of docs/adr/README.md: one Considered Options section, a Confirmation section, and 1,000 words or fewer. Set amended-by on ADR 0021. The record states:

  • due_jobs is the only due source. No job writes a due mark. The sweep, the router and devops roadmap explain call it.
  • Replacement text for the router rules: during a hold, or after a failed create, the router creates nothing and sets no mark. The next sweep finds the work through due_jobs, within 5 minutes.
  • Replacement text for "The trigger transport stays" and for the reason of the rejected option "A Valkey stream as the trigger queue": the sweep and due_jobs find each lost trigger within 5 minutes.
  • The trigger cells of the job table (stage, refine, sweep, fix-checks, fix-conflict, brain-daily) name the due predicate in place of a due mark.
  • The watch draft route and the Staged rule (D3, D7).
  • The triage unit: intake, the retitle summary and premise; at most 5 items; no clone.
  • One research unit, just in time, with the semaphore research 1.
  • incident reads the alert state (feat(roadmap): add incident and supervise jobs that read the SLOs #5477). No Alertmanager route and no new webhook provider. The text of a public issue comes from an allowlist and mask_secrets.
  • The permission table for each job (a link to the code table of feat(roadmap): each roadmap Job gets its keys and a scoped token #5498).
  • A killed attempt is evicted (free up to 3 for each head), deadline or oom (both count).
  • The per-pod request budget until feat(service): share the GitHub budget and holds in Valkey #4563.
  • The semaphores agent 2, research 1, triage 1 and steward 1. No PriorityClass.

Issue #5246 owns the job limits, the soft caps and the progress extensions, so this record does not repeat them. #5245 owns the text of the Valkey key classes. This record removes only "a due mark" from that list and from the list of what moves to valkey-roadmap, after #5245 merges.

Considered options, each with its verdict: Argo Events and Tekton Triggers (rejected, a second receiver); KEDA and Kueue (rejected, they duplicate the semaphores); an Alertmanager route (rejected, a new provider and a new credential); a review check run (deferred until E4); a commit status (rejected, the App has no permission for it); GitHub Actions as the engine (rejected).

Add a dated Status History note to ADR 0022 section 7: no -n suffix until the two-branch check of cleanup (#5026) finds a real case (D2).

From #4617: the Status section of ADR 0022 links to the ADR 0021 file. The line of ADR 0021 that names ADR 0022 links to the ADR 0022 file, and no text says that a later PR adds the link.

Target Subsystem

Architecture decision records (docs/adr/).

Acceptance Criteria

  • uv run devops docs check and the ADR tests pass, with the link checks.
  • The record links to docs/ROADMAP_WORKFLOW.md and to the code table.
  • ADR 0021 holds no rule that sets or reads a due mark.
  • The Status section of ADR 0022 links to the ADR 0021 file, and ADR 0021 links to the ADR 0022 file (docs(adr): link the naming record ADR 0022 and the move record ADR 0021 #4617).
  • The owner merges the pull request.
  • No live proof applies: this item changes documents only.

Existing Tool Considered

The MADR form (in use) covers the record. Build: 150,000 to 250,000 agent tokens and 0.5 day, plus the owner review.

Related

Tracker #5482, Phase 2. Depends on #5245 and #5246 (the same ADR text). It replaces #4617. #5233 (the merge order of ADR records). #5235 holds the label rule (D4).

Source: #5482

Alternatives check of 2026-11-17: not-applicable.
Class: docs, no search.
Tool: none found.

Proposed design

Problem statement

ADR 0021 uses due marks as the transport between roadmap jobs. The approved pipeline split removes every due mark and makes due_jobs the only due source. ADR 0021 also lacks a permission table, killed-attempt classes and a per-pod request budget. ADR 0022 section 7 does not state when a -n branch suffix is built. One short record amends ADR 0021, adds the ADR 0022 note and the #4617 links.

Acceptance criteria

Requirement: New ADR form limits

The new ADR SHALL have status accepted, a body-hash, and a body of 1,000 words or fewer.

Scenario: The ADR invariant test passes on the new record

  • WHEN uv run devops ci test tests/invariants/test_adr_records.py runs
  • THEN The command exits 0 and reports no rule break for the new record.

Requirement: New ADR sections and title

The new ADR SHALL have one Considered Options section, one Confirmation section, a title of 10 words or fewer, and a slug of 60 characters or fewer.

Scenario: The ADR section and title rules pass

  • WHEN uv run devops ci test tests/invariants/test_adr_records.py runs
  • THEN The command exits 0 and reports no rule break for the new record.

Requirement: Front matter links both ways

ADR 0021 SHALL name the new record in amended-by, and the new record SHALL name 0021 in amends as a quoted four-digit string.

Scenario: The front-matter links go in both directions

  • WHEN uv run devops ci test tests/invariants/test_adr_records.py runs
  • THEN The command exits 0 and the front matter names an existing record in both directions.

Requirement: ADR 0021 keeps its body hash

ADR 0021 SHALL keep its body hash and SHALL get one dated Status History amendment line that names the replaced sections.

Scenario: The body hash of ADR 0021 still matches

  • WHEN uv run devops ci test tests/invariants/test_adr_records.py runs
  • THEN The command exits 0 on body-hash, and the ADR test reports a Status History line of 30 words or fewer.

Requirement: ADR 0022 gets the section 7 note

ADR 0022 SHALL keep its body hash and SHALL get one dated Status History line about the -n suffix and #5026.

Scenario: The body hash of ADR 0022 still matches

  • WHEN uv run devops ci test tests/invariants/test_adr_records.py runs and rg -q 'refactor(roadmap): run the stage cleanup in the status lane #5026' docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md runs
  • THEN Both commands exit 0, and the ADR test reports a Status History line of 30 words or fewer.

Requirement: The two records link to each other

ADR 0022 SHALL link to the ADR 0021 file, and ADR 0021 SHALL link to the ADR 0022 file.

Scenario: The link check passes

  • WHEN rg -q '0021-the-roadmap-service' docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md runs and rg -q '0022-one-repository' docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md runs
  • THEN Both commands exit 0 and each record links to the other.

Requirement: Index and links are current

The new record SHALL link to docs/ROADMAP_WORKFLOW.md and to the code table of #5498, and the ADR index SHALL list the new record.

Scenario: The docs check passes

  • WHEN uv run devops docs check runs
  • THEN The command exits 0 and reports no out-of-date index and no broken link.

Requirement: Record links workflow and code table

The new record SHALL name docs/ROADMAP_WORKFLOW.md and #5498.

Scenario: The workflow and code-table links are present

Requirement: Each option bullet carries a verdict

The Considered Options section SHALL hold one bullet for each listed option, and each bullet SHALL end in chosen, rejected, or deferred.

Scenario: The options pass the form rule

  • WHEN uv run devops ci test tests/invariants/test_adr_records.py runs
  • THEN The command exits 0 and reports no option bullet without one of the three endings.

Requirement: The Confirmation names current checks

The Confirmation section SHALL name uv run devops ci test tests/invariants/test_adr_records.py, uv run devops docs check, and tests/roadmap/test_roadmap_fix_checks_row.py.

Scenario: The Confirmation names the current checks

  • WHEN rg -q 'test_roadmap_fix_checks_row.py' docs/adr runs and rg -q 'uv run devops docs check' docs/adr runs
  • THEN Both commands exit 0.

Requirement: The record states the due_jobs rule

The new record SHALL state that due_jobs is the only due source and that no job writes a due mark.

Scenario: The due_jobs rule is present

  • WHEN rg -q 'only due source' docs/adr runs and rg -q 'No job writes a due mark' docs/adr runs
  • THEN Both commands exit 0.

Requirement: The record names the due_jobs callers

The new record SHALL state that the sweep, the router and devops roadmap explain call due_jobs, and that the trigger cells name the due predicate.

Scenario: The due_jobs callers are present

  • WHEN rg -q 'devops roadmap explain' docs/adr runs and rg -qi 'trigger cells' docs/adr runs
  • THEN Both commands exit 0.

Requirement: The record states the router replacement

The new record SHALL state the router replacement for a hold or a failed create, and the 5-minute sweep rule.

Scenario: The router replacement is present

  • WHEN rg -q 'creates nothing and sets no mark' docs/adr runs and rg -q 'within 5 minutes' docs/adr runs
  • THEN Both commands exit 0.

Requirement: The record states the trigger transport replacement

The new record SHALL state that the sweep and due_jobs find a lost trigger within 5 minutes, and SHALL reject the Valkey stream with that reason.

Scenario: The trigger transport replacement is present

  • WHEN rg -q 'lost trigger' docs/adr runs and rg -q 'Valkey stream' docs/adr runs
  • THEN Both commands exit 0.

Requirement: The record names the killed classes

The new record SHALL name evicted, deadline and oom as killed classes, and SHALL state that no PriorityClass is used.

Scenario: The killed classes are present

  • WHEN rg -q 'evicted' docs/adr runs and rg -q 'deadline' docs/adr runs and rg -q 'oom' docs/adr runs and rg -q 'PriorityClass' docs/adr runs
  • THEN All four commands exit 0.

Requirement: The record states the request budget and semaphores

The new record SHALL state the per-pod request budget until #4563 and SHALL name the semaphores agent, research, triage and steward.

Scenario: The request budget and semaphores are present

Requirement: The record links the permission table

The new record SHALL link the code table of #5498 and SHALL NOT copy the table.

Scenario: The permission table link is present

Requirement: The record states the incident alert rule

The new record SHALL state that incident reads the alert state (#5477), with no Alertmanager route and no new webhook provider.

Scenario: The incident alert rule is present

Requirement: The record states the public text rule

The new record SHALL state that the text of a public issue comes from an allowlist and mask_secrets.

Scenario: The public text rule is present

  • WHEN rg -q 'mask_secrets' docs/adr runs and rg -q 'allowlist' docs/adr runs
  • THEN Both commands exit 0.

Requirement: The record states the triage and research units

The new record SHALL state the triage unit rules and the one just-in-time research unit, and SHALL link the triage cap setting.

Scenario: The triage and research units are present

  • WHEN rg -q 'triage' docs/adr runs and rg -q 'research' docs/adr runs
  • THEN Both commands exit 0.

Requirement: The record states the watch draft route and the Staged rule

The new record SHALL state the watch draft route and the Staged rule as docs/ROADMAP_WORKFLOW.md and CONTEXT.md state them.

Scenario: The watch draft route and the Staged rule are present

  • WHEN rg -q 'draft_readiness' docs/adr runs and rg -q 'Staged' docs/adr runs
  • THEN Both commands exit 0.

Existing Tool Considered

The alternatives check in the issue body gives not-applicable and names no tool; see the block for the class, the search and the tool line. The change uses the MADR 4 form that docs/adr/README.md sets and uv run devops docs generate for the index. It builds no code. The written cost is the authoring of the record: 150,000 to 250,000 agent tokens and 0.5 day, plus the owner review.

Key questions

  • Does the new record amend ADR 0021 or supersede it?: Amend ADR 0021 with a new record. The new record holds the replacement rules. ADR 0021 keeps its body and gets one dated Status History line. (best practice) [sources: docs/adr/README.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
  • Where does the replacement text for the router rules, the trigger transport and the rejected Valkey-stream option go?: Into the new record. Its Decision Outcome holds the router replacement and the 5-minute rule. Its Considered Options repeats the Valkey stream as rejected with the new reason. (best practice) [sources: docs/adr/README.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
    • Chosen: The new record holds the replacement text. An accepted record's body does not change, and the new record is the rule in force.
    • Rejected: Edit the section in ADR 0021. The body-hash check fails, and the README forbids the edit.
    • Rejected: Add a Status History note only. A note of 30 words cannot hold the replacement rules.
  • How do ADR 0021 and ADR 0022 link to each other (docs(adr): link the naming record ADR 0022 and the move record ADR 0021 #4617)?: Put a link target on the existing mention of ADR 0022 in ADR 0021, and on the mention of ADR 0021 in the Status section of ADR 0022. The body hash ignores link targets, so the hash stays valid. ADR 0021 gets a dated Status History line for the amendment, and ADR 0022 gets a dated line for the -n rule. (best practice) [sources: docs/adr/README.md, docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md]
    • Chosen: Put link targets on the existing mentions. The body hash ignores link targets, so the hash stays valid and the link is on the line that names the other record.
    • Rejected: Add only a Status History line. The line that names the other record still has no link, so docs(adr): link the naming record ADR 0022 and the move record ADR 0021 #4617 stays open.
    • Rejected: Rewrite the body text. The body hash changes, and docs/adr/README.md allows only link targets and one dated line.
  • How does the record satisfy the rule that ADR 0021 holds no rule that sets or reads a due mark?: The new record amends ADR 0021 and states that no job writes a due mark and that due_jobs is the only due source. The old body stays as history. The Status History line names the new record, so the rule in force is the new record. (best practice) [sources: docs/adr/README.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
    • Chosen: Amend ADR 0021 with a new record. The README allows the body to stay and the new record to hold the rule in force.
    • Rejected: Edit the due mark text in the body of ADR 0021. The body-hash check fails, and the README forbids the edit.
    • Rejected: Add only a Status History note. A note of 30 words cannot hold the replacement rules.
  • What does the new record state about due_jobs and the router during a hold or after a failed create?: due_jobs is the only due source. No job writes a due mark. The sweep, the router and devops roadmap explain call it. During a hold, or after a failed create, the router creates nothing and sets no mark. The next sweep finds the work through due_jobs within 5 minutes. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, docs/adr/README.md]
    • Chosen: State the rule in the new record. An accepted record's body does not change, and the new record is the rule in force.
    • Rejected: Edit the router section in ADR 0021. The body-hash check fails, and the README forbids the edit.
    • Rejected: Rely on the issue text only. The issue is not the record, and a reader of the ADR needs the rule.
  • Where do the semaphore counts, the per-pod request budget and the triage cap go?: The record names each semaphore and each rule and links the setting or the spec that holds the number. It does not state the numbers as bare values. The counts and the cap stay in one place that a person changes. (best practice) [sources: docs/adr/README.md, docs/ROADMAP_WORKFLOW.md]
    • Chosen: Name each semaphore and rule, and link the setting. The record keeps the decision, and the number stays in one place that a person changes.
    • Rejected: State the numbers in the record. A value is not a record, and the 1,000-word limit is for decisions.
    • Rejected: Leave the semaphores out. The concurrency bound is part of the split design, and a reader needs its name.
  • What does the record state for the watch draft route and the Staged rule (D3, D7)?: It states them as the repository already states them. watch marks the draft plan ready when its checks pass and draft_readiness answers ready. Staged means the plan pull request is on origin, and Status stays Ready until a person merges the plan, then Planned. [sources: docs/ROADMAP_WORKFLOW.md, CONTEXT.md]
  • What does the Confirmation section name?: It names uv run devops ci test tests/invariants/test_adr_records.py and uv run devops docs check. It also names tests/roadmap/test_roadmap_fix_checks_row.py, the existing test of the fix-checks row. It names no phase 2 test that does not exist. (best practice) [sources: docs/adr/README.md, tests/roadmap/test_roadmap_fix_checks_row.py]
    • Chosen: Name the current checks and the fix-checks row test. Each named check exists today.
    • Rejected: Name a test that phase 2 adds. The check does not exist, so the Confirmation names no passing command.
    • Rejected: Name no Confirmation section. docs/adr/README.md requires a Confirmation section.
  • Which commands prove the ADR rules and the ADR index?: uv run devops ci test tests/invariants/test_adr_records.py fails when a record breaks a rule of docs/adr/README.md. uv run devops docs check fails when the index is out of date or a link is broken. [sources: docs/adr/README.md]
  • Which record number and title does the new record take?: The next free number in the ADR index, 0040 at this commit. The title has 10 words or fewer, and the slug has 60 characters or fewer. [sources: docs/adr/README.md]
  • Which items must land before this record?: docs(adr): Valkey keys are coordination keys or cache keys #5245 and docs(adr): job limits are settings with a soft cap and a hard ceiling #5246, because they change the same ADR text. docs/adr/README.md says the pull requests of new records merge one at a time, in the order of their tracker. The record links the code table that feat(roadmap): each roadmap Job gets its keys and a scoped token #5498 writes. (best practice) [sources: docs/adr/README.md]
  • Where does the permission table for each job go?: The record links the code table of feat(roadmap): each roadmap Job gets its keys and a scoped token #5498 and does not copy the table. docs/adr/README.md says a permission or a table row is not a record. (best practice) [sources: docs/adr/README.md]
    • Chosen: Link the code table of feat(roadmap): each roadmap Job gets its keys and a scoped token #5498. The table is a permission table, and the README says a permission or a table row is not a record.
    • Rejected: Copy the table into the record. It breaks the 1,000-word limit and duplicates a table that code owns.
    • Rejected: Leave the permission table out. The record must name the permission rule for each job.
  • What does the record state for a killed attempt and the per-pod request budget?: It names the killed classes evicted, deadline and oom. It states that an evicted attempt is free up to the limit that the setting holds, and that deadline and oom both count. It links the setting for the limit and the per-pod request budget until feat(service): share the GitHub budget and holds in Valkey #4563. It does not copy the limit or the budget into the record. (best practice) [sources: docs/adr/README.md, src/devops_cli/roadmap/implement/implement_submit.py:289]
    • Chosen: Name the classes and link the settings. The record keeps the decision, and the numbers stay in one place that a person changes.
    • Rejected: State the limit and the budget as numbers. A value is not a record, and the 1,000-word limit is for decisions.
    • Rejected: Leave the killed classes out. The class of a killed attempt is part of the job split.
  • What does the record state for the semaphores and the triage and research units?: It names the semaphores agent, research, triage and steward, and the rules for the triage and research units. It states that no PriorityClass is used. It links the settings that hold the counts and the triage cap. It does not state the counts or the cap as bare values. (best practice) [sources: docs/adr/README.md]
    • Chosen: Name the semaphores and link the settings. The record keeps the decision, and the numbers stay in one place.
    • Rejected: State the counts as bare values. A value is not a record.
    • Rejected: Leave the semaphores out. The concurrency bound is part of the split design.
  • Who merges the pull request that accepts the record?: The owner merges the pull request. Only a person merges pull requests. (a person decides) [sources: AGENTS.md]

Open questions

  • Who merges the pull request that accepts the record? (a person decides)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#5245, #5246

Activity

  1. added
    source/agent
    on Nov 13, 2026
  2. added
    type/docs
    scope/adr
    status/new
    value/medium
    effort/medium
    on Nov 13, 2026
  3. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 13, 2026
  5. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Class: docs. The check makes no search and no model call for an item of this class.

    Tool: none found

    Checked on 2026-11-17. A person decides what this means for the item. The check changes no label and closes no issue.

  6. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    Owner question: Who merges the pull request that accepts the record? (a person decides)

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  7. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  8. dan-petty commented on Nov 24, 2026

    @dan-petty
    OwnerAuthor

    The owner merges the pull request. Only a person merges pull requests (AGENTS.md).

  9. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

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/adrsource/agentstatus/newtype/docsvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions