Repository navigation
Description
Problem
On 2026-11-07 PR #4074 removed the ladder keys plan and review from the settings. Release 0.84.0 rolled the Service image while the live ConfigMap devops-cli-config still held them. Settings validation raised "the ladder names no step class plan, review" (_check_ladder in src/devops_cli/config/settings.py), and roadmap-service went into CrashLoopBackOff until a person applied the ConfigMap by hand. CI did not catch it.
What the code shows today:
- The example
k8s/devops/configmap.example.yamlalready loads intoSettings.tests/config/test_k8s_devops_runtime.py(test_config_targets_the_in_cluster_gateway_and_holds_no_credentialandtest_the_implement_step_runs_on_a_hosted_gateway_group_that_fits_its_window) callSettings.model_validateon it.render_devops_configmap_contentinsrc/devops_cli/k8s/configmap.pydoes the same at each deploy. A branch that re-adds the keyplanto the ladder of the example fails these tests now. - The example was correct after refactor(roadmap): remove the dead plan and review step classes #4074. The stale file was the live ConfigMap, which the cluster holds and git does not. No test of the repository can read it. Argo CD does not apply this ConfigMap, and
devops k8s deploy-stack --stack devopsis the only command that does (k8s/README.md, "Argo CD applies the deployment, but not ConfigMap"). - Most models of
Settingssetextra="ignore". A key that a PR removes from a model, and that stays in the example, is therefore ignored without an error, and no test reports it. I walked the keys of the current example against the fields ofSettingson 2026-11-07, and none is unknown, so this gap is open but has not bitten yet.
Expected
- A test that walks every key of the example ConfigMap (rendered by
render_active_devops_configmapwith fake settings) against the fields ofSettingsand its nested models, and fails on a key that no model declares. It also loads the rendering withSettings.model_validate. - A rule in
k8s/README.md(the paragraph on ConfigMapdevops-cli-config, which says to rundeploy-stackafter a template change merges) and indocs/ROADMAP_WORKFLOW.md: a PR that removes, renames or tightens a setting that the example ConfigMap names must say, in its OpenSpec proposal and in a comment on the pull request, how the live ConfigMap changes first and in which order (apply the ConfigMap, then let the image roll). The pull request body stays as the template sets it, because it becomes the commit message. - The proposal states that a test cannot read the live ConfigMap, and names the check at deploy time (
deploy-stackvalidates the rendering before it applies it) as the part that covers the cluster.
Acceptance criteria
The test file tests/k8s/test_k8s_configmap_keys.py is new.
-
uv run pytest tests/k8s/test_k8s_configmap_keys.py::test_every_key_of_the_example_is_a_settingfails on the current code: the helper that walks the keys does not exist, so the import fails. -
uv run pytest tests/k8s/test_k8s_configmap_keys.py::test_an_unknown_key_in_a_copy_of_the_example_is_reportedfails on the current code for the same reason. The test addsroadmap.implement.not_a_setting: 1to a copy and expects the report to name it. -
uv run pytest tests/k8s/test_k8s_configmap_keys.py::test_an_unknown_ladder_step_class_in_a_copy_of_the_example_fails_to_loadpasses before and after. It adds the keyplanto the ladder of a copy and expects the error "the ladder names no step class". -
grep -n "removes, renames or tightens" docs/ROADMAP_WORKFLOW.md k8s/README.mdprints one line in each file after the change; it prints none now. A test intests/invariants/asserts that both files hold the phrase.
Existing tool considered
Pydantic already reports a key that no field declares when a model sets extra="forbid". The ConfigMap loader could validate with a strict copy of the models, but that changes a public behavior (extra="ignore" lets old config files load). The walk over model_fields needs no new dependency. kubeconform and kubectl diff check the shape of a manifest, not the meaning of the settings inside the string devops-cli.yaml, so they do not fit.
Cost
- Build: about 30k tokens (one walk function, three tests, two paragraphs) and about 1 hour.
- Keep: low. The walk follows
model_fields, so a new setting needs no edit. - Fix: the crash of 2026-11-07 stopped the roadmap Service until a person applied the ConfigMap. Each repeat costs the same.
Related
- refactor(roadmap): remove the dead plan and review step classes #4074 (removed the ladder keys)
- refactor(roadmap): remove the dead plan and review step classes #4036 (an earlier crash of the same kind)
- feat(k8s): implement with deepseek-v4.1-flash-1017 #3573 (the ladder of the implement job)
Activity
dan-petty commentedon Nov 7, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(k8s)scope of the title gives the scope.The gap caused a CrashLoopBackOff incident but the example is correct now; this is a preventive test and doc rule, not an active break.It prevents a class of incidents where a removed setting key stays in the example and breaks deployment, but the example is currently valid.Requires a new test file with a key-walking helper, two documentation edits, and an invariant test in tests/invariants/.Both touch k8s/devops/configmap.example.yaml and the deploy-stack mechanism, but #1231 generates the ConfigMap from active config while this candidate adds a test that validates its keys against Settings.devops-cli-service commentedon Nov 8, 2026
Released in v0.87.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.87.2
devops-cli-service commentedon Nov 8, 2026
Live since 2026-11-08 05:08 UTC