Document explicit config selection decision (#289)#328
Conversation
Record the decision to keep explicit config path selection in `config_merge.rs` rather than moving Netsuke-specific selector policy into OrthoConfig. Update the completed 3.11.3 ExecPlan so the recorded helper signatures match the implemented generic environment lookup and diagnostic-layer error result.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Reviewer's GuideDocuments and clarifies Netsuke’s explicit configuration selection policy by adding an ADR and updating the existing exec plan to reflect the final helper signatures and error-propagation behavior for config-path resolution and diagnostic layer collection. Sequence diagram for diagnostic layer collection with explicit configsequenceDiagram
participant Cli
participant ConfigMerge
participant FileSystem
participant OrthoConfig
participant Diagnostics
Cli->>ConfigMerge: collect_diag_file_layers
ConfigMerge->>ConfigMerge: resolve_config_path
alt explicit path resolved
ConfigMerge->>FileSystem: load_layers_from_path
alt load_layers_from_path ok
FileSystem-->>ConfigMerge: Vec MergeLayer
ConfigMerge-->>Cli: OrthoResult Vec MergeLayer
else load_layers_from_path error
FileSystem-->>ConfigMerge: OrthoError
ConfigMerge-->>Diagnostics: push_layers_result
ConfigMerge-->>Cli: OrthoResult error
end
else no explicit path
ConfigMerge->>OrthoConfig: config_discovery
OrthoConfig-->>ConfigMerge: first_pass_layers
ConfigMerge->>OrthoConfig: project_scope_layers
alt project_scope_layers ok
OrthoConfig-->>ConfigMerge: project_layers
ConfigMerge-->>Cli: OrthoResult Vec MergeLayer
else project_scope_layers error
OrthoConfig-->>ConfigMerge: OrthoError
ConfigMerge-->>Cli: OrthoResult error
end
end
Flow diagram for explicit config selection in config_merge.rsflowchart TD
A[Start resolve_config_path] --> B[cli.config present?]
B -- yes --> C[Use cli.config]
B -- no --> D[env_config_path NETSUKE_CONFIG]
D -- found --> E[Use NETSUKE_CONFIG path]
D -- not found --> F[env_config_path NETSUKE_CONFIG_PATH]
F -- found --> G[Use NETSUKE_CONFIG_PATH path]
F -- not found --> H[No explicit config path]
C --> I[Return Some PathBuf]
E --> I
G --> I
H --> J[Return None]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary
This branch documents the Netsuke-owned explicit configuration selection policy raised in issue #289.
Closes #289.
ExecPlan: docs/execplans/3-11-3-expose-config-path-and-netsuke-config.md
Review walkthrough
config_merge.rsrather than OrthoConfig.Validation
markdownlint docs/adr-004-explicit-config-selection-outside-orthoconfig.md docs/execplans/3-11-3-expose-config-path-and-netsuke-config.md: passmake markdownlint: passmake nixie: passmake check-fmt: passcoderabbit review --agent: pass, zero findingsSummary by Sourcery
Document the decision and behavior for explicit configuration file selection in Netsuke and align the exec plan with the current helper signatures and error propagation semantics.
Documentation:
config_merge.rsinstead of OrthoConfig and detailing selector precedence and failure semantics.resolve_config_pathand the error-propagating behavior ofcollect_diag_file_layers.