docs(spec): resolve placeholders on every configuration entry point - #23
Draft
antstanley wants to merge 1 commit into
Draft
docs(spec): resolve placeholders on every configuration entry point#23antstanley wants to merge 1 commit into
antstanley wants to merge 1 commit into
Conversation
This was referenced Aug 5, 2026
antstanley
force-pushed
the
spec/resolve-config-placeholders
branch
from
August 5, 2026 08:15
b5d7125 to
be38736
Compare
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
antstanley
force-pushed
the
spec/resolve-config-placeholders
branch
from
August 5, 2026 08:22
be38736 to
446249c
Compare
antstanley
changed the base branch from
main
to
spec/apply-unmerged-change-spec-blocks
August 5, 2026 08:22
antstanley
marked this pull request as draft
August 5, 2026 08:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Stacked PR 2 of 16 — part of stack #35, which targets
main.Base: #29 (
spec/apply-unmerged-change-spec-blocks) · Followed by: #25This PR's diff shows only its own change. Merge the stack bottom-up; do not merge this before its base.
Why it sits at position 2: Introduces the two-stage
RawConfig/Configseam and the singleresolve()every config entry point calls. #25 builds its closed-domain types on that seam and both modify06-configuration.md's Loading order.Scope of this PR
This PR currently carries the change spec. It will also carry the implementation plan and the build work for that spec — plan and code land as later commits on this same branch, so the spec, its plan, and its implementation review and merge as one unit.
Review order within the PR: spec first, then plan, then implementation.
Change spec proposing that every configuration entry point resolve
${VAR}placeholders.Problem.
parse_configincrates/server/src/bootstrap.rsistoml::from_str+validate()with no resolve step, so the napi Node binding, the PyO3 Python binding and the TypeScript@oidc-exchange/lambdapackage load configuration in which the documented secret placeholder survives as literal text. The internal-API shared secret is one of the values documented this way. The function's own doc comment currently claims a parity that does not exist.Proposed delta. Route every entry point through one shared resolve step — source layering, then fail-closed
${VAR}resolution,OIDC_EXCHANGE__{section}__{key}overrides, then validation. Failure semantics are fixed for each case (unset variable, set-but-empty, unterminated${, empty${},$${escape) as startup errors, with a residual-placeholder post-condition and a requirement that no error or diagnostic ever echoes a resolved secret.Adopts hardening Option 2's two-stage
RawConfig/Configseam with a singleresolve()plus theoidc-exchange config checksubcommand pulled forward, and explicitly defers closed-domain field typing to a follow-on change.Corrections to the original finding, from reading the code.
main.rsselects Lambda mode afterbootstrap::load_config(), which does resolve. The affected Lambda channel is the TypeScript@oidc-exchange/lambdapackage, which reaches config via the Node addon → FFI →parse_config.parse_configalso misses theOIDC_EXCHANGE__…override source, so binding runtimes silently drop policy overrides such asOIDC_EXCHANGE__REGISTRATION__MODE. Included in the delta.main.rshandles only--version/-Vandcrates/serverhas no argument-parsing dependency, soconfig checkis a genuinely new surface.Pre-existing divergence flagged, not fixed.
changes/merged/2026-07-01-complete_config_loading.mdis markedMerged, but its blocks were never applied to06-configuration.mdor04-http-api.md. Merge-plan step 1 calls for completing that merge rather than superseding it.Drafted with the
spec-creatorplugin from a deep security scan of the repository at53cbdec9. Spec only — no source changes.