Skip to content

feat(roadmap): a decision-point registry with a resolver chain - #4453

Merged
dan-petty merged 2 commits into
mainfrom
feat/4397-a-decision-point-registry-with-a-resolver
Nov 11, 2026
Merged

dan-petty merged 2 commits into
mainfrom
feat/4397-a-decision-point-registry-with-a-resolver

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The Jev pilots each had their own setting, metric and log. ADR 0020 makes a decision point the unit. This change adds the registry of decision points on the cuts, bands and fit of decision_step.py and decision_fit.py. A point resolves with a proven rule, then the model of ai.decision_model when its mode in roadmap.decisions is shadow or on, then the current behavior. With ai.decision_model empty, no point sends a request. The registry refuses a key that names no point, and the mode on for any point that has no fitted cuts file. One counter, devops_cli_decision_point_total, replaces the two counters of the decision step. Each decision writes a decision record, the workflow writes an outcome record, and join gives the labelled cases of the next fit. The verify screen is now the point stage.verify_screen, and the setting roadmap.stage.jev_screen goes.

Closes #4397

Change: openspec/changes/archive/2026-11-11-4397-a-decision-point-registry-with-a/

@dan-petty dan-petty added type/feature Type feature: a new function scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test evidence

Fail-to-pass, uv run devops ci fail-to-pass --base origin/main on head 1eea8f9b (base 6cf78e73):

  • 3 test files fail to collect on the base, because the modules and settings that they test do not exist there: tests/config/test_decision_point_settings.py, tests/roadmap/stage/test_roadmap_stage_jev_screen.py, tests/roadmap/test_roadmap_decision_point.py.
  • 3 tests fail on the base: test_the_variables_are_those_before_one_for_each_read_option_that_had_none_and_later_ones (the new variables), test_every_numeric_limit_of_the_roadmap_jobs_has_a_class (the new bound of 60 series) and test_the_data_file_of_the_cuts_names_the_model_the_cases_and_the_numbers (the cuts file names the point stage.verify_screen).
  • All of them pass on the branch. The targeted run of the changed test files gives 111 passed.

The evals give the numbers of the base. I ran each one with the source of origin/main and with the source of the branch, and the outputs are the same:

I did not run the full local devops ci, because another run held the CI lock. The GitHub checks gate the merge.

@dan-petty

Copy link
Copy Markdown
Owner Author

The ConfigMap change and its order

The image of this change reads the mode of the screen from roadmap.decisions and the model from ai.decision_model. It ignores the old key roadmap.stage.jev_screen, because RoadmapStageConfig ignores a key that it does not know (extra="ignore", and refused_keys reports only extra_forbidden errors). The test test_a_config_that_still_holds_the_old_screen_key_loads_and_the_point_is_off loads a file that holds roadmap.stage.jev_screen: shadow. So this PR removes the old key in one step, and no change to the live ConfigMap must come before the image.

AIConfig refuses a key that it does not know (extra="forbid"). An image older than this change stops at the load of a ConfigMap that holds ai.decision_model, and so does a runner Job of an older image. So the template k8s/devops/configmap.example.yaml does not hold ai.decision_model yet. #4446 adds it after the image runs.

Do these steps in the live ConfigMap devops-cli-config (namespace devops, key devops-cli.yaml):

  1. At any time, before or after the image rolls. Both images accept it. Add under roadmap::
    roadmap:
      decisions:
        stage.verify_screen: shadow
  1. Only after the image of this change runs. Check it first: kubectl -n devops exec deploy/roadmap-service -- devops config get ai.decision_model must print an empty value and no error. Then add under ai::
    ai:
      decision_model: typesafe/jev-1.14

and remove this line under roadmap: / stage::

        jev_screen: shadow
  1. kubectl -n devops rollout restart deployment/roadmap-service

Between the roll of the image and step 2, the screen sends no request, and the review runs for every plan, as it does in shadow today. Only the shadow records stop for that time. Keep jev_screen: shadow until step 2, so that the old image keeps its shadow records until it stops.

A run of devops k8s deploy-stack --stack devops from main writes roadmap.decisions from the template and removes jev_screen. Until #4446 merges, it also removes a hand-added ai.decision_model. Do step 2 again after such a run.

ADR 0020 makes a decision point the unit of a decision model in a
workflow. This change adds the registry and moves the verify screen
onto it.

- decision_point.py holds the type of a point, the resolver chain (a
  proven rule, then the model of ai.decision_model, then the current
  behavior), the decision and outcome records, the join that gives the
  labelled cases of the next fit, and the registry. decision_registry.py
  lists the points. The registry is built on Band, Thresholds, band_of
  and decide_all of decision_step.py and on FitCase of decision_fit.py.
- ai.decision_model names the decision model. Empty is the default and
  means that no point sends a request. A name that is not a System One
  model stops the load.
- roadmap.decisions maps a point to off, shadow or on. A key that names
  no registered point stops the load. The registry refuses on for any
  point that has no fitted cuts file in the repository.
- One counter, devops_cli_decision_point_total (point, resolver, band,
  mode), replaces devops_cli_roadmap_decision_step_total and
  devops_cli_roadmap_decision_step_review_total. The registry refuses a
  catalogue above 60 series. stage.verify_screen has 8.
- The verify screen is the point stage.verify_screen. The setting
  roadmap.stage.jev_screen goes. RoadmapStageConfig ignores an unknown
  key, so a ConfigMap that still holds it loads.
The specs decision-workflows and roadmap-stage get the requirements of the change. The requirement of the verify screen is shorter, so that the strict check accepts it.
@dan-petty
dan-petty force-pushed the feat/4397-a-decision-point-registry-with-a-resolver branch from 1eea8f9 to 7a4a507 Compare November 11, 2026 02:54
@dan-petty

Copy link
Copy Markdown
Owner Author

Two check failures on 1eea8f9b, fixed in 7a4a5078

  • test_no_phantom_exports (Tests & Coverage shard 1, Service Image Tests shard 4) said that decision_point.py cannot serve Rule. Rule is a type statement (PEP 695), and from devops_cli.roadmap.decision_point import Rule works. The helper _names_bound_by of the test knew four statement kinds and not ast.TypeAlias, so it now reads a type statement as a bound name too. The check of the test stays the same for every other name.
  • The test-tree gate (Static Analysis) found an assertion of presence only in test_the_registry_accepts_on_for_a_point_with_fitted_cuts. The test now checks the step, the day and the questions of the cuts that the point loads.

The branch is on 7c595656 now. The two evals give the same output as before on the new head.

@dan-petty

Copy link
Copy Markdown
Owner Author

Review findings after the merge

This PR merged before the fix round of its review. I pushed nothing to its branch. I checked each finding against main at 0ac2f76, which holds the merge b73e97a. Both findings are correct. I filed one issue for each finding.

1. Major: the gate for ai.decision_model checks only the Service image

docs/roadmap/stage.md (section "The verify screen"), the ai comment of k8s/devops/configmap.example.yaml, the start condition of #4446 and step 2 of the comment "The ConfigMap change and its order" check only deploy/roadmap-service. CronJob devops-cli-runner (image runner) and Deployment mcp-server (image mcp-server) also load ConfigMap devops-cli-config. Image Updater keeps a separate digest for each image. AIConfig refuses an unknown key (extra="forbid"). An older runner Job or MCP server thus stops at the load of settings when the ConfigMap holds ai.decision_model.

What I did: filed #4496. I also put a comment on #4446, because its start condition has the same gap.

Correction of step 2. Do step 2 only when all three images of this change run. Do these checks first:

  1. The comment Live since of the release is on feat(roadmap): a decision-point registry with a resolver chain #4397. That comment checks the Service digest and the runner digest.
  2. kubectl -n devops exec deploy/roadmap-service -- devops config get ai.decision_model prints an empty value and no error.
  3. kubectl -n devops exec deploy/mcp-server -- devops config get ai.decision_model prints an empty value and no error.

2. Major: roadmap.decisions imports pydantic_ai when the settings load

With roadmap.decisions set, _check_decisions imports decision_registry, and with it pydantic_ai.models.decision. I measured devops config get ai.provider on main:

Config Modules pydantic_ai Wall time (3 runs)
no roadmap.decisions 816 no 4.0 s, 4.8 s, 5.3 s
roadmap.decisions set 1403 yes 8.5 s, 9.1 s, 12.3 s

-X importtime gives 4.33 s cumulative for devops_cli.roadmap.decision_registry, and 4.12 s of that for pydantic_ai.models.decision. The startup-imports gate runs with no roadmap.decisions, so it does not find the cost.

What I did: filed #4501.

Note for step 1: while ai.decision_model is empty, the point sends no request and writes no record. Thus step 1 gives no records before step 2, but every devops command that reads the ConfigMap pays the import cost. Step 1 can wait until step 2.

Minor findings

The review gave no minor findings for this round.

Checks

I changed no code, so no fail-to-pass run applies.

dan-petty pushed a commit that referenced this pull request Nov 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.111.0](v0.110.0...v0.111.0)
(2026-11-11)


### Features

* **roadmap:** a decision-point registry with a resolver chain
([#4453](#4453))
([b73e97a](b73e97a))
* **roadmap:** eval verify stores each case and resumes
([#4451](#4451))
([7c59565](7c59565))
* **roadmap:** extend a step budget when the run makes progress
([#4464](#4464))
([c8ed108](c8ed108))


### Bug Fixes

* **ai:** a failed model transport names its phase and its error
([#4460](#4460))
([54743c4](54743c4))
* **ai:** price the DeepSeek group and its cached input
([#4454](#4454))
([3b1f6bd](3b1f6bd))
* **roadmap:** stage and refine send no answer count or row
([#4484](#4484))
([d9c8ee8](d9c8ee8))
* **roadmap:** tool docstrings garble the answer format
([#4486](#4486))
([2f6114f](2f6114f))


### Performance Improvements

* **roadmap:** parse only the bodies that hold a job record
([#4455](#4455))
([c653bde](c653bde))
* **tests:** evaluate hour-scale promtool tests every hour
([#4462](#4462))
([0ac2f76](0ac2f76))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): a decision-point registry with a resolver chain

1 participant