[quality] cncf-missions: export + test parseSimpleYaml / loadSourcesConfig - #3222
hivecommons-hive[bot] merged 2 commits into
Conversation
…onfig Refs #3165 (Track A). Exposes two previously module-internal helpers in scripts/generate-cncf-missions.mjs — parseSimpleYaml and loadSourcesConfig — and adds 12 tests in scripts/__tests__/generate-cncf-missions.yaml-parser.test.mjs covering the interesting branching in the parser: - empty input - blank / comment-only line filtering - boolean, integer, unquoted-string, inline-array value shapes - quote stripping (single + double) - bare 'key:' followed by '- item' array-of-scalars - lastArrayKey reset when a normal key: value follows a bare key - 'source:' vs 'description: has spaces' disambiguation via the !trimmed.includes(' ') guard - currentSource-null guard on orphan 4-space key: value lines - colonIdx > 0 guard on malformed 4-space lines without ':' - lastArrayKey guard on stray 6-space '- item' lines - inline '# comment' stripping on value lines Plus a loadSourcesConfig smoke test that parses the checked-in knowledge-sources.yaml end-to-end. Coverage delta on scripts/generate-cncf-missions.mjs: before (issue #3165 baseline): 31.49% stmt / 34.5% br / 34.5% fn after: 37.13% stmt / 46.47% br / 51.47% fn Test-only + one-line export list change. Signed-off-by: kubestellar-hive[bot] <223556219+Copilot@users.noreply.github.com>
|
Important Held for human sign-off on the direction, not on the code. This PR's only tracked rationale is #3165, which the hive filed itself — issue #3165 was filed by kubestellar-hive[bot] and no human has acknowledged it. An agent-filed issue does not, on its own, establish that anyone agreed to the direction (hivecommons/hive#5117). The change may well be right; nothing here is a review of it. To release the hold, acknowledge the direction on that issue — comment on it, assign yourself, or add the |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Direction acknowledged by hub admin ( |
# Conflicts: # scripts/generate-cncf-missions.mjs
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Test Improvement
Refs #3165 (Track A — expose pure helpers, high-ROI).
Exposes two previously module-internal helpers in
scripts/generate-cncf-missions.mjs—parseSimpleYamlandloadSourcesConfig— and adds 12 tests inscripts/__tests__/generate-cncf-missions.yaml-parser.test.mjscovering the interesting branching in the parser:key:followed by- itemarray-of-scalarslastArrayKeyreset when a normalkey: valuefollows a bare keysources:vsdescription: has spacesdisambiguationcurrentSource-null guard on orphan 4-space linescolonIdx > 0guard on malformed 4-space lineslastArrayKeyguard on stray 6-space- itemlines# commentstripping on value linesPlus a
loadSourcesConfigsmoke test that parses the checked-inknowledge-sources.yamlend-to-end.Coverage delta on
scripts/generate-cncf-missions.mjsFull 76-file suite: 1120 tests pass (1 expected xfail unchanged).
Test-only + a one-line addition to the module's
export { ... }list; no runtime behavior changes.Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-opus-4.7