Skip to content

Decide whether env-var negation, env aliases, and per-field provenance belong in reflect-cpp or app layer #97

Done

Description

@clockblocker

Question

Where should the product/scope boundary sit between reflect-cpp core (rfl::env / read_into) and application-layer code for environment-variable negation prefixes (CCACHE_NO*), env-var aliases, directory-config layering policies, and per-field origin provenance?

Evidence & Context

  • Parent map: Map (Lane 2): JSON / RPC & Format Interop
  • ccache#2: Needed CCACHE_NO* boolean negation, environment-variable aliases, directory-config precedence policies, and per-field origin provenance tracked in ConfigMeta over rfl::view_t<ConfigData>.
  • This is a product/scope boundary decision (not a technical micro-design call): keeping these in the app layer preserves a lean reflect-cpp core (possibly with minimal reflection/overlay hooks), whereas baking them into rfl::env / read_into expands library scope and maintenance surface.

Decision Needed

Decide via short HITL grilling:

  1. Keep env negation, env aliases, and provenance in the app layer (and document the rfl::view_t / overlay pattern), OR
  2. Add lightweight generic hooks (e.g., per-field write callback / alias hook in read_into / rfl::env), OR
  3. Support first-class env negation/alias/provenance primitives in reflect-cpp.

Activity

  1. added
    wayfinder:grilling
    on Nov 27, 2026
  2. clockblocker commented on Nov 27, 2026

    @clockblocker
    OwnerAuthor

    Delta from ccache#2: Also consider two smaller companion primitives in this scope boundary decision:

    • rfl::env global prefix (e.g., CCACHE_) so callers do not need to repeat the prefix on every field.
    • Runtime field lookup/dispatch (rfl::get_field_by_name / rfl::visit_field) to eliminate boilerplate when mapping dynamic config keys / provenance metadata onto reflected fields.
  3. clockblocker commented on Nov 27, 2026

    @clockblocker
    OwnerAuthor

    Ruled out of scope for this effort. ccache#2 proved that bespoke INI + CCACHE_NO* boolean env-negation + per-field origin provenance + directory-config policies are application-layer config-engine concerns where reflect-cpp is structurally a poor fit (net +253 LoC and 101 MiB Debug .o). We are harvesting the general core/schema/perf gaps ccache#2 surfaced (#90, #91, #92, #93, #100, #101, #113) while keeping env-negation/provenance config engines out of reflect-cpp.

  4. clockblocker commented on Nov 27, 2026

    @clockblocker
    OwnerAuthor

    PR #81 (read-into-overlay) Scope Boundary Note: Per review recommendation on PR #81, #81 stays bounded to json, yaml, toml, and generic (rfl::toml::read_into / load_into included), while rfl::env::read_into and rfl::cli::read_into are deferred to a separate follow-up PR — making them clean candidates to align with this #97 scope decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:grilling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions