cctally 1.114.0 → 1.115.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/bin/_cctally_account.py +32 -8
  3. package/bin/_cctally_cache.py +4394 -279
  4. package/bin/_cctally_completion.py +1287 -0
  5. package/bin/_cctally_config.py +37 -0
  6. package/bin/_cctally_core.py +178 -2
  7. package/bin/_cctally_dashboard.py +2 -2
  8. package/bin/_cctally_dashboard_conversation.py +292 -23
  9. package/bin/_cctally_dashboard_envelope.py +16 -3
  10. package/bin/_cctally_dashboard_sources.py +18 -9
  11. package/bin/_cctally_db.py +316 -5
  12. package/bin/_cctally_doctor.py +436 -27
  13. package/bin/_cctally_five_hour.py +82 -31
  14. package/bin/_cctally_forecast.py +81 -9
  15. package/bin/_cctally_journal.py +3884 -112
  16. package/bin/_cctally_journal_repair.py +101 -12
  17. package/bin/_cctally_parser.py +42 -0
  18. package/bin/_cctally_project.py +8 -2
  19. package/bin/_cctally_quarantine.py +652 -0
  20. package/bin/_cctally_quota.py +26 -4
  21. package/bin/_cctally_quota_model.py +360 -83
  22. package/bin/_cctally_record.py +677 -149
  23. package/bin/_cctally_rederive.py +297 -32
  24. package/bin/_cctally_refresh.py +84 -13
  25. package/bin/_cctally_source_analytics.py +23 -2
  26. package/bin/_cctally_statusline.py +6137 -517
  27. package/bin/_cctally_store.py +287 -48
  28. package/bin/_cctally_transcript.py +8 -7
  29. package/bin/_cctally_tui.py +57 -53
  30. package/bin/_lib_account_binding.py +152 -0
  31. package/bin/_lib_account_protocol.py +386 -0
  32. package/bin/_lib_aggregators.py +4 -0
  33. package/bin/_lib_cache_coverage.py +13 -1
  34. package/bin/_lib_cache_writer_lock.py +19 -3
  35. package/bin/_lib_clone_copy.py +142 -0
  36. package/bin/_lib_codex_conversation_query.py +133 -19
  37. package/bin/_lib_codex_conversation_watch.py +59 -14
  38. package/bin/_lib_codex_drain_admission.py +214 -0
  39. package/bin/_lib_codex_metadata.py +18 -1
  40. package/bin/_lib_codex_publication_barrier.py +277 -0
  41. package/bin/_lib_codex_rollout_container.py +502 -0
  42. package/bin/_lib_conversation_dispatch.py +3 -0
  43. package/bin/_lib_conversation_query.py +11 -3
  44. package/bin/_lib_detector_access_registry.py +3817 -0
  45. package/bin/_lib_doctor.py +452 -1
  46. package/bin/_lib_five_hour.py +126 -0
  47. package/bin/_lib_ingest_frontier.py +414 -20
  48. package/bin/_lib_journal.py +141 -10
  49. package/bin/_lib_jsonl.py +5 -4
  50. package/bin/_lib_legacy_spool.py +126 -0
  51. package/bin/_lib_legacy_writer_evidence.py +136 -0
  52. package/bin/_lib_merge_gate.py +29 -302
  53. package/bin/_lib_meter_rate_change.py +10 -0
  54. package/bin/_lib_outcome_quarantine.py +690 -0
  55. package/bin/_lib_pricing.py +7 -2
  56. package/bin/_lib_quarantine.py +154 -0
  57. package/bin/_lib_quota_calibration.py +53 -8
  58. package/bin/_lib_quota_copy.py +2 -1
  59. package/bin/_lib_quota_model.py +288 -46
  60. package/bin/_lib_rederive.py +94 -5
  61. package/bin/_lib_segment_summary.py +35 -2
  62. package/bin/_lib_statusline_candidates.py +292 -23
  63. package/bin/cctally +23 -1
  64. package/package.json +14 -1
@@ -313,6 +313,10 @@ PROJECTION_GATE_CALLERS: "dict[str, tuple[str, ...]]" = {
313
313
  #: and requires a statement verb earlier in that text than the match. Nothing
314
314
  #: about which reads are covered changed; what changed is that the count now
315
315
  #: means what its name says.
316
+ # #968 adds eight cache cursor/thread reads, one doctor prune-debt read,
317
+ # and two frontier cursor/debt reads. Fixed cursor pairs, thread tuples/TEMP
318
+ # views and debt enums cannot reach either quota projection table. This
319
+ # census is consumed only by test_selector_state_496_s5b.py; see its audit.
316
320
  PROJECTION_DYNAMIC_READ_SITES: "dict[str, int]" = {
317
321
  "_cctally_account.py": 1,
318
322
  # Three, all in `_import_legacy_conversation_rows`: `FROM main.{table}`,
@@ -340,7 +344,7 @@ PROJECTION_DYNAMIC_READ_SITES: "dict[str, int]" = {
340
344
  # has work without performing it (#780). `{table}` iterates the same
341
345
  # hardcoded `_LEGACY_BRIDGE_TABLES` tuple as the three reads above, so
342
346
  # neither reaches a projection family and neither needs an entry below.
343
- "_cctally_cache.py": 9,
347
+ "_cctally_cache.py": 17,
344
348
  # One, not two, since #750 S4: `_get_latest_row_for_week` composed
345
349
  # its `WHERE` clauses instead of branching on `as_of_utc`, so its
346
350
  # two near-identical `FROM {table_name}` reads became one. The
@@ -352,7 +356,7 @@ PROJECTION_DYNAMIC_READ_SITES: "dict[str, int]" = {
352
356
  # Six, not seven: `cctally: rebuilt stats.db from {} journal segment(s)` is
353
357
  # an operator line, not a statement, and no longer counts.
354
358
  "_cctally_db.py": 6,
355
- "_cctally_doctor.py": 1,
359
+ "_cctally_doctor.py": 2,
356
360
  "_cctally_five_hour.py": 1,
357
361
  # Sixteen, not eighteen: the two `event {} rev {} conflicts with effective
358
362
  # rev {} from {}` refusals are prose and no longer count.
@@ -365,7 +369,14 @@ PROJECTION_DYNAMIC_READ_SITES: "dict[str, int]" = {
365
369
  # `budget_milestones`, `projected_milestones` or
366
370
  # `project_budget_milestones`. None is a projection table, so it needs no
367
371
  # entry below.
368
- "_cctally_journal.py": 17,
372
+ #
373
+ # Nineteen since #825/#832 fix round E: `_rematerialize_scratch_row`'s
374
+ # row lookup by journal id and `_delete_scratch_row`'s removal by row id
375
+ # touch only a derivation-completion SCRATCH projection, and the table
376
+ # they interpolate is always an `_EVT_SPECS` table (the snapshot, reset,
377
+ # block and milestone families). None is a projection table, so neither
378
+ # needs an entry below.
379
+ "_cctally_journal.py": 19,
369
380
  "_cctally_pricing_check.py": 1,
370
381
  # One, in `_read_stats_component`: a single `SELECT {column} FROM
371
382
  # {table}` shared by `week_reset_events` and `weekly_credit_floors`,
@@ -373,6 +384,17 @@ PROJECTION_DYNAMIC_READ_SITES: "dict[str, int]" = {
373
384
  # so no `PROJECTION_DYNAMIC_READ_ACTIONS` classification applies.
374
385
  "_cctally_quota_model.py": 1,
375
386
  "_cctally_quota.py": 1,
387
+ # Two, both #825/#832 revision 5 per-account row counts:
388
+ # `_account_rows`' `SELECT COUNT(*) FROM {table}` behind the projection's
389
+ # classification evidence, and `_tokens_from`'s `SELECT COUNT(*),
390
+ # MAX(rowid) FROM {table}` behind a waiting head's dependency tokens
391
+ # (`_wait_tokens` before fix round K13, which shares it with the
392
+ # activating event's non-waiting read).
393
+ # `{table}` is always one of the hardcoded `weekly_usage_snapshots`,
394
+ # `week_reset_events`, `weekly_credit_floors`, `five_hour_reset_events`
395
+ # or `five_hour_blocks`; neither site reaches a quota projection table, so
396
+ # no `PROJECTION_DYNAMIC_READ_ACTIONS` classification applies.
397
+ "_cctally_statusline.py": 2,
376
398
  # One, in `_codex_rollup_revision`: the table is selected from a hardcoded
377
399
  # pair of Codex conversation rollups. Neither is a quota projection table,
378
400
  # so no `PROJECTION_DYNAMIC_READ_ACTIONS` classification applies.
@@ -400,7 +422,7 @@ PROJECTION_DYNAMIC_READ_SITES: "dict[str, int]" = {
400
422
  # total over those two names and raises on anything else. Every choice here
401
423
  # is hardcoded; none is a quota projection table, so no
402
424
  # `PROJECTION_DYNAMIC_READ_ACTIONS` classification applies.
403
- "_lib_ingest_frontier.py": 6,
425
+ "_lib_ingest_frontier.py": 8,
404
426
  "_lib_snapshot_cache.py": 1,
405
427
  "_lib_subscription_weeks.py": 1,
406
428
  }