fix(templatize): resolve region short settings without a shell (ARO-28265) #8333
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 313 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.344
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8333"
general
weight: 0.35
redhat-chai-bot
Jira: ARO-28265
What
tooling/templatize/settings.yamldeclares the region short override and suffix as data instead of shell text:settings.RegionShortSourceslices an environment variable and prepends an optional literal prefix.offsetcounts from the start of the value and is negative from the end,lengthkeeps that many bytes and truncates past the end, and a missing variable or an offset outside the value contributes an empty slice. A negative length, or a source with neither a variable nor a prefix, is an error.settings.Resolveno longer takes a context, because nothing outside the process runs.Why
The settings file is configuration, not code. Passing its text through
bash -c "echo ..."executes shell syntax with the invoking user's privileges and full environment, cloud credentials included on CI runners (ARO-28265, CWE-78). A declared slice defines the value by type, so no shell implementation is approximated.Testing
go build ./...andgo vet ./pkg/settings/intooling/templatize, plusgo build ./util/config/intest/, which resolves the same settings for E2E resource names.go test ./pkg/settings/: table-driven coverage for first and last bytes, a prefix with and without a variable, offsets and lengths outside the value, an unset variable, and the rejected inputs. A second test resolves every environment in the shippedsettings.yaml.make -C config renderandmake -C config detect-change: rendered configs and helm fixtures are unchanged.make verify-yamlfmt.Special notes for your reviewer
Resolved values are identical for every environment in the shipped file:
perskeeps the first four bytes ofUSER,perfprefixesp, andci00toci02usejplus the last seven bytes ofBUILD_ID.PR Checklist