refactor(dreamer): rename current_document_count → current_explicit_count
Loop 3 follow-up ond4e10e3. After Loop 2's filter landed, the local in check_and_schedule_dream held an explicit-only count but was still named current_document_count — asymmetric with execute_dream's current_explicit_count (line 201) and contradicting the filter on line 269 that produces the value. Pure rename: three occurrences (definition at 271, subtraction at 274, log extra key at 282). No test references. Naming-as-invariant alignment withd76627a(query filters),d4e10e3(parameter docstring), and Loop 1's local rename in execute_dream. The persisted JSONB key last_dream_document_count is the one remaining drift-layer; filed as plastic-claudebook backlog item for a separate PR with an intentional migration path. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d4e10e38b4
commit
0172cd1254
|
|
@ -268,10 +268,10 @@ async def check_and_schedule_dream(
|
|||
models.Document.observed == collection.observed,
|
||||
models.Document.level == "explicit",
|
||||
)
|
||||
current_document_count = int(await db.scalar(count_stmt) or 0)
|
||||
current_explicit_count = int(await db.scalar(count_stmt) or 0)
|
||||
|
||||
# Calculate documents added since last dream
|
||||
documents_since_last_dream = current_document_count - last_dream_document_count
|
||||
documents_since_last_dream = current_explicit_count - last_dream_document_count
|
||||
|
||||
logger.debug(
|
||||
"Dream check",
|
||||
|
|
@ -279,7 +279,7 @@ async def check_and_schedule_dream(
|
|||
"workspace_name": collection.workspace_name,
|
||||
"observer": collection.observer,
|
||||
"observed": collection.observed,
|
||||
"current_document_count": current_document_count,
|
||||
"current_explicit_count": current_explicit_count,
|
||||
"last_dream_document_count": last_dream_document_count,
|
||||
"documents_since_last_dream": documents_since_last_dream,
|
||||
"document_threshold": settings.DREAM.DOCUMENT_THRESHOLD,
|
||||
|
|
|
|||
Loading…
Reference in New Issue