mostlyright-data 0.31.29__tar.gz → 0.31.30__tar.gz

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 (131) hide show
  1. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/PKG-INFO +1 -1
  2. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/SKILL.md +24 -0
  3. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/making-a-table-incremental.md +23 -0
  4. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/table_manifest.py +8 -1
  5. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/recipe_explain.py +31 -4
  6. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/recipe_forecast.py +2 -2
  7. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/recipe_lint.py +10 -8
  8. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/recipe_test.py +6 -4
  9. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/studio_capabilities.py +3 -0
  10. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/table_search_contract.json +1 -1
  11. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4.py +2 -2
  12. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_runs.py +29 -6
  13. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/.gitignore +0 -0
  14. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/README.md +0 -0
  15. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/pyproject.toml +0 -0
  16. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/scripts/hatch_build.py +0 -0
  17. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/agents/openai.yaml +0 -0
  18. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/1-open-the-page-and-the-link-to-it-in-the-first-message.md +0 -0
  19. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/2-brief-two-to-four-questions-each-with-a-recommended-answer.md +0 -0
  20. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/3-probe-read-a-source-before-committing-to-it.md +0 -0
  21. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/4-decide-say-what-you-chose-what-you-refused-and-ask-one-question.md +0 -0
  22. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/5-draft-one-recipe-document-one-call.md +0 -0
  23. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/6-build-one-run-sized-to-acquire-every-measured-source-whole.md +0 -0
  24. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/7-interrogate-ask-the-run-what-it-actually-delivered.md +0 -0
  25. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/8-fix-revise-the-document-and-register-it-again.md +0 -0
  26. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/9-present-only-what-survived-inspection-with-caveats.md +0 -0
  27. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/agent-protocol.md +0 -0
  28. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/autonomous-delivery.md +0 -0
  29. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/before-the-first-tool-call.md +0 -0
  30. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/boundaries.md +0 -0
  31. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/cloud-authentication-preflight.md +0 -0
  32. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/commands.md +0 -0
  33. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/enriching-with-small-models.md +0 -0
  34. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/live-run.md +0 -0
  35. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/narrating-the-run.md +0 -0
  36. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/not-hosted-yet.md +0 -0
  37. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/one-install.md +0 -0
  38. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/patterns.md +0 -0
  39. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/predicting-with-tabular-models.md +0 -0
  40. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/prediction-labels.md +0 -0
  41. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/preparing-table-search.md +0 -0
  42. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/promote.md +0 -0
  43. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/readers.md +0 -0
  44. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/receipts.md +0 -0
  45. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/recipe-test.md +0 -0
  46. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/recording-a-stream-venue.md +0 -0
  47. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/recovering-an-import-failure.md +0 -0
  48. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/reference-pages.md +0 -0
  49. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/required-protocol.md +0 -0
  50. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/satellite-signals.md +0 -0
  51. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/source-credentials.md +0 -0
  52. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/sources.md +0 -0
  53. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/the-one-thing-to-say-about-the-skill-itself.md +0 -0
  54. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/transforms.md +0 -0
  55. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/user-communication-contract.md +0 -0
  56. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/references/writing-a-decision-record.md +0 -0
  57. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/skills/mr-data-build/scripts/write_research_notebook.py +0 -0
  58. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/__init__.py +0 -0
  59. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/agent_protocol.py +0 -0
  60. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/canonical.py +0 -0
  61. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/key_seam.py +0 -0
  62. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/page_coverage.py +0 -0
  63. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/part_check_evidence.py +0 -0
  64. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/session_probes.py +0 -0
  65. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/skill_assets.py +0 -0
  66. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/__init__.py +0 -0
  67. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/activity.py +0 -0
  68. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/backoff.py +0 -0
  69. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/categories.py +0 -0
  70. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/dataset-categories-v1.json +0 -0
  71. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/dataset_layout.py +0 -0
  72. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/delivery.py +0 -0
  73. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/description_shape.py +0 -0
  74. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/download.py +0 -0
  75. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/enrichment.py +0 -0
  76. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/fast_features.py +0 -0
  77. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/matching_benchmark.py +0 -0
  78. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/probe.py +0 -0
  79. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/progress_rate.py +0 -0
  80. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/progress_vocabulary.py +0 -0
  81. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/recipe.py +0 -0
  82. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/recipe_brief.py +0 -0
  83. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/refresh_rehearsal.py +0 -0
  84. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/release_check.py +0 -0
  85. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/research.py +0 -0
  86. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/router.py +0 -0
  87. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/run_diagnose.py +0 -0
  88. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/run_prefix.py +0 -0
  89. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/runs.py +0 -0
  90. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/session.py +0 -0
  91. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/stream.py +0 -0
  92. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/stream_venue.py +0 -0
  93. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/support.py +0 -0
  94. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/table_view.py +0 -0
  95. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/transport.py +0 -0
  96. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/user_agent.py +0 -0
  97. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_artifacts.py +0 -0
  98. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_catalog.py +0 -0
  99. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_connected.py +0 -0
  100. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_connections.py +0 -0
  101. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_dataset_covers.py +0 -0
  102. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_datasets.py +0 -0
  103. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_handoff.py +0 -0
  104. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_matching.py +0 -0
  105. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_narrative.py +0 -0
  106. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_public.py +0 -0
  107. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_query.py +0 -0
  108. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_reader.py +0 -0
  109. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_search.py +0 -0
  110. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_search_contract.py +0 -0
  111. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_secrets.py +0 -0
  112. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_stream.py +0 -0
  113. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/v4_tables.py +0 -0
  114. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/thin/vocabulary.py +0 -0
  115. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/__init__.py +0 -0
  116. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/attendance.py +0 -0
  117. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/clarification.py +0 -0
  118. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/cloud_auth.py +0 -0
  119. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/commands/__init__.py +0 -0
  120. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/commands/auth.py +0 -0
  121. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/commands/clarify.py +0 -0
  122. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/commands/login.py +0 -0
  123. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/commands/whoami.py +0 -0
  124. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/credential_native.py +0 -0
  125. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/credential_store.py +0 -0
  126. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/credentials.py +0 -0
  127. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/login.py +0 -0
  128. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/path_kind.py +0 -0
  129. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/plain_file.py +0 -0
  130. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/remediation.py +0 -0
  131. {mostlyright_data-0.31.29 → mostlyright_data-0.31.30}/src/mostlyright/data_harness/ux/render.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mostlyright-data
3
- Version: 0.31.29
3
+ Version: 0.31.30
4
4
  Summary: Mostly Right hosted CLI for reviewed datasets
5
5
  Project-URL: Homepage, https://mostlyright.md/
6
6
  Project-URL: Documentation, https://mostlyright.md/docs/guides/cli/
@@ -416,6 +416,30 @@ Measure bytes per day from the first full, and re-register before the first refr
416
416
  is short. [Needs server 4.14](references/making-a-table-incremental.md#needs-server-414) has the
417
417
  arithmetic, the guards, and the other features this check gates.
418
418
 
419
+
420
+ ### Hourly snapshot captures (Studio 4.67)
421
+
422
+ Check `mr-data recipe explain` first: `snapshot_refresh` and `hourly_snapshot_refresh` must both
423
+ be literal `true`. An hourly snapshot uses `window.granularity: hour`, UTC-aligned `start_at`,
424
+ `lookback_seconds: 0`, `max_span_seconds: 3600`, and merge partition key `iso_hour_prefix`. Use
425
+ the same encoding for `table.partition` when declared. The worker stamps the actual acquisition
426
+ time, not the rounded hour. It preserves the first successful complete capture in each UTC
427
+ hour; retries within that hour do not replace it, later observed hours append, and missed hours
428
+ are not fabricated. Existing daily snapshot replacement behavior is unchanged.
429
+
430
+ For hourly sources, `snapshot.max_partitions` counts **hours**, not days: fourteen days need
431
+ at least 336 partitions plus headroom. Size `max_source_bytes` for measured bytes per capture
432
+ times the entire horizon, within the existing 4 GiB ceiling. Do this before accumulating
433
+ history: a new recipe revision is not a lossless history migration. Full/sample replacement
434
+ requires explicit history-discard consent from the first hourly capture. Day-only forecasts
435
+ are unavailable for hourly history; inspect the receipt's `window_merge.partitions`.
436
+
437
+ After the first successful full, verify readiness and record the agreed hourly schedule. Use
438
+ `reschedule --lock` for an explicitly requested fixed schedule, and verify an actual cloud
439
+ scheduled capture with a query that includes earlier and later observations. A real fourteen-day
440
+ history takes fourteen days of observation. Raw-response archives, revision diffs and alerts
441
+ are separate features to verify against the brief.
442
+
419
443
  ## Communication and boundaries
420
444
 
421
445
  Keep routine operations quiet except where the host requires progress updates. Explain material
@@ -682,3 +682,26 @@ a transform does not run before source partition merging. Existing JSON cursor p
682
682
  do not add extraction of arXiv OAI-PMH XML continuation tokens to JSON-pointer pagination.
683
683
  Wikipedia's existing `public.https` date-in-path source remains a literal full fetch; this
684
684
  example does not prove an entire historical date-path backfill.
685
+
686
+ #### Hourly snapshot captures (Studio 4.67)
687
+
688
+ Check `mr-data recipe explain` first: `snapshot_refresh` and `hourly_snapshot_refresh` must both
689
+ be literal `true`. An hourly snapshot uses `window.granularity: hour`, UTC-aligned `start_at`,
690
+ `lookback_seconds: 0`, `max_span_seconds: 3600`, and merge partition key `iso_hour_prefix`. Use
691
+ the same encoding for `table.partition` when declared. The worker stamps the actual acquisition
692
+ time, not the rounded hour. It preserves the first successful complete capture in each UTC
693
+ hour; retries within that hour do not replace it, later observed hours append, and missed hours
694
+ are not fabricated. Existing daily snapshot replacement behavior is unchanged.
695
+
696
+ For hourly sources, `snapshot.max_partitions` counts **hours**, not days: fourteen days need
697
+ at least 336 partitions plus headroom. Size `max_source_bytes` for measured bytes per capture
698
+ times the entire horizon, within the existing 4 GiB ceiling. Do this before accumulating
699
+ history: a new recipe revision is not a lossless history migration. Full/sample replacement
700
+ requires explicit history-discard consent from the first hourly capture. Day-only forecasts
701
+ are unavailable for hourly history; inspect the receipt's `window_merge.partitions`.
702
+
703
+ After the first successful full, verify readiness and record the agreed hourly schedule. Use
704
+ `reschedule --lock` for an explicitly requested fixed schedule, and verify an actual cloud
705
+ scheduled capture with a query that includes earlier and later observations. A real fourteen-day
706
+ history takes fourteen days of observation. Raw-response archives, revision diffs and alerts
707
+ are separate features to verify against the brief.
@@ -92,7 +92,14 @@ _SUPPORTED_MANIFEST_SCHEMAS = frozenset((TABLE_MANIFEST_SCHEMA, TABLE_MANIFEST_S
92
92
  #: ``iso_month_prefix`` tables read as TABLE_MANIFEST_INVALID on 0.28.0.
93
93
  #: ``tests/test_thin_table_manifest_encodings.py`` holds this equal to the vendored recipe schema.
94
94
  MANIFEST_PARTITION_ENCODINGS: frozenset[str] = frozenset(
95
- {"value", "iso_date_prefix", "iso_date_value", "iso_month_prefix", "epoch_millis_value"}
95
+ {
96
+ "value",
97
+ "iso_date_prefix",
98
+ "iso_date_value",
99
+ "iso_month_prefix",
100
+ "iso_hour_prefix",
101
+ "epoch_millis_value",
102
+ }
96
103
  )
97
104
 
98
105
  #: The two media types the format adds to the closed artifact vocabulary.
@@ -136,6 +136,7 @@ CAPABILITY_NAMES: tuple[str, ...] = (
136
136
  "per_row_revisit_interval",
137
137
  "fresh_read_control",
138
138
  "snapshot_refresh",
139
+ "hourly_snapshot_refresh",
139
140
  "row_request_batch",
140
141
  "keyless_window",
141
142
  "keyless_post",
@@ -773,10 +774,15 @@ def _judge_snapshots(
773
774
  ]
774
775
  if not snapshots:
775
776
  return
777
+ unit = (
778
+ "capture"
779
+ if any(sources[name]["window"].get("granularity") == "hour" for name in snapshots)
780
+ else "day"
781
+ )
776
782
  if declared_rebuild(document) is not None:
777
783
  detail = (
778
784
  f"a whole-table rebuild reads {_in_words(snapshots)} fresh and would replace the "
779
- "days it holds with one"
785
+ f"{unit}s it holds with one"
780
786
  )
781
787
  if snapshot_refresh:
782
788
  found.append(
@@ -801,7 +807,7 @@ def _judge_snapshots(
801
807
  found.append(
802
808
  _blocking(
803
809
  REFRESH_WORKER_UNAVAILABLE,
804
- f"{_in_words(snapshots)} refreshes by appending the observed day, and no "
810
+ f"{_in_words(snapshots)} refreshes by appending the observed {unit}, and no "
805
811
  "snapshot-capable refresh worker is deployed",
806
812
  scope="estate",
807
813
  source_names=snapshots,
@@ -934,6 +940,16 @@ class _Facts:
934
940
  sources = document.get("sources")
935
941
  self.sources: list[Any] = sources if isinstance(sources, list) else []
936
942
  self.indices = _source_indices(self.sources)
943
+ self.snapshot_unit = (
944
+ "capture"
945
+ if any(
946
+ isinstance(source, Mapping)
947
+ and isinstance(source.get("window"), Mapping)
948
+ and source["window"].get("granularity") == "hour"
949
+ for source in self.sources
950
+ )
951
+ else "day"
952
+ )
937
953
  self.rebuild_declared = declared_rebuild(document) is not None
938
954
  # A rebuild is refused at registration beside a recorded stream and beside a snapshot
939
955
  # window, so it is suggested only where registration would admit it.
@@ -1127,7 +1143,8 @@ def _suggestions(finding: MirrorFinding, facts: _Facts) -> list[dict[str, Any]]:
1127
1143
  return [
1128
1144
  _suggestion(
1129
1145
  "wait_for_platform",
1130
- "snapshot refresh is switched off on this server until its day-append worker "
1146
+ "snapshot refresh is switched off on this server until its "
1147
+ f"{facts.snapshot_unit}-append worker "
1131
1148
  "is deployed and turned on",
1132
1149
  None,
1133
1150
  )
@@ -1137,7 +1154,7 @@ def _suggestions(finding: MirrorFinding, facts: _Facts) -> list[dict[str, Any]]:
1137
1154
  _suggestion(
1138
1155
  "split_table",
1139
1156
  f"keep the snapshot source {_in_words(names)} in a table that declares no "
1140
- "rebuild; it refreshes by appending one day at a time",
1157
+ f"rebuild; it refreshes by appending one {facts.snapshot_unit} at a time",
1141
1158
  facts.pointer(names[0]) if names else None,
1142
1159
  )
1143
1160
  ]
@@ -1302,6 +1319,12 @@ def not_served_detail(missing: Sequence[tuple[str, str]], why: str, *, known: bo
1302
1319
 
1303
1320
  ordered = sorted(missing, key=lambda item: item[1] != KEYLESS_POST)
1304
1321
  listed = ", ".join(f"{pointer} ({capability})" for pointer, capability in ordered)
1322
+ if any(capability == "hourly_snapshot_refresh" for _, capability in missing):
1323
+ return (
1324
+ f"not available on this server yet: {listed}. {why}. Nothing was registered. "
1325
+ "Wait for the server deployment that enables hourly snapshot captures; do not "
1326
+ "silently change the requested capture interval."
1327
+ )
1305
1328
  post = any(capability == KEYLESS_POST for _, capability in missing)
1306
1329
  others = any(capability != KEYLESS_POST for _, capability in missing)
1307
1330
  if post and others and known:
@@ -1363,6 +1386,8 @@ def gated_grammar(document: Mapping[str, Any]) -> list[tuple[str, str]]:
1363
1386
  partition = table.get("partition") if isinstance(table, Mapping) else None
1364
1387
  if isinstance(partition, Mapping) and partition.get("encoding") == "epoch_millis_value":
1365
1388
  gated.append(("/table/partition/encoding", "keyless_window"))
1389
+ if isinstance(partition, Mapping) and partition.get("encoding") == "iso_hour_prefix":
1390
+ gated.append(("/table/partition/encoding", "hourly_snapshot_refresh"))
1366
1391
  sources = document.get("sources")
1367
1392
  for index, source in enumerate(sources if isinstance(sources, list) else ()):
1368
1393
  if not isinstance(source, Mapping):
@@ -1381,6 +1406,8 @@ def gated_grammar(document: Mapping[str, Any]) -> list[tuple[str, str]]:
1381
1406
  if keyless_api and isinstance(request, Mapping) and request.get("method") == "POST":
1382
1407
  gated.append((f"{prefix}/connector/generic_api/request/method", "keyless_post"))
1383
1408
  window = source.get("window")
1409
+ if isinstance(window, Mapping) and window.get("granularity") == "hour":
1410
+ gated.append((f"{prefix}/window/granularity", "hourly_snapshot_refresh"))
1384
1411
  merge = window.get("merge") if isinstance(window, Mapping) else None
1385
1412
  partition = merge.get("partition") if isinstance(merge, Mapping) else None
1386
1413
  if isinstance(partition, Mapping) and partition.get("key") == "epoch_millis_value":
@@ -90,7 +90,7 @@ SUGGESTION_HEADROOM = Fraction(5, 4)
90
90
  #: The sentence every snapshot warning ends on (``CONTRACT.md`` §1.3).
91
91
  CEILING_IS_TERMINAL = (
92
92
  "The ceiling cannot be raised without discarding the history: raising it registers a new "
93
- "revision, whose first full must be started with discard_snapshot_history and keeps one day"
93
+ "revision, whose first full must be started with discard_snapshot_history and keeps one capture"
94
94
  )
95
95
 
96
96
  STATIC_REASON = (
@@ -579,7 +579,7 @@ def _snapshot_line(forecast: Mapping[str, Any]) -> str | None:
579
579
  return None
580
580
  name = forecast.get("source_name")
581
581
  horizon = (
582
- f"declared horizon {history.get('max_partitions')} days and "
582
+ f"declared horizon {history.get('max_partitions')} snapshot partitions and "
583
583
  f"{history.get('ceiling_bytes')} bytes"
584
584
  )
585
585
  if history.get("days_held") is None:
@@ -1653,8 +1653,8 @@ def _rebuild_coherence(document: Mapping[str, Any]) -> list[Finding]:
1653
1653
  DOCUMENT_INCOHERENT,
1654
1654
  "/rebuild",
1655
1655
  f"is declared beside the snapshot window of {named}, and a whole-table rebuild reads "
1656
- "a snapshot source fresh and would replace the days it holds; a snapshot table "
1657
- "refreshes by appending the observed day, so drop rebuild or move the snapshot "
1656
+ "a snapshot source fresh and would replace the captures it holds; a snapshot table "
1657
+ "refreshes by appending the observed capture, so drop rebuild or move the snapshot "
1658
1658
  "source into a table of its own",
1659
1659
  )
1660
1660
  ]
@@ -1664,11 +1664,11 @@ def snapshot_horizon_notes(document: Mapping[str, Any]) -> list[str]:
1664
1664
  """One sentence per snapshot window naming its declared horizon: advice, never a finding.
1665
1665
 
1666
1666
  ⚠ THE HORIZON IS FIXED ONCE THE RECIPE IS REGISTERED (``CONTRACT.md`` §1.3). A snapshot
1667
- table's history is bounded by ``window.snapshot.max_partitions`` days and by
1667
+ table's history is bounded by ``window.snapshot.max_partitions`` captures and by
1668
1668
  ``min(limits.max_source_bytes, 4 GiB)`` bytes, both recipe members; raising either registers
1669
- a new revision that cannot refresh against the old history, and its first full keeps one day.
1669
+ a new revision that cannot refresh against the old history; its first full keeps one capture.
1670
1670
  So the author is told the horizon now, while choosing it still costs nothing. Nothing here
1671
- fails the lint: a small horizon is a choice, and only its author knows the days to keep.
1671
+ fails the lint: a small horizon is a choice, and only its author knows the captures to keep.
1672
1672
  """
1673
1673
 
1674
1674
  notes: list[str] = []
@@ -1682,13 +1682,15 @@ def snapshot_horizon_notes(document: Mapping[str, Any]) -> list[str]:
1682
1682
  name = source.get("name")
1683
1683
  named = repr(name) if isinstance(name, str) and name else f"sources[{index}]"
1684
1684
  ceiling = min(declared, MAX_SNAPSHOT_MERGED_BYTES)
1685
+ unit = "hour" if source["window"].get("granularity") == "hour" else "day"
1685
1686
  notes.append(
1686
- f"snapshot source {named} keeps at most {partitions:,} days and "
1687
+ f"snapshot source {named} keeps at most {partitions:,} {unit}s and "
1687
1688
  f"{ceiling:,} bytes of history (window.snapshot.max_partitions, and the smaller of "
1688
1689
  "limits.max_source_bytes and the 4 GiB merge ceiling). This horizon is fixed once "
1689
1690
  "the recipe is registered: raising either ceiling registers a new revision whose "
1690
- "first full keeps one day. Size both for the whole history now: max_partitions at the "
1691
- "days to keep, max_source_bytes at bytes per day times those days with headroom"
1691
+ f"first full keeps one {unit}. Size both for the whole history now: "
1692
+ f"max_partitions at the {unit}s to keep, max_source_bytes at bytes per {unit} "
1693
+ f"times those {unit}s with headroom"
1692
1694
  )
1693
1695
  return notes
1694
1696
 
@@ -9,10 +9,12 @@ sealed as captures, and it ends ``cancelled`` with ``cancel_reason: preflight_co
9
9
  bounded ``preflight_report``, or ``failed`` with the failure triple the full would have met. It
10
10
  never seals a candidate, so it never becomes a version and never goes live.
11
11
 
12
- ⚠ THE FULL REUSES WHAT THE TEST FETCHED. ``mr-data run --full`` runs this first and, when nothing
13
- blocking was found, starts the full with ``resume_capture_run_id`` naming the test, so no page is
14
- fetched twice. That is the one place this module is called from outside ``recipe``, and it is why
15
- the reading of a report lives here rather than in either command.
12
+ ⚠ THE FULL REUSES WHAT THE TEST FETCHED. ``mr-data run --full`` runs this first and, when
13
+ nothing blocking was found, starts the full with ``resume_capture_run_id`` naming the test, when
14
+ the server retained reusable captures. If Studio explicitly reports that it kept none, the full
15
+ fetches its sources anew and the receipt says so. That is the one place this module is called
16
+ from outside ``recipe``, and it is why the reading of a report lives here rather than in either
17
+ command.
16
18
 
17
19
  ⚠ A STUDIO THAT CANNOT RUN IT IS NOT A FAILURE. A Studio before 4.31.0 answers 404 or 405, and a
18
20
  recipe another engine runs answers ``422 PREFLIGHT_ENGINE_UNSUPPORTED`` before any run exists. Both
@@ -34,6 +34,7 @@ ROW_FILTER = "row_filter"
34
34
  PER_ROW_REVISIT_INTERVAL = "per_row_revisit_interval"
35
35
  FRESH_READ_CONTROL = "fresh_read_control"
36
36
  SNAPSHOT_REFRESH = "snapshot_refresh"
37
+ HOURLY_SNAPSHOT_REFRESH = "hourly_snapshot_refresh"
37
38
  #: Served by every 4.15.0 API, which admits ``batch`` on a per-row request. An older API omits it.
38
39
  ROW_REQUEST_BATCH = "row_request_batch"
39
40
  KEYLESS_WINDOW = "keyless_window"
@@ -49,6 +50,7 @@ CAPABILITY_NAMES: tuple[str, ...] = (
49
50
  ROW_REQUEST_BATCH,
50
51
  KEYLESS_WINDOW,
51
52
  KEYLESS_POST,
53
+ HOURLY_SNAPSHOT_REFRESH,
52
54
  )
53
55
 
54
56
  #: What a Studio that serves neither explanation route serves.
@@ -124,6 +126,7 @@ __all__ = [
124
126
  "CAPABILITY_NAMES",
125
127
  "FRESH_READ_CONTROL",
126
128
  "GRAMMAR_NOT_SERVED_CODE",
129
+ "HOURLY_SNAPSHOT_REFRESH",
127
130
  "KEYLESS_CAPABILITIES",
128
131
  "KEYLESS_POST",
129
132
  "KEYLESS_WINDOW",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema_version": "mostlyright-thin-table-search-contract.v1",
3
- "source_commit": "63fb4414b489baa5d844bf69097f4efcb2d78ac7",
3
+ "source_commit": "4c30a3ccae722eaa32c71e616ff71d81cb02b49f",
4
4
  "recipe_search_definition": "recipe_search",
5
5
  "$defs": {
6
6
  "common.safe_integer": {
@@ -147,8 +147,8 @@ from mostlyright.data_harness.thin.v4_matching import CONTRACT_PATHS as MATCHING
147
147
  #: ``JOB_INVALID`` outright, which in production was every refresh a collection epoch was offered
148
148
  #: for rather than only the collection runs. This package must not reach a Studio older than the
149
149
  #: commit it pins; ``docs/V4-WORKER-PROTOCOL.md`` states it beside the layout's own ordering rule.
150
- PINNED_V4_OPENAPI_SOURCE_SHA256 = "b802651b84c4e64700d05070d65b39ee39ceb6e9c4ea595eaac796803ec7704c"
151
- PINNED_V4_CONTRACT_VERSION = "4.65.0"
150
+ PINNED_V4_OPENAPI_SOURCE_SHA256 = "93c03536770515b29226c544a115018bbd0d78a2921dd385ef4a197f32f4db52"
151
+ PINNED_V4_CONTRACT_VERSION = "4.67.0"
152
152
 
153
153
  #: The ``schema_version`` every command body that predates 4.14.0 stamps: ``dataset activity``,
154
154
  #: ``table rename``, ``table archive`` and ``dataset archive``. It is the number the 0.25 line
@@ -599,8 +599,8 @@ def declare_run_arguments(parser: argparse.ArgumentParser) -> None:
599
599
  DISCARD_HISTORY_FLAG,
600
600
  dest="discard_snapshot_history",
601
601
  action="store_true",
602
- help="with --full or --sample, agree to replace a snapshot table's accumulated daily "
603
- "history with the one day this run reads; the server refuses such a run without it. The "
602
+ help="with --full or --sample, agree to replace a snapshot table's accumulated "
603
+ "history with the one capture this run reads; the server refuses a run without it. The "
604
604
  "history cannot be fetched again. Needs a server that serves fresh_read_control (4.14.0)",
605
605
  )
606
606
  parser.add_argument(
@@ -2405,8 +2405,9 @@ def require_fresh_read_control(capabilities: Mapping[str, Any], flags: Sequence[
2405
2405
  #: detail. Read to lift the source, the live run and the history run into fields a script can use;
2406
2406
  #: the reason itself travels verbatim beside them, so a sentence this does not match loses nothing.
2407
2407
  _SNAPSHOT_REASON = re.compile(
2408
- r"^source (?P<source>.+?) holds the day-append history of live run (?P<live>[0-9a-f-]{36})"
2409
- r"(?:, made by refresh run (?P<history>[0-9a-f-]{36}))?"
2408
+ r"^source (?P<source>.+?) holds the (?:day-append|capture) history of live run "
2409
+ r"(?P<live>[0-9a-f-]{36})"
2410
+ r"(?:, made by (?:refresh )?run (?P<history>[0-9a-f-]{36}))?"
2410
2411
  )
2411
2412
 
2412
2413
 
@@ -2438,7 +2439,7 @@ def snapshot_history_refusal(refusal: ThinLaneError, rerun: str) -> ThinLaneErro
2438
2439
  history_runs.append(matched.group("history"))
2439
2440
  live = live_runs[0] if live_runs else None
2440
2441
  history = history_runs[0] if history_runs else None
2441
- said = ["This table holds snapshot history, and this run would replace it with one day."]
2442
+ said = ["This table holds snapshot history, and this run would replace it with one capture."]
2442
2443
  if sources:
2443
2444
  said.append(f"Snapshot sources: {', '.join(sources)}.")
2444
2445
  if live:
@@ -2586,7 +2587,29 @@ def start(args: argparse.Namespace, *, client: StudioV4RunClient | None = None)
2586
2587
  if tested is not None and tested.stop is not None:
2587
2588
  return tested.stop
2588
2589
  try:
2589
- run = selected.create_run(body)
2590
+ try:
2591
+ run = selected.create_run(body)
2592
+ except ThinLaneError as refusal:
2593
+ # Only the ancestor added by this invocation's successful test may fall back.
2594
+ # A user-stated resume remains binding, and any other refusal is unchanged.
2595
+ if not (
2596
+ tested is not None
2597
+ and tested.resume_capture_run_id is not None
2598
+ and body.get("resume_capture_run_id") == tested.resume_capture_run_id
2599
+ and _resume_reuses_nothing(refusal)
2600
+ ):
2601
+ raise
2602
+ body.pop("resume_capture_run_id")
2603
+ tested.resume_capture_run_id = None
2604
+ tested.block = {
2605
+ **(tested.block or {}),
2606
+ "captures_reused": False,
2607
+ "note": (
2608
+ "The test passed but kept no reusable captures; "
2609
+ "the full fetches its sources anew."
2610
+ ),
2611
+ }
2612
+ run = selected.create_run(body)
2590
2613
  # The create route is idempotent and can return a previous terminal result.
2591
2614
  # Report its actual state rather than promising that another worker was queued.
2592
2615
  state = run.get("status")