A rule the session already read counts as opened when it arrives again #229

Merged
bvandeusen merged 2 commits from dev into main 2026-11-24 07:24:33 -05:00
Owner

Milestone 639, step 9 (#7735).

A delivery to a session that opened the rule within the open window (6h) is now stamped opened when it is written. The adherence readout, the ordering open rate and the weighing pass all read "opened" as "the session had this rule". Before this, a rule read early in a long session counted as unread every time it was delivered again.

Migration 0135 applies the same stamp to deliveries already recorded. It touches only rows that carry a plugin version: every reader skips the rest, and they are most of the table.

CI is green on dev (runs 10871, 10872).

🤖 Generated with Claude Code

Milestone 639, step 9 (#7735). A delivery to a session that opened the rule within the open window (6h) is now stamped opened when it is written. The adherence readout, the ordering open rate and the weighing pass all read "opened" as "the session had this rule". Before this, a rule read early in a long session counted as unread every time it was delivered again. Migration 0135 applies the same stamp to deliveries already recorded. It touches only rows that carry a plugin version: every reader skips the rest, and they are most of the table. CI is green on dev (runs 10871, 10872). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 2 commits 2026-11-24 07:24:28 -05:00
fix(7735): a rule the session already read counts as opened when it arrives again
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 32s
CI & Build / Python tests (push) Successful in 2m2s
CI & Build / integration (push) Successful in 2m10s
CI & Build / Build & push image (push) Successful in 34s
78fa165e67
A delivery to a session that opened the rule within the open window is
stamped opened as it is written, and migration 0135 stamps the rows already
recorded the same way. The adherence readout, the ordering open rate and the
weighing pass read one definition: a rule read early in a long session is not
counted unread each time it is delivered later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(7735): the read-already backfill touches only the rows the readers count
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / TypeScript typecheck (push) Successful in 34s
CI & Build / Python tests (push) Successful in 2m1s
CI & Build / integration (push) Successful in 2m8s
CI & Build / Build & push image (push) Successful in 17s
394f83427d
Rows without a plugin version are skipped by every open-rate reader and are
most of the table, so the correlated lookup runs on the rows recorded since
0133 only. Keeps the migration cheap on the live table, not just in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvandeusen merged commit 029b5867ed into main 2026-11-24 07:24:33 -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#229