From 26dd5252ab73e4e7dbe1381aca02b915e52695f1 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Mon, 23 Nov 2026 04:05:46 +0000 Subject: [PATCH] Record native upgrade review finding --- docs/roadmap/remediation.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docs/roadmap/remediation.md diff --git a/docs/roadmap/remediation.md b/docs/roadmap/remediation.md new file mode 100644 index 0000000..dba6ea2 --- /dev/null +++ b/docs/roadmap/remediation.md @@ -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.