Skip to content

test: assert docs/configuration.md defaults, field tables and probe order against config.ts and the plugin resolvers - #258

Merged
github-actions[bot] merged 1 commit into
mainfrom
quality/test-configuration-docs
Oct 2, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
quality/test-configuration-docs

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds __tests__/configurationDocs.test.ts (new file only; nothing under src/, docs/ or .github/ changes). It reads docs/configuration.md and asserts, in three blocks:

prow.yaml example

  • parses with parseProwConfig as the new form and its key set equals mergeProwConfig({}, {})'s
  • the tide, hold, approve, lgtm and sweep sections — the ones the document annotates "these are the defaults" — deep-equal resolveTide({}, ''), { label: resolveHoldLabel({}) }, approveSettings, lgtmSettings and { lookback: defaultSweepLookback } for an empty config
  • the merge-gate comment names [lgtm, approved] = defaultOwnersTideLabels, and resolveTide({}, '', { hasOwners: true }) agrees

section tables (tide, hold, blunderbuss, approve, lgtm, sweep)

  • one ### \key`heading perProwConfigsection plusowners-label` ("No configuration")
  • each Field | Default | Meaning table lists exactly the keys the resolver produces (blunderbussSettings included)
  • a backticked literal in every Default cell YAML-parses to the code default; unset ↔ undefined (max_request_count)

where configuration lives

  • the Organization row names orgConfigRepos in order and orgConfigPath
  • the Repository row lists the .yaml half of repoConfigPaths in order, and repoConfigPaths is that list followed by its .yml spellings
  • the quoted no prow configuration found: … error equals what getLabelConfig composes for <owner>/<repo>

Mutation-checked on main @ c48bd6d: merge_method: merge → squash in the example, ignore_drafts default true → false in the table, and bind_to_commit → bind_to_commits each turn tests red; so does ignore_drafts ?? true → ?? false in src/plugins/blunderbuss.ts. npx vitest run → 70 files / 1472 tests pass; npx eslint __tests__/configurationDocs.test.ts clean.

Cluster: docs/configuration.md ↔ src/utils/config.ts (resolveTide, resolveHoldLabel, resolveSweepLookback, repoConfigPaths, orgConfigRepos), src/plugins/{approve,blunderbuss,lgtmBinding}.ts settings resolvers. Disjoint from every open hold-gated PR: #254 holds docs/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 (normalizeSweep branches). No open PR touches docs/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

…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>
@hivecommons-hive
hivecommons-hive Bot requested a review from jpmcb as a code owner October 1, 2026 07:37
@hivecommons-hive hivecommons-hive Bot added the hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 1, 2026
@hivecommons-hive

Copy link
Copy Markdown
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 outreach agent is always held because it publishes project-facing communication.

Hive will automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@jeefy

jeefy commented Oct 2, 2026

Copy link
Copy Markdown
Member

/kind cleanup
/lgtm
/approve
/hold cancel

@github-actions github-actions Bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 2, 2026
@github-actions
github-actions Bot merged commit f9fad46 into main Oct 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] docs/configuration.md defaults, field tables and probe order are never asserted against src/utils/config.ts and the plugin resolvers

1 participant