Skip to content

config: codegen the review.fields doc block instead of 7 hand-synced copies #6070

Description

@JSONbored

Part of #6065.

Problem

The review.fields key list (linkedIssue | relatedWork | reviewLoad | validationEvidence | openPrQueue | contributorContext | gateResult | improvementSignal) is hand-copied in 7 places: the real source (REVIEW_FIELD_KEYS, packages/loopover-engine/src/focus-manifest.ts:485), .loopover.yml.example, config/examples/loopover.full.yml, .loopover.yml (this repo's own live config), src/config/loopover-repo-focus-manifest.ts (bundled fallback), CONTRIBUTING.md, and a hardcoded array in test/unit/signals-coverage.test.ts.

5 of the 7 are guarded by existing sync tests. 2 are NOT guarded at all -- CONTRIBUTING.md and the signals-coverage.test.ts array -- and CONTRIBUTING.md's copy is already stale (missing improvementSignal).

Proposed fix

  • Add scripts/gen-review-fields-doc.mjs, mirroring the existing scripts/gen-cf-typegen.mjs / scripts/write-ui-openapi.ts generate+--check pattern already used in this repo (see npm run cf-typegen / cf-typegen:check, npm run ui:openapi / ui:openapi:check).
  • Generate the "Keys: ..." doc-comment line (and ideally the CONTRIBUTING.md prose list) FROM the single REVIEW_FIELD_KEYS TS constant, not by hand.
  • Add a review-fields-doc:check step wired into npm run test:ci (same pattern as the other :check scripts already chained there).
  • Fix test/unit/signals-coverage.test.ts to import REVIEW_FIELD_KEYS directly instead of a separately hardcoded array.
  • Fix CONTRIBUTING.md's stale list (missing improvementSignal) as part of the same PR.

Files

  • scripts/gen-review-fields-doc.mjs (new)
  • package.json (new script entries + test:ci wiring)
  • .loopover.yml.example, config/examples/loopover.full.yml, .loopover.yml, src/config/loopover-repo-focus-manifest.ts, CONTRIBUTING.md (regenerated, not hand-edited, once the script exists)
  • test/unit/signals-coverage.test.ts

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.orbGittensory Orb related - maintainer self-hosting analytics.roadmapOn the Wave-2 agent-layer roadmap board (project 9)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions