@@ -144,12 +144,26 @@ threading mistake shows up as a crash or a mis-drawn screen, not a silent pass.
144144 resize_form closure), ` t/11 ` layout, ` t/07 ` ` --dump ` form, ` t/20 ` submit. Full
145145 suite 311 green.
146146
147- ### Phase 4 — config settings → ` $ctx->{cfg} ` * (~ 30 vars, incl. 17 colour attrs)*
148- - ` load_config ` 's per-section dispatch writes ` $ctx->{cfg}{...} ` ; the
149- ` eval "$VAR = ..." ` colour assignments become `eval "\$ ctx->{cfg}{labelFg} =
150- ..."` (still evaluated in ` ccfe.pl`'s package for the colour helpers).
151- - Read-only after startup, so readers are a mechanical ` $X ` → ` $ctx->{cfg}{X} ` .
152- - ** Gate:** ` t/06 ` colour/theme integration.
147+ ### Phase 4 — config settings → ` $ctx->{cfg} ` * (done — ~ 45 vars, ~ 290 sites)*
148+ - ** Decision (agreed):** config is read-only-after-startup shared state, so it
149+ is * consolidated* into one explicit ` $ctx->{cfg} ` object rather than
150+ param-threaded through the ~ 15 reading subs. ` $ctx ` is promoted to a top-level
151+ ` our ` global, built before the config defaults; ` load_config ` , the defaults
152+ and every reader fill/read ` $ctx->{cfg}{X} ` . No param-threading (no benefit for
153+ immutable data); the per-call MUTABLE state already got true lexical isolation
154+ in Phases 1–3.
155+ - Done in three test-gated word-boundary-rename commits: ** 4a** scalar settings
156+ (LAYOUT, HIDE_CURSOR, PATH, RESTRICTED, * _ FOOTER_ROWS, …); ** 4b** colour/attr
157+ vars incl. the ` eval "$VAR = ..." ` ones (rewritten to
158+ ` eval "\$ctx->{cfg}{labelFg} = ..." ` , still evaluated in ` ccfe.pl ` 's package);
159+ ** 4c** structures (` %keys ` → ` $ctx->{cfg}{keys} ` hashref, ` @fval_delim ` and
160+ ` @RESTRICTED_ALLOW ` → arrayrefs). Only ` @mf_path ` /` @cnf_path ` stay global
161+ (search-path infrastructure used by ` t/01 ` ).
162+ - ** Test fallout:** ` t/04-restricted.t ` poked ` $main::RESTRICTED ` /
163+ ` @main::RESTRICTED_ALLOW ` and grepped the source for ` unless $RESTRICTED ` ;
164+ updated to ` $main::ctx->{cfg}{...} ` .
165+ - ** Gate:** ` t/06 ` colour/theme, ` t/04 ` restricted policy, ` t/07 ` CLI, full
166+ suite 311 green.
153167
154168### Phase 5 — residual scalar runtime state
155169- ` $SCREEN_DIR ` , ` $last_item_id ` , ` $pad_lines ` , ` $exec_args ` , ` $child_es ` .
0 commit comments