From 59788f315ac649672d2a2c22383109ccf96d449d Mon Sep 17 00:00:00 2001 From: CroneKorkN Date: Sun, 10 May 2026 20:28:31 +0200 Subject: [PATCH] agents/bundles: reactors must read metadata or be defaults The left4me bundle's first cut had two reactors that returned static dicts without calling metadata.get(...): systemd_services (enable/run flags) and nftables_output (two static rule strings). Both passed bw test (no consumer yet). Once attached to ovh.left4me, bw raised "did not request any metadata, you might want to use defaults instead". Fix was to fold both into defaults. Document the pitfall, with the verbatim error wording and the note that this applies to cross-namespace contributions too. Co-Authored-By: Claude Opus 4.7 (1M context) --- bundles/AGENTS.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bundles/AGENTS.md b/bundles/AGENTS.md index 02c196a..bd1f8bf 100644 --- a/bundles/AGENTS.md +++ b/bundles/AGENTS.md @@ -110,6 +110,14 @@ bundles// itself; grep `'':` in the reactors when in doubt. - **`bw hash` doesn't accept selectors.** Use `bw hash ` per literal name; see the fork's runbook. +- **Reactors must read metadata.** If a reactor body returns a static + dict without calling `metadata.get(...)`, bw raises + `ValueError: on did not request any metadata, you + might want to use defaults instead` once a node consumes the bundle. + Fix: fold the contribution into `defaults`. The rule applies even + when the reactor writes into another bundle's namespace — a static + contribution to e.g. `nftables/output` belongs in `defaults`, where + bw merges it with other bundles' contributions. ## Per-bundle README