Propose customizable configuration layering policy for OrthoConfig#353
Propose customizable configuration layering policy for OrthoConfig#353lodyai[bot] wants to merge 1 commit into
Conversation
Propose a generic file-layer resolution policy API for ortho-config that sits between candidate-path generation and the MergeComposer: a ConfigPathSelector chain (ordered, fail-closed, exclusive selection), AutomaticMode/DiscoveryScope multi-scope stacking, and a replayable FileLayerOutcome produced by a ConfigFilePolicy resolver. Netsuke's hand-rolled src/cli/discovery.rs is the proof case throughout. The draft was stress-tested by the Logisphere design-review panel and revised: env snapshot at resolve time, scalar-only/memoised merged_file_value with explicit None semantics, fold-preserving (not lossless) From lift, single-path suppression gate, scope-tagged errors and an origins() what-loaded trace, #[non_exhaustive] structs with a stability-surface note, a trait-seam alternative (Option D) with the rationale for the declarative form, and a deferred derive policy_hook. Add the RFC to docs/contents.md under a new Requests for comments group. Numbered 0002 because RFC 0001 is reserved on another branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
👮 Files not reviewed due to content moderation or server errors (2)
RFC 0002: Customizable configuration layering policyThis PR introduces RFC 0002, proposing a new, additive runtime API for the Proposed APIThe proposal introduces six new types: The design implements a refined error classification model: fatal Design refinementsThe RFC reflects significant design-review feedback from the Logisphere panel, with key decisions including environment snapshots captured at resolve time; a scalar-only memoised Proof caseNetsuke is mapped throughout as the proof case, with its Delivery planThe work is decomposed into five atomic, dependency-ordered steps: (1) add runtime types with fold-preserving lift and drains; (2) add scoped resolution with suppression and environment snapshotting; (3) add the explicit selector chain; (4) add optional derive attributes ( Changes
The change is purely additive documentation; no library code changes are included. All new items reside in WalkthroughAdds RFC 0002 ( ChangesRFC 0002: Customisable Config Layering Policy
🚥 Pre-merge checks | ✅ 20✅ Passed checks (20 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
This branch adds RFC 0002, which proposes a generic file-layer resolution
policy API for the
ortho-configcrate. The proposed API sits betweencandidate-path generation and the
MergeComposer, giving downstreamapplications a native way to express ordered, fail-closed explicit selection
and multi-scope stacking without baking any application-specific names into
the library. The
leynos/netsukebuild tool, whosesrc/cli/discovery.rshand-rolls this policy today, serves as the proof case throughout.
This pull request carries a proposed, not yet accepted, design. The RFC is the
artefact under review; no library code changes on this branch.
Review walkthrough
for the problem statement, the current OrthoConfig and Netsuke behaviour, and
the proposed runtime surface:
ConfigPathSelector,ExplicitMode,AutomaticModewithDiscoveryScope,ConfigFilePolicy, andFileLayerOutcome.file-layer error policy
for the suppression-gate semantics and the absent-versus-invalid error
classification, then the
alternatives considered
for the rejected trait-seam shape and the Figment-reuse decision.
contents index entry
for the new "Requests for comments (RFCs)" group.
Design process
The design was developed with an agent design team, stress-tested by the
Logisphere design-review panel across six lenses, and revised in response. The
notable revisions include snapshotting the environment at resolve time, a
scalar-only memoised
merged_file_value, a fold-preserving (not lossless)Fromlift, anorigins()provenance trace,#[non_exhaustive]structs witha stability-surface note, and a deferred derive
policy_hook. The RFC isnumbered 0002 because RFC 0001 is reserved on another branch.
Validation
make markdownlint: 61 files, 0 errors.make nixie: all Mermaid diagrams validated.References