Record native upgrade review finding

This commit is contained in:
2026-11-23 04:05:46 +00:00
parent 23af6579c3
commit 26dd5252ab

View File

@@ -0,0 +1,37 @@
# Native Library Upgrade Review Remediation
Reviewed implementation Stages 1–12 at commit
`23af6579c31db32addb940005292de179ecee1d0` against the
[implementation plan](implementation.md) and [feature roadmap](library-upgrades.md).
## Isolate Secrets Bootstrap In The Maintained-Example Test
**Location:** `internal/adapter/cli/examples_test.go:20–30`, reached through
`examples/config.secrets.yml` and its synthetic secrets directory.
The maintained-example sweep automatically selects every `config*.yml` file,
including the newly added secrets example. Both scope validations invoke native
bootstrap in the test process. When `SCRIPTORIUM_EXAMPLE_TOKEN` is initially
absent, the first acquisition sets it and the second sees that existing value.
The sweep does not register environment cleanup, so the variable remains set
after the test finishes. Its behavior therefore depends on inherited process
state and leaves bootstrap state for later tests.
This was reproduced without modifying repository code: a temporary Go test
overlay ran the existing sweep as a subtest with the variable initially absent,
then confirmed it remained present after the subtest and its cleanup returned.
The separate `TestMaintainedSecretsExample` controls its own environment, but
that cleanup does not cover the sweep.
Stages 2 and 5 and the [testing policy](../policy/testing.md#test-execution-requirements)
require controlled, restored test environment state. Control the synthetic
variable in the sweep with `t.Setenv` so cleanup restores its original presence
and value. If testing actual provisioning from absence, register that cleanup
before unsetting the variable and invoking the example. Keep this change local
to the test harness: production acquisitions and comparison sides retain native
process-environment effects without rollback.
**Verification:** run the maintained-example and bootstrap tests repeatedly and
with shuffled ordering. Confirm the sweep restores an initially absent variable
and a pre-existing value when its cleanup finishes. Reuse native bootstrap
coverage rather than adding another secret-file parser or parsing matrix.