Skip to content

Add variable registration to ConfigVariableReader#9

Merged
prachigauriar merged 1 commit intomainfrom
prachi/variable-registration
Mar 6, 2026
Merged

Add variable registration to ConfigVariableReader#9
prachigauriar merged 1 commit intomainfrom
prachi/variable-registration

Conversation

@prachigauriar
Copy link
Copy Markdown
Contributor

  • Add RegisteredConfigVariable, a struct that captures a variable's
    key, default content, secrecy, and metadata for storage in
    homogeneous collections
  • Add encode closure to ConfigVariableContent for converting values
    back to ConfigContent, enabling default value encoding at
    registration time
  • Add encodeToContent on CodableValueRepresentation for converting
    encoded Data into the appropriate ConfigContent
  • Add ConfigVariableReader.register, which encodes and stores a
    variable's registration with duplicate-key detection and logging
  • Split ConfigVariableReaderTests into per-concern test files:
    scalar, array, raw representable, config expression, data
    representation, codable, and registration
  • Extract shared test mocks and metadata keys into Testing Support

  - Add RegisteredConfigVariable, a struct that captures a variable's
    key, default content, secrecy, and metadata for storage in
    homogeneous collections
  - Add encode closure to ConfigVariableContent for converting values
    back to ConfigContent, enabling default value encoding at
    registration time
  - Add encodeToContent on CodableValueRepresentation for converting
    encoded Data into the appropriate ConfigContent
  - Add ConfigVariableReader.register, which encodes and stores a
    variable's registration with duplicate-key detection and logging
  - Split ConfigVariableReaderTests into per-concern test files:
    scalar, array, raw representable, config expression, data
    representation, codable, and registration
  - Extract shared test mocks and metadata keys into Testing Support
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

Code Coverage Report

Overall Coverage: 99.57% (1,867 of 1,875)

DevConfiguration: 99.57% (1,867 of 1,875)
File Coverage Covered Lines Executable Lines
CodableValueRepresentation.swift 100.00% 74 74
ConfigVariable.swift 100.00% 68 68
ConfigVariableAccessFailedEvent.swift 100.00% 4 4
ConfigVariableAccessSucceededEvent.swift 100.00% 5 5
ConfigVariableContent.swift 100.00% 1,488 1,488
ConfigVariableDecodingFailedEvent.swift 100.00% 5 5
ConfigVariableMetadata.swift 100.00% 30 30
ConfigVariableReader.swift 95.18% 158 166
EventBusAccessReporter.swift 100.00% 32 32
RegisteredConfigVariable.swift 100.00% 3 3

@prachigauriar prachigauriar merged commit e4cc18f into main Mar 6, 2026
3 checks passed
@prachigauriar prachigauriar deleted the prachi/variable-registration branch March 6, 2026 04:40
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.

1 participant