Skip to content

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

Description

@hivecommons-hive

Finding

docs/configuration.md is the reference users copy from. It states, in three places, facts that live as code elsewhere, and nothing in __tests__/ reads the file:

  1. The ## prow.yaml example annotates tide, hold, approve, lgtm and sweep with "these are the defaults" / "this is the default". The defaults it spells out are decided by resolveTide / resolveHoldLabel / defaultSweepLookback (src/utils/config.ts), approveSettings (src/plugins/approve.ts), blunderbussSettings (src/plugins/blunderbuss.ts) and lgtmSettings (src/plugins/lgtmBinding.ts).
  2. Each ### \section`carries aField | Default | Meaning` table. The field set and the Default column restate the same resolvers.
  3. ## Where configuration lives lists the organization repositories, the repository probe paths in order, and quotes verbatim the no prow configuration found: … error that getLabelConfig (src/utils/labeling.ts:30-35) composes from orgConfigRepos, orgConfigPath and repoConfigPaths.

Changing any of those defaults or paths in code leaves the document silently wrong. By contrast docs/commands.md (#254), templates/prow.yaml and the starter workflows (__tests__/workflows.test.ts) already have doc↔code tests.

Evidence, main @ c48bd6d: grep -rn "docs/configuration" __tests__ → no matches. Unit coverage of the resolvers themselves is complete (npx vitest run --coverage: config.ts 100% lines, plugins 100% lines) — this is a documentation-consistency gap, not a line-coverage gap, so no coverage-gap priority applies.

Recommendation

Add __tests__/configurationDocs.test.ts that:

  • parses the ## prow.yaml example with parseProwConfig and asserts its key set equals mergeProwConfig({}, {})'s, and that the five sections flagged as defaults deep-equal the resolver output for an empty config
  • for every Field | Default | Meaning table, asserts the field names equal the keys of the resolved settings object and that a backticked literal in the Default cell parses (as YAML) to the code default (unset ↔ undefined)
  • asserts the tier table's organization repos and repository paths equal orgConfigRepos / repoConfigPaths (.yaml spellings first, .yml after) and that the quoted error string is exactly what getLabelConfig builds for <owner>/<repo>

Priority

  • Impact: medium — user-facing reference drifts silently from code
  • Effort: low — one new test file, no source changes

🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: c48bd6d

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenancehive/hosted-available-lke648397-260827-5q9tCreated by Hive for agent-filed issue provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationneeds-kindqualityCreated by Hive for agent-filed issue provenancetestingCreated by Hive for agent-filed issue provenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions