Skip to content

StructuredConfigReader First Slice — Define and Access Variables, Basic Telemetry#4

Merged
prachigauriar merged 33 commits intomainfrom
duncan/structured-config-reader
Feb 17, 2026
Merged

StructuredConfigReader First Slice — Define and Access Variables, Basic Telemetry#4
prachigauriar merged 33 commits intomainfrom
duncan/structured-config-reader

Conversation

@duncan-daydream
Copy link
Copy Markdown
Collaborator

@duncan-daydream duncan-daydream commented Jan 8, 2026

  • Add ConfigVariable, a type-safe wrapper for configuration
    variables that packages key, default value, and VariableSecrecy
    in a single type
  • Add ConfigVariableReader, wrapping swift-configuration's
    ConfigReader with type-safe access, secrecy-aware queries, and
    always-return semantics that return default values on error.
  • Add EventBusAccessReporter, a standard access reporter that
    posts configuration access events to EventBus:
    • ConfigVariableAccessSucceededEvent: Posted on successful access
      with key, value, and providerName
    • ConfigVariableAccessFailedEvent: Posted on resolution failure
      with key and error

Dfowj and others added 28 commits January 6, 2026 10:31
- DidAccessVariableBusEvent: posted when a variable is successfully accessed
- DidFailToAccessVariableBusEvent: posted when a variable can't be found (.success(nil)) or if an error is raised when querying providers (.failure(error))
- Use the convenience initializer w/ EventBus parameter to get the standard TelemetryAccessReporter
- Use the primary initializer to pass an access reporter type directly.
@duncan-daydream duncan-daydream marked this pull request as draft January 8, 2026 17:18
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 8, 2026

Code Coverage Report

Overall Coverage: 100.00% (325 of 325)

DevConfiguration: 100.00% (325 of 325)
File Coverage Covered Lines Executable Lines
ConfigValueReadable.swift 100.00% 176 176
ConfigVariable.swift 100.00% 8 8
ConfigVariableAccessFailedEvent.swift 100.00% 4 4
ConfigVariableAccessSucceededEvent.swift 100.00% 5 5
ConfigVariableReader.swift 100.00% 91 91
EventBusAccessReporter.swift 100.00% 32 32
VariableSecrecy.swift 100.00% 9 9

duncan-daydream and others added 5 commits January 13, 2026 16:39
- Rename to DidAccessConfigVariableEvent and DidFailToAccessConfigVariableEvent
- Provide the key as `AbsoluteConfigKey` rather than `String`
- Provide the value as `ConfigValue` rather than `ConfigContent`
@prachigauriar prachigauriar force-pushed the duncan/structured-config-reader branch from 7169eda to 76c228e Compare February 17, 2026 01:39
@prachigauriar prachigauriar marked this pull request as ready for review February 17, 2026 01:40
@prachigauriar prachigauriar merged commit 42fc5a5 into main Feb 17, 2026
3 checks passed
@prachigauriar prachigauriar deleted the duncan/structured-config-reader branch February 17, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants