feat: add scriptable housekeeper rule engine

This commit is contained in:
Marcel Peterkau
2026-06-21 17:43:04 +02:00
parent e63abbae81
commit 4bc1a8a200
18 changed files with 936 additions and 207 deletions
+17
View File
@@ -36,6 +36,8 @@ On first start, select or create the central member-store directory. The
```text
member-store/
├── repository.json
├── hausmeister.json
├── rules/
└── members/
└── <uuid>/
├── member.json
@@ -44,4 +46,19 @@ member-store/
└── files/
```
## Housekeeper rules
The housekeeper runs every rule for every member. Built-in Python rules live in
`ccma/rules/scripts/`. A member store can add rules in its `rules/` directory.
If a store rule has the same filename as a built-in rule, the store version
replaces the built-in version.
Store rules are trusted executable Python code. Only place reviewed rules from
trusted sources in this directory. Rules return structured `RuleAction` objects;
CCMA performs all file writes, duplicate checks, audit events, and atomic updates.
`hausmeister.json` is written only after a complete run. Each refreshed task gets
the pending run ID. A failed run therefore cannot advance the stored counter or
silently resolve existing tasks.
Do not place a real member store inside the source repository.