Skip to content

perf(config): check roadmap.decisions against a light point table - #4611

Merged
dan-petty merged 3 commits into
mainfrom
perf/4501-light-decision-points
Nov 11, 2026
Merged

dan-petty merged 3 commits into
mainfrom
perf/4501-light-decision-points

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

With roadmap.decisions set, the settings validator imported the decision registry, whose point modules import pydantic_ai. Thus devops config get ai.provider imported 1403 modules in place of 816, and the runner Jobs, the Service and the MCP server paid this at each start.

The validator now checks the keys and the modes against POINT_CUTS of the new module devops_cli.roadmap.decision_table, which imports no point module. A test keeps the table equal to REGISTRY. Registry.check and DecisionPoint.fitted go, because no caller is left. The error messages do not change.

The startup-imports row gets a probe that loads a config file with roadmap.decisions set and fails when the load imports pydantic_ai.

Closes #4501

Change: openspec/changes/archive/2026-11-11-4501-roadmap-decisions-imports-pydantic-ai-at/

The settings validator of roadmap.decisions imported the decision
registry, and the registry imports point modules that import
pydantic_ai. A light command with the key set imported 1403 modules in
place of 816.

The validator now checks the keys and modes against POINT_CUTS of
devops_cli.roadmap.decision_table, which imports no point module. A
test keeps the table equal to REGISTRY. Registry.check goes, because no
caller is left. The startup-imports row gets a probe that loads a config
file with roadmap.decisions set and fails when pydantic_ai loads.
@dan-petty dan-petty added type/infra Type infra: the build, CI, images or cluster scope/config Settings, OS Keyring, environment variables, and defaults labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Measurements

DEVOPS_CLI_CONFIG=<file> python -X importtime -c 'from devops_cli.entry import main; main()' config get ai.provider, count of import time: lines, and three runs of wall time without -X importtime. The host was under load, so the wall times vary much. The module counts do not vary.

Code Config Modules pydantic_ai Wall time
base (7234d71) no roadmap.decisions 816 no 4.2 s, 3.3 s, 6.2 s
base (7234d71) roadmap.decisions: {stage.verify_screen: shadow} 1403 yes 4.9 s, 4.0 s, 5.6 s
this branch no roadmap.decisions 816 no 4.1 s, 3.6 s, 2.4 s
this branch roadmap.decisions: {stage.verify_screen: shadow} 817 no 2.1 s, 2.3 s, 4.8 s

The one more module is devops_cli.roadmap.decision_table.

Fail to pass

The new probe of the startup-imports row, run on the base code with the probe added:

a config file with roadmap.decisions loads no pydantic_ai (#4501): got [True, {'stage.verify_screen': 'shadow'}], not [False, {'stage.verify_screen': 'shadow'}]

On this branch the probe gives no problem, and uv run devops ci --only startup-imports passes (58 probes).

uv run devops ci fail-to-pass --base origin/main exits 1: tests.roadmap.test_roadmap_decision_table errors at collection on the base, because the module decision_table is new, and no test fails in the call phase. The behavior that changes is the import set of a fresh interpreter, and docs/TESTING.md puts that check in the startup-imports row, not in pytest. The title is perf, so the Fail-to-Pass workflow does not run.

Other checks

  • uv run devops ci test tests/roadmap/test_roadmap_decision_table.py tests/roadmap/test_roadmap_decision_point.py tests/config/test_decision_point_settings.py tests/commands/test_cli_startup_imports.py tests/roadmap/stage/test_roadmap_stage_jev_screen.py: 75 passed.
  • uv run devops ci --only lint,format,typecheck,test-tree,constructs: pass.

Live steps

None. The ConfigMap does not change. The runner, Service and MCP server images get the light check when the release moves their digests.

@dan-petty
dan-petty force-pushed the perf/4501-light-decision-points branch from 92ad72a to 31c4b0c Compare November 11, 2026 11:46
@dan-petty

Copy link
Copy Markdown
Owner Author

Update: commit 34c6f45 also deletes DecisionPoint.fitted, because only Registry.check read it. Two tests now read cuts.is_file() in its place. uv run devops ci test tests/roadmap/test_roadmap_decision_table.py tests/roadmap/test_roadmap_decision_point.py tests/config/test_decision_point_settings.py tests/roadmap/stage/test_roadmap_stage_jev_screen.py: 60 passed.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 12:11
@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 12:11
@dan-petty
dan-petty merged commit ab587dc into main Nov 11, 2026
35 checks passed
@dan-petty
dan-petty deleted the perf/4501-light-decision-points branch November 11, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/config Settings, OS Keyring, environment variables, and defaults type/infra Type infra: the build, CI, images or cluster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(config): roadmap.decisions imports pydantic_ai at load

1 participant