Repository navigation
test(docs): parse every prow.yaml and OWNERS example in the guides against the config and OWNERS parsers - #501
Open
hivecommons-hive[bot] wants to merge 1 commit into
Open
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
configurationDocs.test.ts holds the docs/configuration.md example to the parser; the 19 prow.yaml and 7 OWNERS blocks in the other guides were never read by a test. parseProwConfig only debug-logs an unknown top-level key and the section normalizers strip unknown fields, so a typo'd example would be accepted silently. docsYamlExamples.test.ts extracts every fenced yaml block from README.md and docs/ (bar docs/releases/), classifies it as workflow, OWNERS or prow.yaml, and feeds the latter two to parseOwners and parseProwConfig plus the section resolvers, rejecting any key or field the code would ignore. Signed-off-by: quality <quality@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. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
Contributor
|
Please add a kind label with |
This was referenced Oct 17, 2026
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
Files claimed:
__tests__/docsYamlExamples.test.ts(new, test-only). ReadsREADME.mdanddocs/**/*.md(bardocs/releases/) and callssrc/utils/config.ts(parseProwConfig,mergeProwConfig,resolveTide,resolveHoldLabel,resolveSweepLookback,resolveAuthorization,isMapping),src/utils/owners.ts(parseOwners) and theapproveSettings/blunderbussSettings/lgtmSettingsresolvers. Nosrc/,dist/, workflow or docs change. Disjoint from #497 (src/plugins/approve.ts,src/issueComment/meow.ts), #498 (__tests__/bundle/tideOptionalFields.test.ts) and #500 (vitest.config.mjs,docs/contributing.md).configurationDocs.test.tsholds thedocs/configuration.mdexample to the parser and the code's defaults; the 19 prow.yaml and 7 OWNERS blocks in the other guides were never read by any test.parseProwConfigonlycore.debugs an unknown top-level key (config.ts:420-422) and every section normalizerstripUndefineds unknown fields (config.ts:561-567), so a renamed or typo'd documented example would be accepted silently.The new file extracts every fenced
```yamlblock with itsfile:lineand introducing paragraph, classifies it, and asserts:- uses: …)# …OWNERSleading comment, since a legacy-form prow.yaml is also a mapping of lists) use only keysparseOwnersreads ordocs/commands.mdlists as accepted-and-ignored, parse, and name at least one approver or reviewerconfigurationDocs.test.tsdoes for the tables), and are accepted by every resolverworkflows.test.tsandversion.test.tsalready hold them to the action and the release36 blocks → 77 cases (74 kind-specific cases skipped by
it.runIf).Verification (local, this branch, main @ 1062ce7)
npx eslint __tests__/docsYamlExamples.test.tsclean;npx tsc --noEmitcleannpm run test:coverage: 158 files / 2193 tests pass (was 157 / 2116 + chore(coverage): raise the unit coverage floor to 99/99/99/99 and fix the documented values #500's); totals unchanged at 100 % lines, 99.7 % branches, 100 % functions, 100 % statementstide.merge_on_event(docs/automatic-merging.md:114) →unknown field 'tide.merge_on_event';aprovers:(docs/commands.md:189) →unknown OWNERS key 'aprovers';require_matching_labels:(docs/labeling.md:173) → parser rejects it as a malformed label section__tests__/bundle) is untouchedRelated Issue
Refs #499 — this lands the folded "prow.yaml and OWNERS examples outside docs/configuration.md are never parsed by a test" finding (comment
hive-finding-foldedon #499, folded there on thedocs/contributing.mdmention). #499 itself is the coverage-floor finding that #500 closes; nothing else of this finding remains after this merges.Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88