test: assert docs/configuration.md defaults, field tables and probe order against config.ts and the plugin resolvers - #258
Merged
Conversation
…rder against config.ts and the plugin resolvers Adds __tests__/configurationDocs.test.ts. It parses the prow.yaml example of docs/configuration.md with parseProwConfig and checks the sections the document flags as defaults against resolveTide, resolveHoldLabel, approveSettings, lgtmSettings and defaultSweepLookback; checks every 'Field | Default | Meaning' table against the keys and values the resolvers produce (blunderbussSettings included); and checks the tier table and its quoted error against orgConfigRepos, orgConfigPath and repoConfigPaths. Closes #257 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. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
Member
|
/kind cleanup |
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
__tests__/configurationDocs.test.ts(new file only; nothing undersrc/,docs/or.github/changes). It readsdocs/configuration.mdand asserts, in three blocks:prow.yamlexampleparseProwConfigas the new form and its key set equalsmergeProwConfig({}, {})'stide,hold,approve,lgtmandsweepsections — the ones the document annotates "these are the defaults" — deep-equalresolveTide({}, ''),{ label: resolveHoldLabel({}) },approveSettings,lgtmSettingsand{ lookback: defaultSweepLookback }for an empty config[lgtm, approved]=defaultOwnersTideLabels, andresolveTide({}, '', { hasOwners: true })agreessection tables (
tide,hold,blunderbuss,approve,lgtm,sweep)### \key`heading perProwConfigsection plusowners-label` ("No configuration")Field | Default | Meaningtable lists exactly the keys the resolver produces (blunderbussSettingsincluded)unset↔undefined(max_request_count)where configuration lives
orgConfigReposin order andorgConfigPath.yamlhalf ofrepoConfigPathsin order, andrepoConfigPathsis that list followed by its.ymlspellingsno prow configuration found: …error equals whatgetLabelConfigcomposes for<owner>/<repo>Mutation-checked on
main@ c48bd6d:merge_method: merge → squashin the example,ignore_draftsdefaulttrue → falsein the table, andbind_to_commit → bind_to_commitseach turn tests red; so doesignore_drafts ?? true → ?? falseinsrc/plugins/blunderbuss.ts.npx vitest run→ 70 files / 1472 tests pass;npx eslint __tests__/configurationDocs.test.tsclean.Cluster:
docs/configuration.md↔src/utils/config.ts(resolveTide,resolveHoldLabel,resolveSweepLookback,repoConfigPaths,orgConfigRepos),src/plugins/{approve,blunderbuss,lgtmBinding}.tssettings resolvers. Disjoint from every open hold-gated PR: #254 holdsdocs/commands.md↔ dispatcher (__tests__/commands.test.ts), #256 holds.github/prow.yaml(__tests__/dogfoodConfig.test.ts), #232 holds__tests__/workflows.test.ts, #229 holds__tests__/utils/configSweep.test.ts(normalizeSweepbranches). No open PR touchesdocs/configuration.md.Related Issue
Closes #257
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88