Skip to content

fix(manifest): parse flow-style YAML maps instead of dropping them#69

Merged
dndungu merged 1 commit into
mainfrom
fix/issue-66-flow-maps
Jul 10, 2026
Merged

fix(manifest): parse flow-style YAML maps instead of dropping them#69
dndungu merged 1 commit into
mainfrom
fix/issue-66-flow-maps

Conversation

@dndungu

@dndungu dndungu commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Problem (#66)

The parser handled flow-style lists but not flow-style maps: limits: { cpu: "1", memory: 512Mi } became a scalar string, getMap returned nil, and the pod was admitted with zero requests — the #43 overcommit class through yet another door. Live evidence during #53 verification: the flow-style pod ran with allocated: 0/0; its block-style twin allocated 1000/512.

Fix

Testing

Unit: flow map basics, empty, nesting, colon-bearing values, malformed inputs, nested flow lists, flow map as list item. End-to-end: the live repro (flow-style limits → 1000m/512MB accounted), the #42 runbook shape, malformed map → parse error. Full suite -race green, vet + staticcheck clean.

Live acceptance after deploy: the exact #66 repro manifest must show allocated: {cpuMillis: 1000, memoryMB: 512}.

Closes #66

A flow-style map value like limits: { cpu: "1", memory: 512Mi } was
parsed as a scalar string, so getMap returned nil and the container's
resources were silently zero — the pod was admitted with no accounting,
reopening the overcommit class from #43 for any manifest written in
flow style. Found live during #53 verification: the flow-style pod ran
with allocated 0/0 while its block-style twin allocated 1000/512.

parseFlowMap joins parseFlowList on a shared depth-aware item splitter;
flow lists now support nested collections instead of erroring, flow
maps work as map values and list items, and a malformed flow collection
fails the manifest with a 400 rather than becoming a silent default.

Closes #66
@dndungu dndungu merged commit 66df4af into main Jul 10, 2026
1 check passed
@dndungu dndungu deleted the fix/issue-66-flow-maps branch July 10, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flow-style YAML maps (resources: { cpu: "1", memory: 512Mi }) are silently dropped — pod admitted with zero requests

1 participant