@@ -306,9 +306,15 @@ def status_code_array_or_range(default=None):
306306 # Other server-set / non-Settings-class objects on the tree.
307307 "entity_guid" , # server-assigned at connect
308308 "attribute_filter" , # AttributeFilter instance, not a config value
309+ # Internal-only QA / debug toggles. Surfacing these as customer-tunable
310+ # would let an end user disable TLS validation, suppress harvests, swap
311+ # logging payloads, etc. -- all of which are support / development
312+ # affordances, not configuration.
313+ "developer_mode" ,
309314 # Subtree exclusions (use `.*` suffix).
310315 "cross_application_tracer.*" , # legacy, replaced by distributed tracing
311316 "process_host.*" , # platform-derived (ip_address, display_name, etc.)
317+ "debug.*" , # internal QA toggles (cert-validation off-switch, verbose log dumps, etc.)
312318}
313319
314320
@@ -609,10 +615,29 @@ def generate_schema(settings, descriptions, exclude_keys=None, enum_overrides=No
609615
610616# ---------------------------------------------------------------------------
611617# Schema merge -- deep-merges a freshly generated schema into the existing
612- # one so the published schema only ever grows.
618+ # one so the published schema only ever grows for forward-compatibility
619+ # purposes.
620+ #
621+ # Caveat: the "only ever grows" promise does NOT extend to keys that the
622+ # current generator deliberately excludes via EXCLUDE_KEYS. Filtering those
623+ # out of the old schema before merge guarantees that newly-added exclusions
624+ # actually take effect on the next regeneration, instead of being silently
625+ # resurrected from the prior on-disk schema.
613626# ---------------------------------------------------------------------------
614627
615628
629+ def filter_excluded (schema , exclude_keys ):
630+ """Return a copy of `schema` with any properties whose dotted path
631+ matches `exclude_keys` removed. Operates on flat top-level property
632+ paths only -- mirrors how is_excluded is used in build_properties.
633+ """
634+ if not schema or "properties" not in schema :
635+ return schema
636+ filtered = dict (schema )
637+ filtered ["properties" ] = {k : v for k , v in schema ["properties" ].items () if not is_excluded (k , exclude_keys )}
638+ return filtered
639+
640+
616641def merge_schemas (old_s , new_s ):
617642 if not old_s :
618643 return new_s
@@ -714,7 +739,12 @@ def main(argv=None):
714739 generated = generate_schema (settings , descriptions )
715740
716741 old_schema = {} if args .force else load_existing (SCHEMA_PATH )
717- new_schema = merge_schemas (old_schema , generated )
742+ # Drop excluded paths from the prior schema before merging so newly-added
743+ # entries in EXCLUDE_KEYS take effect instead of being preserved by the
744+ # "schema only ever grows" merge. Keep the original around so the diff
745+ # classifier can still surface those removals to reviewers.
746+ filtered_old_schema = filter_excluded (old_schema , EXCLUDE_KEYS )
747+ new_schema = merge_schemas (filtered_old_schema , generated )
718748
719749 validate_meta_schema (new_schema )
720750
0 commit comments