[quality] test: cover data/milestones.json contract and MILESTONES.md parity (tests/milestones-data.test.mjs) - #235
Open
kubestellar-hive[bot] wants to merge 1 commit into
Open
kubestellar-hive[bot] wants to merge 1 commit into
kubestellar-hive[bot] wants to merge 1 commit into
Conversation
… parity data/milestones.json is consumed by .github/workflows/create-milestones.yml via jq and gh, and restated in MILESTONES.md, but nothing validates either contract. Add tests/milestones-data.test.mjs asserting the shape the workflow depends on (title lookup key, description, issues array, no cross-milestone duplicates) and that MILESTONES.md documents the same milestones, descriptions and issue assignments. Closes #234 Signed-off-by: kubestellar-hive[bot] <kubestellar-hive@hive.kubestellar.io>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
This was referenced Sep 17, 2026
Open
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Test Improvement
Adds one new test-only file,
tests/milestones-data.test.mjs(13 tests). Noproduction code, no workflow, no data and no dependency is touched.
Files claimed by this PR:
tests/milestones-data.test.mjsonly.data/milestones.jsonlanded on 2026-09-16 in 00b44df (#183) with two consumersand no test:
.github/workflows/create-milestones.ymldrivesgh apifrom itvia
jq, andMILESTONES.mdrestates the same plan in prose. This PR assertsboth contracts against the committed data.
Workflow contract (
.github/workflows/create-milestones.yml)milestonesarraytitleis a non-blank string with no tab or newline — the workflowresolves existing milestones with
awk -F '\t' -v title=..., so a tab wouldsplit the lookup key and create a duplicate milestone instead of reusing one
descriptionis a non-blank string —jq -r '.description'prints thestring
nullfor a missing key, which the workflow would post as thedescription
issuesarray of positive safe integers — a missingkey makes
jq -r '.issues[]'fail under the step'sset -euo pipefail,aborting the run after earlier milestones were already created
GitHub allows one milestone per issue, so a second assignment silently
overwrites the first
Doc/data parity (
MILESTONES.md)parseMilestonesDocreads the## Milestone: <title>headings, unwraps each**Description**:paragraph, and collects#<n>references (expanding#41–#43ranges) from the bullet list introduced by aTag ...line. Issuecollection is deliberately scoped to that bullet list: the KubeCon section's
prose mentions #74–#80, which belong to Phase 1, and a document-wide scan would
misattribute them. Titles, order, descriptions and issue assignments are then
compared with the JSON. The parser has its own three unit tests against inline
fixtures, so the parity assertions cannot pass by parsing nothing.
Verification
node --testafternpm ci: 68 tests pass, 0 fail (55 before).npx prettier --check tests/milestones-data.test.mjsis clean.Mutation-checked — the assertions were confirmed to fail, not just pass:
injecting a cross-milestone duplicate issue, a blank description, a deleted
issuesarray, and separately a renamedMILESTONES.mdheading each turned thecorresponding tests red; the working tree was restored afterwards and
git statusis clean apart from the new test file.Deliberately not covered
.github/workflows/create-milestones.ymlitself — its shell/ghlogic is notexercised here, only the data contract it depends on. That is unchanged by this
PR and is out of scope; this agent cannot push workflow files in any case.
Related Issue
Refs #234
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5