Skip to content

feat(selfhost): config-lint helper that surfaces .gittensory.yml parse warnings with friendly messages #2079

Description

@JSONbored

parseFocusManifestContent (src/signals/focus-manifest.ts:1043) silently degrades a broken config to an empty manifest with a warnings[] array — an operator whose private per-repo config (src/selfhost/private-config.ts) has a YAML typo gets deterministic-only reviews and never knows why. Add a pure lintManifestText(text): {ok, warnings[], summary} helper that runs the existing parser and formats its warnings into an operator-facing report (valid-YAML-but-no-fields, oversize, malformed, unknown top-level keys). No new parser — reuse the existing one.

Deliverables

  • Add lintManifestText in a new src/selfhost/config-lint.ts that calls parseFocusManifestContent and returns {ok:boolean, warnings:string[], recognizedFields:string[]}
  • Detect and warn on unknown top-level keys by diffing parsed object keys against the recognized set
  • ok=true only when warnings is empty AND at least one recognized focus field was parsed
  • Do NOT emit or echo any values from the config (paths/labels are policy) — report field NAMES only
  • Unit tests: valid config (ok), malformed YAML, oversize, empty-but-valid, unknown-key warning — cover both arms of the ok condition

References

  • src/signals/focus-manifest.ts:1043
  • src/signals/focus-manifest.ts:1015
  • src/selfhost/private-config.ts:69

size: M · gittensor:feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions