From 7a579f27c513cc28948a26bb4e7a6dd4ae1da27c Mon Sep 17 00:00:00 2001 From: CroneKorkN Date: Sun, 10 May 2026 20:40:42 +0200 Subject: [PATCH] agents/bundles: file: source defaults to destination basename Caught during the left4me-integration nginx 80.conf move: the agent declared a redundant 'source': '80.conf' on a file: item whose destination already ended in 80.conf. The maintainer flagged it as noise. Document the rule: only declare source when the basename differs from the destination (e.g. .mako template to a non-suffixed destination). Co-Authored-By: Claude Opus 4.7 (1M context) --- bundles/AGENTS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bundles/AGENTS.md b/bundles/AGENTS.md index 5d096dd..c5988e3 100644 --- a/bundles/AGENTS.md +++ b/bundles/AGENTS.md @@ -102,6 +102,12 @@ bundles// unless the matching `file:` item declares `content_type='mako'` (or a templating extension triggers it). To check, read the matching `file:` entry in `items.py`. +- **`file:` `source` defaults to the destination basename.** For a + destination of `/etc/foo/bar.conf` with no `source` key, bw looks + for `bundles//files/bar.conf`. Only declare `source` + explicitly when the basename you want differs (e.g. shipping a Mako + template named `bar.conf.mako` to a destination of + `/etc/foo/bar.conf`). - **Reactors writing across namespaces.** Some bundles' reactors write into other bundles' metadata namespaces (e.g. `nextcloud` writes into `apt.packages`, `archive.paths`). When you change such a bundle,