2026-11-23 16:33:48 +00:00
|
|
|
# Configured startup review remediation
|
|
|
|
|
|
|
|
|
|
Reviewed all ten implementation stages against committed baseline
|
|
|
|
|
`f04b6097b879bfa96cf188858988141c81933c77` and the agreed feature roadmap.
|
|
|
|
|
|
|
|
|
|
## 1. Make the pure-loader regression test detect accidental bootstrap
|
|
|
|
|
|
2026-11-23 17:24:16 +00:00
|
|
|
Status: completed. Priority: P2. Implementation stages: 2 and 6.
|
|
|
|
|
|
|
|
|
|
Completion: the test registers restoration of the original environment state,
|
|
|
|
|
unsets the variable, and uses `LookupEnv` to verify that pure loading leaves it
|
|
|
|
|
absent. Explicit bootstrap provides a positive control before the retained
|
|
|
|
|
prepared-source handoff assertions. The focused test passes normally and fails
|
|
|
|
|
at the purity assertion with bootstrap inserted through a temporary build
|
|
|
|
|
overlay. Full tests and configuration-package race tests pass. Production
|
|
|
|
|
loading behavior is unchanged.
|
2026-11-23 16:33:48 +00:00
|
|
|
|
|
|
|
|
Location: [pipeline_discovery_test.go](../../internal/config/pipeline_discovery_test.go#L99),
|
|
|
|
|
`TestPipelineSourceRetainsPreparedMainAndPureLoading`.
|
|
|
|
|
|
2026-11-23 17:24:16 +00:00
|
|
|
The original test set its credential variable to an empty string before calling
|
|
|
|
|
the ordinary library loader. ConfigKit's default bootstrap preserves existing
|
2026-11-23 16:33:48 +00:00
|
|
|
variables, including empty ones. Consequently, the environment assertion still
|
2026-11-23 17:24:16 +00:00
|
|
|
passed with bootstrap accidentally introduced into `LoadPipelineWithOptions`.
|
|
|
|
|
This was the only configuration-package test declaring a secrets directory, so
|
|
|
|
|
the intended guard against library-owned environment mutation was ineffective.
|
2026-11-23 16:33:48 +00:00
|
|
|
|
|
|
|
|
Confirmed with a temporary Go build overlay that inserted an actual
|
|
|
|
|
`LoadSecretsIntoEnvironmentFromConfig` call into `LoadPipelineWithOptions`:
|
|
|
|
|
the named regression test still passed. Repository source files were unchanged
|
|
|
|
|
by that diagnostic check. The production loader currently has the correct
|
|
|
|
|
pure-loading implementation; this finding concerns its regression coverage.
|
|
|
|
|
|
|
|
|
|
Required change: restore the test variable's original state during cleanup,
|
|
|
|
|
start the pure-loading assertion with the variable genuinely unset, and check
|
|
|
|
|
that it remains unset after loading. Keep the subsequent prepared-source
|
|
|
|
|
handoff check; an explicit native bootstrap can serve as a positive control that
|
|
|
|
|
the fixture would actually populate the variable. No production bootstrap or
|
|
|
|
|
loader behavior change is needed.
|
|
|
|
|
|
|
|
|
|
Validation: the focused test passes against current production code and fails
|
|
|
|
|
when an accidental bootstrap call is temporarily inserted via a scratch overlay.
|
|
|
|
|
Keep this as a small behavioral test rather than adding a permanent mutation-test
|
|
|
|
|
framework or retesting ConfigKit's complete secrets policy.
|