mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-07-01 03:04:52 +02:00
feat: add scriptable housekeeper rule engine
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user