Skip to content

Commit d7909f8

Browse files
committed
fix(installer): drop nested legacy profile tables
1 parent 2d4cee7 commit d7909f8

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format follows Keep a Changelog, and marketplace/plugin versions follow Sema
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- System Codex migration now removes nested legacy profile tables such as
12+
`[profiles.rldyour-yolo.features]` from `config.toml` instead of leaving them
13+
behind for doctor/runtime validation to reject.
14+
915
## [1.0.0] - 2026-05-28
1016

1117
### Changed

scripts/install_system_codex.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,16 @@ def is_rldyour_plugin_header(header_path: list[str]) -> bool:
556556
and header_path[1].endswith("@rldyour-codex")
557557
)
558558
559+
560+
def is_managed_header(header: str, header_path: list[str]) -> bool:
561+
if header in managed_headers:
562+
return True
563+
return (
564+
len(header_path) >= 2
565+
and header_path[0] == "profiles"
566+
and header_path[1] in {"rldyour-safe", "rldyour-yolo"}
567+
)
568+
559569
for raw_line in existing.splitlines():
560570
if raw_line.strip() == SCHEMA_COMMENT:
561571
continue
@@ -566,7 +576,7 @@ for raw_line in existing.splitlines():
566576
append_managed_features()
567577
header = match.group(1)
568578
header_path = split_toml_key(header)
569-
if header in managed_headers or is_rldyour_plugin_header(header_path):
579+
if is_managed_header(header, header_path) or is_rldyour_plugin_header(header_path):
570580
skip_managed = True
571581
in_features = False
572582
in_memories = False

scripts/smoke_codex_hooks_migration.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@ EOF
146146
cat >"$config_path" <<'EOF'
147147
[features]
148148
use_legacy_landlock = true
149+
EOF
150+
;;
151+
profiles_nested_legacy)
152+
cat >"$config_path" <<'EOF'
153+
[profiles.rldyour-yolo.features]
154+
terminal_resize_reflow = true
155+
memories = true
156+
157+
[profiles."rldyour-safe".features]
158+
terminal_resize_reflow = false
149159
EOF
150160
;;
151161
*)
@@ -201,6 +211,8 @@ for deprecated_root_key in {
201211
raise SystemExit(f"{case_name}: deprecated root key was not removed: {deprecated_root_key}")
202212
if data.get("suppress_unstable_features_warning") is not True:
203213
raise SystemExit(f"{case_name}: suppress_unstable_features_warning was not enabled: {data!r}")
214+
if "profiles" in data:
215+
raise SystemExit(f"{case_name}: legacy profiles table was not removed: {data['profiles']!r}")
204216
205217
if case_name in {
206218
"table_legacy",
@@ -270,6 +282,7 @@ cases=(
270282
features_web_search_canonical_wins
271283
memories_legacy
272284
features_legacy_landlock
285+
profiles_nested_legacy
273286
)
274287

275288
for case_name in "${cases[@]}"; do

0 commit comments

Comments
 (0)