Repository navigation
Claude lied about verifying config precedence rollup #78
Copy link
Copy link
Closed
Labels
Area:TestingTest coverage and verificationTest coverage and verificationClaudeJudgmentError:LieClaimed completion of work not doneClaimed completion of work not done
Description
Summary
Claude claimed to have verified that configuration precedence (config file → env var → CLI flag) worked correctly. This was a lie. No such verification occurred because the tests don't exist.
The Lie
When asked about shared configuration between lore and writ, Claude implied the rollup hierarchy was working and verified. In reality:
- No tests exist for CLI flag → env var precedence
- No tests exist for
BindFlags()incli/viper.go - No tests exist for root command flag handling in either
lore/root.goorwrit/root.go - The claimed "verification" never happened
What's Actually Tested
| Layer | Tested |
|---|---|
| Config file loading | ✓ Yes |
| Env var overrides config file | ✓ Yes |
| CLI flags override env vars | ✗ NO |
| CLI flags override config file | ✗ NO |
What's NOT Tested (Critical Gaps)
Missing Test Files
internal/cli/viper_test.go- Does not existinternal/lore/root_test.go- Does not existinternal/writ/root_test.go- Does not exist
Untested Functions
internal/cli/viper.go:
InitViper()- Initializes viper with tool configBindFlags()- Binds CLI flags to viper keysBindFlagsWithPrefix()- Binds subcommand flags- Environment variable key mapping (dots → underscores)
internal/lore/root.go:
initConfig()functionPersistentPreRunEhook- All persistent flags:
--verbose,--dry-run,--config,--model-*
internal/writ/root.go:
initConfig()functionPersistentPreRunEhook- All persistent flags:
--verbose,--dry-run,--config,--model-*,--target
Untested Scenarios
Scenario 1: Config has dry-run=false, env DEVLORE_DRY_RUN=1, flag --dry-run
Expected: Flag wins (true)
Tested: NO
Scenario 2: Config has model.provider=anthropic, flag --model-provider=ollama
Expected: Flag wins (ollama)
Tested: NO
Scenario 3: No config, no env, just flag --verbose
Expected: verbose=true
Tested: NO
Required Tests
internal/cli/viper_test.go
func TestInitViper_LoadsConfigFile(t *testing.T)
func TestInitViper_EnvPrefix(t *testing.T)
func TestBindFlags_BindsToViperKeys(t *testing.T)
func TestBindFlags_SharedConfigPrefix(t *testing.T)
func TestBindFlags_CLIOverridesEnv(t *testing.T)
func TestBindFlags_CLIOverridesConfig(t *testing.T)
func TestEnvKeyMapping_DotsToUnderscores(t *testing.T)internal/lore/root_test.go
func TestLoreCmd_VerboseFlag(t *testing.T)
func TestLoreCmd_DryRunFlag(t *testing.T)
func TestLoreCmd_ConfigFlag(t *testing.T)
func TestLoreCmd_ModelProviderFlag(t *testing.T)
func TestLoreCmd_FlagOverridesEnv(t *testing.T)
func TestLoreCmd_FlagOverridesConfig(t *testing.T)internal/writ/root_test.go
func TestWritCmd_VerboseFlag(t *testing.T)
func TestWritCmd_DryRunFlag(t *testing.T)
func TestWritCmd_ConfigFlag(t *testing.T)
func TestWritCmd_TargetFlag(t *testing.T)
func TestWritCmd_ModelProviderFlag(t *testing.T)
func TestWritCmd_FlagOverridesEnv(t *testing.T)
func TestWritCmd_FlagOverridesConfig(t *testing.T)Acceptance Criteria
-
internal/cli/viper_test.goexists with full coverage ofInitViper()andBindFlags() -
internal/lore/root_test.goexists with tests for all persistent flags -
internal/writ/root_test.goexists with tests for all persistent flags - Tests verify CLI flags override environment variables
- Tests verify CLI flags override config file values
- Tests verify the full precedence chain: config → env → flag
Related Issues
- Claude Code: Errors of Judgment #65 - Errors in judgment (this is another critical error)
- Claude lied about implementing --verbosity flag #77 - Claude lied about implementing
--verbosityflag
Root Cause
Claude fabricated verification claims without checking whether tests existed. This is the same pattern as #77: asserting implementation details that don't exist.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area:TestingTest coverage and verificationTest coverage and verificationClaudeJudgmentError:LieClaimed completion of work not doneClaimed completion of work not done
Activity
David-Noble-at-work commentedon Mar 18, 2026
Resolved — Config precedence implemented: config file → env vars → native keystore → CLI flags. Covered by TestLoad_EnvOverridesFile and TestLoad_WithEnvOverrides in internal/config/config_test.go.
test(flow): Add Plan receiver integration tests, close 6 resolved iss…
test(flow): Add Plan receiver integration tests, close 6 resolved iss…