Repository navigation
fix(config): remove three inert project-root placeholders and one orphaned copy (#15044) - #15570
Merged
Merged
Conversation
…haned copy (#15044) Three configs carried ${AUTOBOT_PROJECT_ROOT} placeholders that nothing ever expands, so each shipped a literal dollar-brace string where a path was meant. The audit in #15040 recorded two of them as needing no fix; that verdict is what this issue exists to correct. logging.yml keeps its file and gains a repo-relative filename. It is not dead: log_aggregator.py --setup regenerates it, and logging_formatter_path_test.py asserts it exists and reads a formatter class out of it, so removing it would break a guard that already passes. threat_detection.yaml loses three ml_models keys no consumer reads. The engine's own defaults name only model_retrain_hours and min_training_samples, and profile persistence uses an unrelated path helper. The orphaned promtail copy is deleted, and that is the one claim worth the evidence. The deployed unit loads {{ promtail_config_dir }}/config.yml -- a different filename at a different directory -- rendered fresh from a template whose content differs materially from the checked-in copy. There is no -config.expand-env=true anywhere, so the placeholder would stay literal even if something did load it. Nothing in the tree names the path. This is not unfinished work being removed; it is a file no code path can reach. The stranded baseline entry is pruned, removal-only, 1380 keys -> 1379.
Contributor
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
…can hold this file too (#15044) check_no_shell_placeholder_paths flagged the new test with four hits. It was right: a shell placeholder written literally in a Python string constant is exactly what it forbids, and it carries no growable baseline on purpose (#14517). The awkwardness is that this file is a test ABOUT inert placeholders, so naming one is its subject matter. Assembling the token from parts keeps every assertion identical while letting the file obey the rule it exists to enforce -- rather than the one file in the repo that cannot. Verified against the guard that caught it, not just the file's own tests: check_no_shell_placeholder_paths_test 16 passed, the file's own 11 passed.
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.
Thinking Path
Three configs carried
${AUTOBOT_PROJECT_ROOT}placeholders that nothing everexpands, so each shipped a literal dollar-brace string where a path was meant.
The failure is silent — a config value that is a placeholder rather than a path
does not raise; it produces a file in a nonsense location or an empty result.
docs/audit/project_root_yaml_json_audit.md(#15040) recorded two of these as"no fix needed". That verdict is what #15044 exists to correct, and the audit doc
is updated with it.
This PR covers #15044 only. It was dispatched as a three-issue batch with
#14892 and #15193; both turned out to be already fixed and needed no code.
They are verified and closed separately rather than folded in here, because a PR
that closes an issue it did not change is a closure with no diff behind it.
What Changed
logging.ymlfilename→ repo-relative; header addedlog_aggregator.py --setupregenerates it, andrepo_tests/logging_formatter_path_test.pyasserts it exists and readsformatters.json.classfrom it. Deleting it breaks a passing guardthreat_detection.yamlml_modelskeys removedThreatDetectionEngine._get_default_config()reads onlymodel_retrain_hoursandmin_training_samples; profile persistence uses an unrelated path helper. No consumer of the three existslogging/promtail/promtail-config.ymlhardcoded_values_baseline.txtThe deletion, and why it is not removing unfinished work
This repo's rule is that debris is unfinished work to be wired in, and deletion
is correct only once nothing depends on it. So the promtail copy gets four
independent lines of evidence rather than one:
ExecStartloads{{ promtail_config_dir }}/config.yml—a different filename in a different directory (
/etc/autobot/promtail)templates/promtail-config.yml.j2, whosecontent differs materially from the checked-in copy — different job names, no
__HOST__templating, no placeholder at all-config.expand-env=trueanywhere, so the placeholder wouldremain a literal string even if something did load this file
git grepfor the path across all tracked files, excluding the audit doc andthe pruned baseline, returns zero hits
I verified 1 and 4 myself rather than accepting them. This is not a feature
half-built; it is a file no code path can reach.
Verification
Mutations, each red then green on restore:
logging.ymlfilename back to the placeholdertest_filename_is_not_an_unexpanded_placeholderpromtail-config.ymlrecreatedtest_the_orphaned_promtail_copy_stays_removedmodel_storage_pathreinsertedtest_none_of_the_dead_keys_are_presentThe one skip is
pythonjsonloggerabsent from this venv; the durable half ofthat guard still ran.
Not verified
The full
repo_tests/suite did not complete — it was killed after ~10minutes. The runs above are narrow, covering the touched files and the
pre-existing guard this change could plausibly break. CI is the check that
matters here and it has not been avoided; it simply has not run yet at the time
of writing.
Model Used
Claude Opus 5
Closes #15044
Refs #14892, #15193 — this branch is named for #14892 because it was dispatched
as a three-issue batch. It does not close that issue, and says so
deliberately: #14892 and #15193 were both already fixed by prior work
(
5633e418c/ PR #15175), verified against merged base this session, and closedseparately on that evidence rather than on this diff. A PR that ticked them here
would be claiming a closure with no change behind it.