docs(6209): seventeen more test files — lesson shape and round trip, rule scope/moments/kind/surfacing, drift, deadlock race, backup, inception, backfill, claims, supersession, ledgers, family shapes
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m7s
CI & Build / Python tests (push) Successful in 1m54s
CI & Build / Build & push image (push) Successful in 12s

Docstrings and comments state the property and its reason in the present
tense. The session-context ledger test no longer describes the decision it
"used to pin"; the supersession tests state demote-not-filter without the
quote; one-row measurements become the general shape with their figures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 21:37:15 -04:00
co-authored by Claude Opus 5.5
parent ba0b56018e
commit 63e97a6f0f
17 changed files with 95 additions and 123 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
"""Real-Postgres tests for rule mounts (milestone 458 step 3).
"""Real-Postgres tests for rule mounts.
A mount is the claim "this rule arrives at this moment". These pin what that
claim depends on:
@@ -7,7 +7,7 @@ claim depends on:
- the rule's detail reads its mounts back;
- a backup carries them, attached to the RESTORED rule's new id rather than
the old number;
- the delivery lookup (step 4) answers by home: a project's mounted rule
- the delivery lookup answers by home: a project's mounted rule
reaches only work bound to that project, and nobody else's mount arrives.
"""
import pytest
@@ -150,7 +150,7 @@ async def test_a_backup_carries_the_mounts_to_the_restored_rule(world):
assert sorted(r["moment"] for r in payload["rule_moments"]) == [
"reply.report", "work.finish",
]
# The mount was an edit, so it was also recorded as two judgments (step 7)
# The mount was an edit, so it was also recorded as two judgments
# — and those travel too, onto the restored rule.
payload["rule_moment_judgments"] = [
row for row in exported["rule_moment_judgments"] if row["rule_id"] == rule.id
@@ -238,7 +238,7 @@ async def test_the_delivery_lookup_answers_by_home(world):
async def test_moment_usage_counts_deliveries_and_the_agent_opens_that_followed(world):
"""The per-moment readout (step 6), on real SQL: an EXISTS inside a
"""The per-moment readout, on real SQL: an EXISTS inside a
COUNT(CASE …) is a shape no mock can vouch for, and the block's own guard
would turn a database refusal into a quiet `moment_usage_failed`."""
from datetime import datetime, timedelta, timezone