Repository navigation
Every DEVLORE_ setting is in the config system, and nothing reads a DEVLORE_ variable by hand #1026
Copy link
Copy link
Open
Labels
Epic:UnifiedConfigurationUnified configurationUnified configurationPriority:P1This cycleThis cycletaskImplementation work itemImplementation work item
Description
Every DEVLORE_ variable a program reads is the environment layer of a global setting in the config system, resolved by the one chain (default, configuration file, environment variable, flag), its name given by #927's rule: a global setting's variable is DEVLORE_ plus its key. No code reads a DEVLORE_ variable by hand.
Ruled 2026-10-03
Offered a lane 8 warning that skipped DEVLORE_ names because several are read outside the config system, the owner: "EVERY ONE of the DEVLORE_ settings must be in config. add that task to lane 8."
Every DEVLORE_ setting
Read at 6f4d62fa:
| Setting | Variable | Read today | In config |
|---|---|---|---|
dry_run |
DEVLORE_DRY_RUN |
by hand (cmd/internal/config/config.go:128); --dry-run binds <program>.dry-run |
the global dry_run, which --dry-run binds (#1011) |
verbosity |
DEVLORE_VERBOSITY |
by hand (config.go:125); --verbose binds <program>.verbose |
the global setting; how --verbose maps to it is the plan's |
model.provider, .name, .endpoint, .api_key |
DEVLORE_MODEL_* |
by hand (config.go:133-142); lore also reads lore.model.* through viper; the --model-* flags bind <program>.model-* |
the global model section, which the --model-* flags bind (#1010) |
registry.url, registry.branch |
DEVLORE_REGISTRY_URL, DEVLORE_REGISTRY_BRANCH |
by hand (config.go:147-150) |
the global registry section |
registry.force_tags, secrets.*, self.channel, self.prerelease |
DEVLORE_REGISTRY_FORCE_TAGS, DEVLORE_SECRETS_*, DEVLORE_SELF_* |
documented; self.* is read through each program's viper, so its variable is <PREFIX>_SELF_CHANNEL, not DEVLORE_SELF_CHANNEL |
the global sections |
| the pager | DEVLORE_PAGER |
by hand (cmd/internal/cli/pager.go:94), ahead of <program>.pager |
a global pager setting, with PAGER its last resort |
| the upgrade pin | DEVLORE_VERSION |
by hand (cmd/internal/cli/selfupgrade_channel.go:200) |
a global version setting, whose variable is DEVLORE_VERSION by the rule |
| devlore-index's registry | DEVLORE_REGISTRY |
by hand (cmd/devlore-index/main.go:148) |
a setting of the registry section; its key is the plan's |
| the installers' layers, tools and version | DEVLORE_BASE, DEVLORE_TEAM, DEVLORE_PERSONAL, DEVLORE_TOOLS, DEVLORE_VERSION |
install.sh and install.ps1, before any program is installed |
open question 1 |
What changes
- The shared root binds its flags to the global settings, and every program reads the global settings through the config system, which supplies their
DEVLORE_variables by the naming rule.applyEnvOverrides, thelore.model.*reads, and every hand read of aDEVLORE_variable go. - That is the substance of The model flags never reach lore onboard: the model settings are global, and a flag must override the environment and the file #1010 (the model settings are global) and Flag-bound settings keep the flag's hyphen: --dry-run binds dry-run, and the documented dry_run is never read #1011 (a flag's setting keeps no hyphen); both are done in lane 8 with this issue. Every value a program reads from the user comes from the config system #1025 keeps the hand reads that are not
DEVLORE_variables. - The environment prefix is doubled: WRIT_WRIT_VERBOSE works and WRIT_VERBOSE does not; the variable is the prefix plus the bare key, for every program #927's warning (lane 8) then checks
DEVLORE_names against the config system exactly, as it does the programs' own prefixes.
Acceptance
- Every row above reads through the config system, its variable named by the rule.
- No code reads a
DEVLORE_variable by hand; Every value a program reads from the user comes from the config system #1025's guard enforces it. - A global flag (
--dry-run,--verbose,--model-*and the shared root's others) overrides itsDEVLORE_<KEY>, which overrides the file. - The design pages and the generated reference name each global setting's variable.
Open questions
- The installers' variables.
install.shandinstall.ps1readDEVLORE_BASE,DEVLORE_TEAM,DEVLORE_PERSONAL,DEVLORE_TOOLSandDEVLORE_VERSIONbefore any program is installed, and so before the config system exists. What does "in config" mean for them?
Related
#927 (the naming rule, the warning; lane 8), #1010, #1011, #1025, #1022.
Plan and design documents
| Kind | Document |
|---|---|
| Plan | docs/plans/fix/927-env-prefix-doubled.md, lane 8 |
| Design | docs/architecture/configuration.md |
Epic: #441 · Feature: #456 · Schedule: #916, lane 43, PR C, in lane 8
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Epic:UnifiedConfigurationUnified configurationUnified configurationPriority:P1This cycleThis cycletaskImplementation work itemImplementation work item
Activity
docs(plan): lane 8 puts every DEVLORE_ setting in the config system (#…