Skip to content

config/profile.yml is never validated — a misspelled key silently does nothing #3981

Description

@abankar1

config/profile.yml steers scoring targets, output language, spend tier, CV format and location policy. Nothing checks its shape.

doctor.mjs checks the file exists (:416-418). Every reader then does profile?.language?.output and takes the fallback when the key is absent — which is indistinguishable from the key being misspelled:

langauge:            # parses cleanly, validates nowhere
  output: ja
spend_teir: premium

Measured: doctor --json reports warnings: [] and no mention of either key. Output comes out in English at the default tier. The user's only signal is noticing the wrong language in finished work.

portals.yml gets validate-portals.mjs. The plugin registry gets validate-plugin-registry.mjs. The one file that decides how every evaluation is scored and what language the output is written in gets nothing.

A related half

profile-language.mjs:15-22 folds three situations into en:

try { ... return normalizeOutputLanguage(profile?.language?.output); }
catch { return DEFAULT_OUTPUT_LANGUAGE; }

No profile, no language key, and a profile that does not parse are indistinguishable to the caller. The first two are correct; the third means a YAML typo anywhere in the file silently produces English.

Note for a fix

The known-key set should be derived from config/profile.example.yml, not hardcoded — a hardcoded roster can only chase the example. Three keys need care: rejection_latency, table_freshness and scan are read by code and are not in the example, so a naive derivation would warn on a correct profile.

PR to follow.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions