Skip to content

feat(roadmap): intake runs in its own triage lane on a fast devops-triage model, so a new p0 or p1 item gets its priority within one poll #1534

Description

@dan-petty

Refreshed plan (2026-10-17, unblocking review)

This section supersedes any text below that conflicts with it.

Decisions

Scope

Delivery

  • One PR, size M.

Acceptance criteria (added or replaced; the body's other criteria stand)

  • Cross-lane refine (in-memory store, tests/test_roadmap_run.py): intake runs in the triage lane and refine in the model lane. When an intake round places a P0 or critical item, refine becomes due at the model lane's next round. The model lane reads this from a stamp in schedule.json. The stamp is written under _SCHEDULE_LOCK like every other success (run.py:97, :203-210), because the lanes write schedule.json concurrently. devops roadmap run still runs refine in the same round, through _refine_cross_job (run.py:424-432).
  • Request budget (GitHub store over the faked gh, next to tests/test_roadmap_run.py:1678-1702, driving each lane's SERVICE_JOBS entry so that each lane's own config read is counted): for the same changes, a poll or a delivery in which refine is not due sends no more GraphQL requests and no more REST requests across the three lanes than across today's two. Today every lane round reads .github/roadmap.toml over REST before it judges a row (service_job, run.py:1024, through open_roadmap, src/devops_cli/roadmap/config.py:99, uncached at src/devops_cli/roadmap/github_store.py:2519-2521). Also, _fetch_filtered_changes reads changes on every poll and on every delivery to a lane with a due rule (run.py:803-807). The model lane, which then holds only refine, therefore has to judge refine from schedule.json before the store is opened: it sends no request when refine is not due, and it never reads changes. In a round in which refine is due, the test pins the model lane's extra requests to its config read, its milestone read and one GraphQL budget read (log_round_spend, run.py:981-997). Intake reads the open issues and the board only when its plan starts (plan_intake, src/devops_cli/roadmap/intake.py:1265-1275), that is, only in a round where intake is due.
  • The opened-issue criterion now reads "an issues opened webhook trigger" (constants.py:2289-2292). The queue-depth test checks for the triage lane label, which the gauge already carries (service.py:144, :175).
  • Docs. This list replaces the body's list, because AGENTS.md now holds only the suspension notice (AGENTS.md:147-151): CONTEXT.md:105-107 and :129-131; the serve --service help (src/devops_cli/lang/en/help.py:808-811), with docs/commands/serve.md:25 regenerated; k8s/README.md:91 (the triage group next to devops-background, plus the fallback chain)
  • Pending a person: once the Service runs again (chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562) and the issues webhook is subscribed (k8s/README.md:372), check that while a refine round is running, an issue opened in a managed repository gets its intake comment, fields and placement within 5 minutes. The measured latency is recorded on this item.

Note to #1540 (for a person to post there)

Current references (checked at main 3dd7fa6)

  • Model: intake's call is at src/devops_cli/roadmap/intake_model.py:168 and refine's at src/devops_cli/roadmap/refine.py:951-952. AITasksConfig is at src/devops_cli/config/settings.py:445-449 (:446-450 on release/v0.2.37 after fix(security): local names come from the public suffix list, and domains match on DNS labels, not string suffixes #887), and the Service example config is at k8s/devops/configmap.example.yaml:19-25.
  • Lanes: RELEASE_LANE_ROWS (run.py:657-680), MODEL_LANE_ROWS (:683-702, intake row at :684-691), DEFAULT_DUE_TABLE (:704), SERVICE_JOBS (:1035-1042). Lane names are at constants.py:1070-1072.
  • Due rules: _intake_due (run.py:375-383), _refine_due (:392-400), _refine_cross_job (:424-432), _places_critical_or_p0 (:435-444); schedule.json writes go through _record_success (:203-210).
  • Reads: service_job (run.py:1017-1032) and open_roadmap (config.py:93-108); _fetch_filtered_changes (run.py:794-807) and log_round_spend (:981-997); changes_since (github_store.py:1490-1519), _with_job_records (:1965-1978) and the uncached runner (:2519-2521); intake's reads in plan_intake (intake.py:1265-1275).
  • Workers: RepoWorker (service.py:130-307, lane label at :144, queue-depth gauge at :175) and RoundPause (:79-87).
  • Gateway: k8s/llm/gateway/configmap.yaml:62 (devops-background) and :172-181 (fallbacks); slow-tier tests at tests/test_k8s_llm_gateway.py:313 and :333.

Dependencies and order


Requested by the owner, 2026-10-09: "I'm also picturing a fast-polling or event driven triage process that quickly identifies if an issue is high priority and needs to go into a milestone immediately, and issue enhancement processes that can truly run in the background without blocking releases and triage, while doing investigation, validation, enhancement, and correlation."

Problem

Checked at release/v0.2.33.

  • Intake already makes the triage decision. It proposes a type, a Priority (P1-P3; P0 only with evidence GitHub confirms), Value and Effort, and runs a duplicate check (roadmap/intake.py, module docstring). It runs on issues opened and reopened deliveries (CONST_ROADMAP_INTAKE_BATCH_KEYS) and at every poll while candidates wait (intake.json).
  • It waits for the slow model. Intake and refine both call ai.for_task("analysis") (roadmap/intake_model.py:7-8, roadmap/refine.py:951). The Service sets that to devops-background (k8s/devops/configmap.example.yaml), the background tier, which answers one call at a time in about 2-3 minutes. fix(roadmap): the service runs close and reprioritize in their own lane, so a slow model-bound intake or refine round never holds up a release #1532 splits the status lane from the model lane, but intake and refine still share the model lane. A new P0 waits behind every queued refine call: about 40 calls on 2026-10-09 from 22:04 UTC, with no round finishing for over 40 minutes.
  • Placement is not part of this item. Since feat(release): release-please makes every release from main #1952, intake puts every new item in the backlog and sets no milestone. A person plans the milestones on the board.

Decision (owner, 2026-10-09)

  • One triage item. Background enhancement (investigation, validation, enhancement, correlation, refine) stays off the triage path and is planned with the workflow-engine adoption.
  • Model. The gateway gets a devops-triage group: qwen3.8:27b on the 64 GiB standard Ollama tier. devops-triage and devops-background both fall back to the existing qwen3.8:27b group. The Service's triage calls use devops-triage.

Proposed design

  1. Gateway (k8s/llm/gateway/configmap.yaml):

    • devops-triage has one deployment, ollama_chat/qwen3.8:27b on the 64 GiB standard tier.
    • router_settings.fallbacks gains devops-triage: [qwen3.8:27b] and devops-background: [qwen3.8:27b]. The comments say why.
  2. Model setting.

    • AITasksConfig gains triage.
    • Intake's proposal call uses ai.for_task("triage"). When triage is unset, it uses ai.model, like every task.
    • The Service ConfigMap example sets triage.model: devops-triage.
    • Embeddings are unchanged.
  3. Triage lane. Built on fix(roadmap): the service runs close and reprioritize in their own lane, so a slow model-bound intake or refine round never holds up a release #1532, each repository gets three lanes:

    • status: metrics;
    • triage: intake;
    • model: refine, plus later background enhancement.

    Each lane has its own worker and queue, with the same triggers and the same schedule.json. The shared round pause (fix(roadmap): a GraphQL budget refusal pauses every Service worker until the reset, and each Service round ends with its spend line #1400) still holds all three. The job keeps the name intake; triage is its lane.

  4. Events.

Order: after #1532 (lanes). #1533 makes triage immediate but does not block this item.

Acceptance criteria

  • Gateway tests (tests/test_k8s_llm_gateway.py):
    • devops-triage has exactly one deployment, ollama_chat/qwen3.8:27b on the 64 GiB standard tier.
    • The fallbacks include devops-triage: [qwen3.8:27b] and devops-background: [qwen3.8:27b], and the existing rules are unchanged.
    • The slow-tier tests still pass.
  • ai.tasks.triage validates, and intake's proposal call uses it. With it unset, intake uses ai.model (test).
  • With a model-lane round blocked on a slow fake model, an issues opened trigger runs intake for that issue within one poll and writes its fields and placement (in-memory store).
  • Metrics report the triage lane's queue depth.
  • Docs:
    • AGENTS.md's roadmap-service section: the three lanes, and the triage model next to the line that names devops-background.
    • The CONTEXT.md Intake entry.
    • k8s/README.md: the gateway section and the Service setup.
  • Person check, after rollout: an issue opened in a managed repository gets its intake comment, fields and placement within 5 minutes while a refine round is running.

Feasibility

  • Fits one PR:

    It adds no new job or record.

  • Model reloads. The 64 GiB standard tier keeps one model loaded and also serves qwen3-coder:30b, gemma4:31b and deepseek-r1:70b. A triage call that follows another model's call reloads qwen3.8:27b, which adds load time. The person check records the latency; if load time dominates, report it on this item.

  • Fallbacks chain. devops-review → devops-background → qwen3.8:27b means background and review work can reach the interactive tiers when the background tier fails, including after its 1,100 s timeout. The owner chose this. The gateway comments and k8s/README.md state it.

Related: #1532 (lanes), #1533 (event-scoped updates), #1386 (event router), #1514 (slots).

Proposed design

Problem statement

The roadmap Service runs intake and refine in the same model lane. A new P0 or P1 item waits behind every queued refine call before it gets its priority. This item gives intake its own triage lane on a fast model. A new critical item then gets its priority within one poll. Refine continues in a separate model lane.

Acceptance criteria

  • Criterion 1: The gateway config has a devops-triage group with one deployment, ollama_chat/qwen3.8:27b, on the 64 GiB standard tier.
    Verification: Run pytest tests/test_k8s_llm_gateway.py -v and confirm the devops-triage deployment and tier assertions pass.
  • Criterion 2: The fallbacks include devops-triage: [qwen3.8:27b] and devops-background: [qwen3.8:27b], and the existing rules are unchanged.
    Verification: Run pytest tests/test_k8s_llm_gateway.py -v and confirm the fallback assertions pass.
  • Criterion 3: ai.tasks.triage validates, and intake's proposal call uses ai.for_task("triage"). When triage is unset, intake uses ai.model.
    Verification: Run the intake model test that sets and unsets ai.tasks.triage and checks which model the proposal call targets.
  • Criterion 4: When intake places a P0 or critical item, refine becomes due at the model lane's next round via a schedule.json stamp.
    Verification: Run pytest tests/test_roadmap_run.py -k cross_lane -v and confirm the stamp is written under _SCHEDULE_LOCK and refine is due on the next model-lane round.
  • Criterion 5: A poll or delivery where refine is not due sends no more requests across the three lanes than today's two.
    Verification: Run the request-budget test that drives each lane's SERVICE_JOBS entry and counts GraphQL and REST requests per lane.
  • Criterion 6: When refine is due, the model lane sends at most three reads: its config, its milestone, and one GraphQL budget read.
    Verification: Run the request-budget test and confirm the model lane's request count matches the three reads.
  • Criterion 7: The opened-issue criterion reads "an issues opened webhook trigger", and the queue-depth test checks for the triage lane label.
    Verification: Run pytest tests/test_roadmap_run.py -k webhook -v and confirm the trigger type and lane label assertions pass.
  • Criterion 8: CONTEXT.md, the serve --service help, and k8s/README.md reflect the three lanes and the devops-triage model.
    Verification: Read CONTEXT.md:105-131, src/devops_cli/lang/en/help.py:808-811, and k8s/README.md:91 and confirm the triage lane and model are named.

Key questions

Open questions

  • What are the fallbacks for devops-triage and devops-background? (missing verified source)
  • What is the request budget for the model lane? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/feature
    scope/ai
    scope/k8s
    scope/roadmap
    on Oct 9, 2026
  2. dan-petty commented on Oct 9, 2026

    @dan-petty
    OwnerAuthor

    The owner chose Argo Workflows as the Service's engine on 2026-10-09 (#1535). The triage lane here maps onto its roadmap-<repo>-triage mutex. If this item lands first, it extends #1532's thread lanes, and #1535 moves them onto Argo.

  3. dan-petty-bot commented on Oct 10, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. The owner explicitly requested it and P0 items currently wait 40+ minutes behind refine calls, but it is an enhancement to an existing working flow rather than a defect.
    • Value: High. It directly determines how quickly critical (P0/P1) items reach an open release, which is the core purpose of the roadmap pipeline.
    • Effort: Medium. It touches gateway config, AITasksConfig, lane wiring (building on #1532), placement logic (reusing #882's helper), and event triggers, but each piece is a focused change on existing infrastructure.
  4. added
    status/blocked
    on Oct 11, 2026
  5. dan-petty commented on Oct 11, 2026

    @dan-petty
    OwnerAuthor

    Blocked by #1562: the roadmap Service's machine account is suspended, and the Service is held at 0 replicas. This item develops the Service or can only be checked on it, so it waits until the account is reinstated or the jobs act as a GitHub App.


    Generated by Claude Code

  6. changed the title [-]feat(roadmap): intake runs in its own triage lane on a fast devops-triage model, so a new p0 or p1 item gets its priority and an open release within one poll[/-] [+]feat(roadmap): intake runs in its own triage lane on a fast devops-triage model, so a new p0 or p1 item gets its priority within one poll[/+] on Oct 23, 2026
  7. removed
    status/blocked
    on Oct 23, 2026
  8. dan-petty commented on Oct 26, 2026

    @dan-petty
    OwnerAuthor

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

  9. dan-petty commented on Oct 27, 2026

    @dan-petty
    OwnerAuthor

    Refine cannot set this item to Ready at 9f97c14 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • What are the fallbacks for devops-triage and devops-background? (missing verified source)
    • What is the request budget for the model lane? (missing verified source)
  10. added
    priority/p1-high
    status/new
    effort/medium
    value/high
    status/in-review
    and removed
    status/new
    on Oct 28, 2026
  11. removed
    status/in-review
    on Oct 31, 2026
  12. added a commit that references this issue on Oct 31, 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

    effort/mediumpriority/p1-highscope/aiscope/k8sscope/roadmaptype/featurevalue/high

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions