Repository navigation
Consolidate config types into internal/config package - #69
Merged
Merged
Conversation
added 3 commits
February 5, 2026 20:54
Centralize config so both lore and writ consume it from the same place. Changes: - New internal/config/ package with Config, ModelConfig, RegistryConfig, LoreConfig, WritConfig types - Single Verbosity field (quiet/normal/verbose) replaces separate verbose and quiet booleans - rclone-style environment variable naming: DEVLORE_ + config path (e.g., DEVLORE_MODEL_NAME instead of DEVLORE_MODEL) - Delete duplicate loaders: model.LoadConfig/SaveConfig removed, all callers use config.Load/Save - Delete lorepackage.NewDefault(), callers use NewRegistry() - Comprehensive test coverage for config package (10 tests) Environment variables: - DEVLORE_VERBOSITY (quiet/normal/verbose) - DEVLORE_DRY_RUN - DEVLORE_MODEL_PROVIDER, DEVLORE_MODEL_NAME, DEVLORE_MODEL_ENDPOINT, DEVLORE_MODEL_API_KEY - DEVLORE_REGISTRY_URL, DEVLORE_REGISTRY_BRANCH Closes #67
Adds test file internal/cli/config_test.go with tests verifying that both lore and writ read from the same shared config file and display identical output for 'config list'. Tests cover: - Shared config path consistency - Visibility of shared settings (model, registry, verbosity) - Visibility of tool-specific settings (lore.*, writ.*) - Config set/unset operations for all paths - Edge cases (empty file, directory creation) Part of #67 config consolidation.
18 tasks done
David-Noble-at-work
added a commit
that referenced
this pull request
Jul 28, 2026
… the stated mechanism (#302) The #300 live proof cut both ways: the --admin merge worked (site PR #211, merged by the app with checks pending and zero reviews), then the very next run's merge died on a GitHub 502 and stranded site PR #212 open with green checks. All three sync merges (docs, install script, registry knowledge) now run in a bounded retry loop — 5 attempts, 10/20/30/40s backoff — that consults the PR state before retrying, since a 5xx can arrive after the merge landed server-side. The registry merge also gains --admin: devlore-registry develop sits under the same org ruleset, and the plain merge already failed live — registry PR #69 was app-created, its Knowledge Extract run failed on the merge step, and the PR was merged by hand two minutes later. Comments corrected: --admin disarms gh's client-side merge-state veto; the server-side entitlement is the automation app's "always" bypass on the org ruleset, not repository admin rights. Correction noted in docs/plans/ci-admin-merge-sync-prs.md. Workflow-only change; the live proof is the next sync chain run. Plan: docs/plans/ci-sync-merge-retry.md. Co-authored-by: David Noble <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/config/package so bothloreandwritconsume config from the same placeloreandwritkeysDEVLORE_+ config path, uppercase, underscoresverbosityfield with valuesquiet,normal,verbose(replaces separate verbose/quiet bools)Config Package Structure
Unified Config Verification
Tests in
internal/cli/config_test.goverify thatlore config listandwrit config listshow the same unified config:TestSharedConfigPath- Both tools use same config pathTestUnifiedConfig_BothToolsSeeSharedSettings- Shared settings visible to bothTestUnifiedConfig_ToolSpecificSettingsVisible- Tool-specific settings accessibleTestConfigListOutput_SameForBothTools- Identical output from both toolsTest plan
go test ./...passeslore config listandwrit config listuse shared config pathCloses #67