Skip to content

docs(openspec): plan #4481 Read a bare off or on as the mode it names - #4599

Closed
devops-cli-service[bot] wants to merge 1 commit into
mainfrom
fix/4481-a-bare-off-or-on-in
Closed

devops-cli-service[bot] wants to merge 1 commit into
mainfrom
fix/4481-a-bare-off-or-on-in

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #4481

A config file that gives roadmap.intake.jev a bare off or on stops the settings load. PyYAML follows YAML 1.1 and reads the value as false or true, and the mode fields accept only off, shadow and on. devops config set writes the same bare value, so the next load fails. roadmap.decisions has the same gap. The change gives the shared mode type one BeforeValidator: false reads as off, true reads as on, and every other value passes to the Literal check. A typed file, the ConfigMap and a written file then load. The reader and the writer keep their behavior, and the intake page states the bare values.

Change: openspec/changes/4481-a-bare-off-or-on-in/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix labels Nov 11, 2026
@devops-cli-service

Copy link
Copy Markdown
Contributor Author

The stage_ready row leaves pull request #4599 a draft. It holds the label plan/needs-fix, because the model review of its plan found an open finding. Fix the plan, or remove the label when the finding is no defect.

@dan-petty

Copy link
Copy Markdown
Owner

Verdict: return the plan.

The premise of #4481 is correct. A bare off or on in a config file stops the settings load. devops config set roadmap.intake.jev off writes that value and then exits 1.

But the plan fixes a symptom in two types. It does not fix the cause. The writer round_trip.edit writes YAML 1.2 (ruamel.yaml). The readers use yaml.safe_load, which reads YAML 1.1 (PyYAML). The same defect occurs for each string setting. For example, devops config set search.language no and devops config set k8s.context 12:30 write the file, exit 1, and stop each later load.

Problems in the plan:

  1. design.md rejects a YAML 1.2 reader because "a new loader changes the value of every other key". This is false. On 5 real config inputs, 0 of 311 values change.
  2. The validator makes jev: true and jev: yes load as on, the live mode. feat(roadmap): a shadow mode for the Jev intake labels #4438 removed the bool with no shim, and ADR 0019 rule 6 says shadow first. The plan has no MODIFIED delta for roadmap-intake-jev, so the scenario "The old bool is refused" becomes false.
  3. Existing Tool Considered names pydantic. It does not name ruamel.yaml, which is pinned and writes the files.
  4. The startup check runs a test with synthetic counts. Use uv run devops ci --only startup-imports.
  5. Tasks 2.1 and 2.2 are the same edit.

The new plan must:

  1. Read each config file with ruamel.yaml YAML(typ="safe"), the library that writes it. Import it lazily. Change all readers: settings.py _read_config_file, write_history.py (2 readers), commands/config.py (audit reader) and k8s/configmap.py (ConfigMap render). Catch the ruamel YAMLError in load_yaml.
  2. Keep JevMode, DecisionMode and the feat(roadmap): a shadow mode for the Jev intake labels #4438 refusal test as they are.
  3. Add tests first for: a bare off and on in a file, roadmap.decisions in a file, config set ... off with exit code 0, config set search.language no, config set k8s.context 12:30, and the ConfigMap render.
  4. Record in Feasibility the cost (about 29 modules and 16-25 ms for each command that loads settings) and the values that change: a typed 0755 loads 755, a typed 1:30 float is refused, and a duplicate key raises an error.
  5. Record the PyYAML resolver subclass as the fallback if the owner refuses that cost, and the true reason against each rejected option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/openspec OpenSpec changes, specs and their checks type/docs Type docs: a change to the documents verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant