Move the three os-sdlc YAML file readers to the shared loader (ADR-0268) #914
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#914
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
os-sdlc has three YAML file readers and each behaves differently on bad input.
The map loader rescues
Psych::ExceptionintoInvalidMapError.The project config and the rubocop delta report let the raw Psych error out.
ADR-0268 decides one shared loader; this ticket is stage 2.
Approach
Move each reader to
OsSdlc::YamlFile(from ticket A), one at a time, in the order below.Each reader decides what an empty file means.
The delta report keeps
|| {}: the code (delta ||= ... || {}) andclassify, which also returns an empty report when the file is absent, show that an empty delta file means{}.The map loader keeps
InvalidMapErrorby translatingYamlFile::Errorin one rescue, becausecommand/dispatch_commands.rbandreroute/draft.rbbranch on that type and its defect code.String parsing (
parser/handoff_content.rb, the base YAML string in the delta report) stays as it is.Required work:
YamlFile, and keep theHarnessErrorfor an empty file — check: presentYamlFileinplugins/os-sdlc/lib/os_sdlc/adapter/project/config.rbYamlFile, and keep an empty file as{}— check: presentYamlFileinplugins/os-sdlc/lib/os_sdlc/command/rubocop_delta_report.rbYamlFile, and translateYamlFile::ErrorintoInvalidMapErrorin one rescue — check: presentYamlFileinplugins/os-sdlc/lib/os_sdlc/adapter/map/loader.rbYAML.safe_load_filecall from the project config — check: absentYAML.safe_load_fileinplugins/os-sdlc/lib/os_sdlc/adapter/project/config.rbYAML.safe_load(File.readcall from the delta report — check: absentYAML.safe_load(File.readinplugins/os-sdlc/lib/os_sdlc/command/rubocop_delta_report.rbAcceptance criteria
{}as before.HarnessErroras before.InvalidMapErrorwith its defect code as before.plugins/os-sdlc/lib, when searched, then noYAML.safe_load_fileand noYAML.safe_load(File.readremains outside the loader.Owner sketch
Depends on ticket A (the loader).
Origin
Work started on branch ticket-914 through the os-sdlc pipeline.
Resolution
Done: The three os-sdlc YAML file readers (project config, rubocop delta report, map loader) read through OsSdlc::YamlFile. A parse failure names the file. The map loader keeps InvalidMapError by translation. Empty-file behavior is unchanged (ADR-0268 stage 2).
Evidence: Branch ticket-914; os-sdlc implementation 19: 13 dispatches, 1 retry (suite-check failed once, programmer-repair, suite green on the second check in 18.4 s), required-work gate green, contract-auditor pass.
Follow-ups: none; History row added after merge, and a live check that a pipeline command still reads the map after the plugin refresh.