You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs(openspec): plan #4481 Read a bare off or on as the mode it names - #4599
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.
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.
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:
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.
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.
Existing Tool Considered names pydantic. It does not name ruamel.yaml, which is pinned and writes the files.
The startup check runs a test with synthetic counts. Use uv run devops ci --only startup-imports.
Tasks 2.1 and 2.2 are the same edit.
The new plan must:
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.
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.
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.
Record the PyYAML resolver subclass as the fallback if the owner refuses that cost, and the true reason against each rejected option.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scope/openspecOpenSpec changes, specs and their checkstype/docsType docs: a change to the documentsverdict/fix-planVerdict Needs fix of a plan: an open finding keeps the plan in draft until a fix
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plans #4481
A config file that gives
roadmap.intake.jeva bareofforonstops the settings load. PyYAML follows YAML 1.1 and reads the value asfalseortrue, and the mode fields accept onlyoff,shadowandon.devops config setwrites the same bare value, so the next load fails.roadmap.decisionshas the same gap. The change gives the shared mode type oneBeforeValidator:falsereads asoff,truereads ason, and every other value passes to theLiteralcheck. 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/