feat(8118,8119): telemetry reads take a closed window, and every enter_project records whether it carried the family line
CI & Build / TypeScript typecheck (push) Successful in 37s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 17s
CI & Build / integration (push) Failing after 2m15s
CI & Build / Python tests (push) Successful in 2m23s
CI & Build / Build & push image (push) Skipped

#8119: retrieval_telemetry and list_rules(with_usage) take `since` and
`until` (ISO date or datetime) besides `days`. Every windowed count is
bounded at both ends: sources, note/rule/system/moment usage, record
reach, judged lines and the floor-moved check. A review read after its
period can now keep a later deploy out of its counts. A bad bound is
refused rather than widened.

#8118: enter_project writes one AppLog row (family / enter_project) per
entry: the project, whether the family line was shown, its counts, and
whether the readout failed. It is spawned, so the handshake does not wait.
retrieval_telemetry gains a `family_line` block: per project, entries,
entries that carried the line, first and last shown, and the latest
counts. Review #5132's "did the project's sessions see the line" is now
answerable from this deploy on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 00:01:19 -05:00
co-authored by Claude Opus 5.5
parent 0e946ffac8
commit 577a8e8621
12 changed files with 389 additions and 29 deletions
+8
View File
@@ -311,13 +311,21 @@ async def enter_project(project_id: int) -> dict:
out["systems_bootstrap"] = systems_bootstrap
# Family canon: counts only, attached when one is
# non-zero. A readout must never fail the handshake it rides on.
family_failed = False
try:
family = await family_adoption_svc.family_readout(uid, project_id)
except Exception:
logger.warning("family readout failed for project %s", project_id, exc_info=True)
family = None
family_failed = True
if family:
out["family"] = family
# Every entry is recorded, with or without the line, so a later review
# can say whether a project's sessions saw what it owes
# (retrieval_telemetry's `family_line`). In the background, so the
# handshake never waits on its own telemetry.
spawn(family_adoption_svc.record_entry(uid, project_id, family, failed=family_failed),
site="family_entry_record")
if inception_ask:
out["inception"] = inception_ask
# The core reply shape: for a client with no prompt hook,