Open rates count only deliveries whose plugin reports opens; a rule with triggers holds only the acts they match #227

Merged
bvandeusen merged 3 commits from dev into main 2026-11-23 16:12:36 -05:00
Owner

Step 7 of milestone 639 (#7733).

  • Open rates: every hook request sends X-Grimoire-Plugin. Each delivered rule line keeps that version (migration 0133), and the ordering history and the weighing pass count only lines that carry one. A plugin older than 2026.11.22.2312 never reported opening a rule a hook had just shown, which is why opens read about 1 in 600. Existing rows drop out of the rate; nothing is deleted. Plugin 2026.11.23.2051.
  • Holds: a rule that has triggers now holds or refuses only the acts those triggers match. Reached by its moment alone, it is a line beside the work. Before this, one push to dev was held four times in a row, by rules 2, 4, 10 and 153.
  • Shellcheck: plugin_version is marked as set for the hooks that source grimoire_defs.sh.

CI green on dev at 2794fd9 (run 10827).

🤖 Generated with Claude Code

Step 7 of milestone 639 (#7733). - **Open rates:** every hook request sends `X-Grimoire-Plugin`. Each delivered rule line keeps that version (migration 0133), and the ordering history and the weighing pass count only lines that carry one. A plugin older than 2026.11.22.2312 never reported opening a rule a hook had just shown, which is why opens read about 1 in 600. Existing rows drop out of the rate; nothing is deleted. Plugin 2026.11.23.2051. - **Holds:** a rule that has triggers now holds or refuses only the acts those triggers match. Reached by its moment alone, it is a line beside the work. Before this, one push to dev was held four times in a row, by rules 2, 4, 10 and 153. - **Shellcheck:** `plugin_version` is marked as set for the hooks that source `grimoire_defs.sh`. CI green on dev at 2794fd9 (run 10827). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 3 commits 2026-11-23 16:12:31 -05:00
fix(7733): a rule's open rate counts only deliveries whose plugin reports opens
CI & Build / TypeScript typecheck (push) Canceled after 0s
CI & Build / Plugin hooks (push) Canceled after 0s
CI & Build / Python lint (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 0s
CI & Build / integration (push) Canceled after 0s
CI & Build / Build & push image (push) Canceled after 0s
e0621713d4
Each rule line a hook delivers now records the plugin version that asked for
it (the X-Grimoire-Plugin header every hook request sends). The open rate
used to order rules, and the delivery history the weighing pass reads,
count only deliveries that carry one.

A plugin before 2026.11.22.2312 never reported an open of a rule a hook had
just named, so every delivery made to such a session read as unopened. The
server shipped delivery recording from dev on 2026-11-22. The plugin ships
from main, and a running session keeps the plugin it started with, so those
sessions kept arriving. They are why opens read about 1 in 600. Existing
rows have no version and drop out of the rate; nothing is deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(7733): a rule with triggers holds or refuses only the acts they match
CI & Build / Plugin hooks (push) Failing after 19s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Python tests (push) Successful in 2m31s
CI & Build / integration (push) Successful in 2m18s
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / Build & push image (push) Canceled after 27s
738bd24d6e
Rules 2, 4, 10 and 153 are set to hold and mounted on work.deliver. A
push to dev therefore stopped four times in a row, once for each of them,
although none of them governs a push to dev: their triggers (git push
origin main, git tag, pytest, pull_request_write) name the acts they do
govern.

A rule that has triggers now stops an act only when one of them matched it.
Reached by its moment alone, it is a line beside the work. A rule with no
triggers still holds wherever it is mounted, because the mount is all that
says where it applies. A mounted rule whose unscoped trigger also matched
now counts as reached by the trigger, so it ranks as triggered and may
stop the act.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(7733): shellcheck reads plugin_version as set for the hooks that source grimoire_defs.sh
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Python tests (push) Successful in 2m5s
CI & Build / integration (push) Successful in 2m17s
CI & Build / Build & push image (push) Successful in 36s
2794fd97f0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvandeusen merged commit 2996ae793d into main 2026-11-23 16:12:36 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledGrimoire#227