chore(envutil)!: dotenv strict 스위치를 canonical 이름으로 전환 - #61
Merged
Conversation
OpenBao는 2026-08-08에 퇴역했는데 loadServiceDotenv는 여전히 <PREFIX>_REQUIRE_OPENBAO만 조회하고 있었다. canonical 이름인 <PREFIX>_REQUIRE_STATIC_SECRETS를 읽도록 바꾼다. 구 이름만 설정한 배포는 strict 모드가 꺼지므로 현행 이름으로 옮겨야 한다. 이 경로를 쓰는 서비스는 twentyq 하나이며, 해당 저장소가 canonical 값을 구 이름으로 옮겨 담던 shim도 함께 걷어낸다.
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.
배경
OpenBao는 2026-08-08에 퇴역했는데
loadServiceDotenv는 여전히<PREFIX>_REQUIRE_OPENBAO만 조회하고 있었다. canonical 이름<PREFIX>_REQUIRE_STATIC_SECRETS는 읽지 않는다.그래서 이 경로를 쓰는 유일한 서비스인 twentyq-bot은 canonical 값을 구 이름으로 옮겨 담는 shim을 두고 있었다 — 해당 저장소
internal/common/config/dotenv.go의 "shared-go v1.48.0은 legacy key를 읽으므로 canonical 정책을 여기서 해석해 전달한다" 주석이 그것이다.변경
loadServiceDotenv가<PREFIX>_REQUIRE_STATIC_SECRETS를 직접 읽는다. 구 이름은 더 이상 조회하지 않는다.영향 범위
loadServiceDotenv는DotenvOptions.ServiceName이 설정된 경우에만 호출된다. 조사 결과 stack 안에서 그렇게 쓰는 곳은 twentyq-bot 하나다.twentyq-bot/internal/common/config/dotenv.go—ServiceName: "twentyq"chat-bot-go-kakao/internal/config/load.go—LocalEnableKey/LocalPathKey만 사용해 이 경로를 타지 않음hololive-bot—envutil.LoadDotenv미사용마이그레이션
구 이름만 설정한 배포는 strict 모드가 꺼진 채로 동작한다. twentyq production compose는 이미
TWENTYQ_REQUIRE_STATIC_SECRETS: "true"를 쓰고 있고, 그 저장소의 배포 하드닝 테스트가 canonical 사용과 legacy 미사용을 강제한다.이 PR이 릴리스된 뒤 twentyq-bot이 go.mod를 올리고 shim을 제거한다. 순서가 뒤집히면 twentyq의 strict 모드가 꺼지므로 릴리스가 선행되어야 한다.
검증
go build ./...go test ./pkg/envutil/— okgofmtclean