mostlyright-data 0.25.9__tar.gz → 0.26.1__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 (118) hide show
  1. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/PKG-INFO +1 -1
  2. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/pyproject.toml +1 -1
  3. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/SKILL.md +27 -34
  4. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/5-draft-one-recipe-document-one-call.md +8 -120
  5. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/6-build-one-run-sized-to-acquire-every-measured-source-whole.md +13 -18
  6. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/commands.md +17 -22
  7. mostlyright_data-0.26.1/skills/mr-data-build/references/making-a-table-incremental.md +473 -0
  8. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/promote.md +11 -14
  9. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/readers.md +1 -0
  10. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/sources.md +30 -18
  11. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/activity.py +2 -2
  12. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/commands.py +24 -3
  13. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/recipe.py +372 -86
  14. mostlyright_data-0.26.1/src/mostlyright/data_harness/thin/recipe_explain.py +1564 -0
  15. mostlyright_data-0.26.1/src/mostlyright/data_harness/thin/recipe_forecast.py +589 -0
  16. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/recipe_lint.py +255 -6
  17. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/research.py +38 -6
  18. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/router.py +10 -1
  19. mostlyright_data-0.26.1/src/mostlyright/data_harness/thin/run_diagnose.py +332 -0
  20. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/session.py +124 -1
  21. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/stream.py +147 -18
  22. mostlyright_data-0.26.1/src/mostlyright/data_harness/thin/studio_capabilities.py +118 -0
  23. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4.py +179 -4
  24. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_datasets.py +203 -12
  25. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_public.py +24 -1
  26. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_runs.py +449 -21
  27. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_stream.py +22 -7
  28. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_tables.py +298 -25
  29. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/vocabulary.py +27 -9
  30. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/.gitignore +0 -0
  31. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/README.md +0 -0
  32. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/scripts/hatch_build.py +0 -0
  33. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/agents/openai.yaml +0 -0
  34. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/1-open-the-page-and-the-link-to-it-in-the-first-message.md +0 -0
  35. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/2-brief-two-to-four-questions-each-with-a-recommended-answer.md +0 -0
  36. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/3-probe-read-a-source-before-committing-to-it.md +0 -0
  37. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/4-decide-say-what-you-chose-what-you-refused-and-ask-one-question.md +0 -0
  38. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/7-interrogate-ask-the-run-what-it-actually-delivered.md +0 -0
  39. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/8-fix-revise-the-document-and-register-it-again.md +0 -0
  40. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/9-present-only-what-survived-inspection-with-caveats.md +0 -0
  41. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/agent-protocol.md +0 -0
  42. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/autonomous-delivery.md +0 -0
  43. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/before-the-first-tool-call.md +0 -0
  44. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/boundaries.md +0 -0
  45. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/cloud-authentication-preflight.md +0 -0
  46. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/cross-repository-protocol-reference.md +0 -0
  47. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/installation-parity.md +0 -0
  48. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/live-run.md +0 -0
  49. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/narrating-the-run.md +0 -0
  50. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/not-hosted-yet.md +0 -0
  51. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/one-install.md +0 -0
  52. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/prediction-labels.md +0 -0
  53. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/receipts.md +0 -0
  54. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/recording-a-stream-venue.md +0 -0
  55. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/recovering-an-import-failure.md +0 -0
  56. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/reference-pages.md +0 -0
  57. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/required-protocol.md +0 -0
  58. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/source-credentials.md +0 -0
  59. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/the-one-thing-to-say-about-the-skill-itself.md +0 -0
  60. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/transforms.md +0 -0
  61. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/user-communication-contract.md +0 -0
  62. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/references/writing-a-decision-record.md +0 -0
  63. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/skills/mr-data-build/scripts/write_research_notebook.py +0 -0
  64. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/__init__.py +0 -0
  65. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/agent_protocol.py +0 -0
  66. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/canonical.py +0 -0
  67. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/formats.py +0 -0
  68. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/hosted_crawler_protocol.py +0 -0
  69. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/key_seam.py +0 -0
  70. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/page_coverage.py +0 -0
  71. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/part_check_evidence.py +0 -0
  72. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/session_probes.py +0 -0
  73. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/skill_assets.py +0 -0
  74. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/table_manifest.py +0 -0
  75. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/__init__.py +0 -0
  76. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/acquire.py +0 -0
  77. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/acquire_cancel.py +0 -0
  78. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/approvals.py +0 -0
  79. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/categories.py +0 -0
  80. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/dataset-categories-v1.json +0 -0
  81. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/download.py +0 -0
  82. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/narrative.py +0 -0
  83. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/parity.py +0 -0
  84. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/probe.py +0 -0
  85. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/progress_vocabulary.py +0 -0
  86. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/propose.py +0 -0
  87. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/recipe_brief.py +0 -0
  88. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/runs.py +0 -0
  89. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/stream_venue.py +0 -0
  90. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/transport.py +0 -0
  91. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/user_agent.py +0 -0
  92. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_artifacts.py +0 -0
  93. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_catalog.py +0 -0
  94. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_connected.py +0 -0
  95. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_connections.py +0 -0
  96. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_dataset_covers.py +0 -0
  97. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_handoff.py +0 -0
  98. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_narrative.py +0 -0
  99. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_query.py +0 -0
  100. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_reader.py +0 -0
  101. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/thin/v4_secrets.py +0 -0
  102. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/__init__.py +0 -0
  103. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/attendance.py +0 -0
  104. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/clarification.py +0 -0
  105. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/cloud_auth.py +0 -0
  106. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/commands/__init__.py +0 -0
  107. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/commands/auth.py +0 -0
  108. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/commands/clarify.py +0 -0
  109. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/commands/login.py +0 -0
  110. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/commands/whoami.py +0 -0
  111. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/credential_native.py +0 -0
  112. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/credential_store.py +0 -0
  113. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/credentials.py +0 -0
  114. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/login.py +0 -0
  115. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/path_kind.py +0 -0
  116. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/plain_file.py +0 -0
  117. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/src/mostlyright/data_harness/ux/remediation.py +0 -0
  118. {mostlyright_data-0.25.9 → mostlyright_data-0.26.1}/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.25.9
3
+ Version: 0.26.1
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/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mostlyright-data"
3
- version = "0.25.9"
3
+ version = "0.26.1"
4
4
  description = "Mostly Right hosted CLI for reviewed datasets"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -43,28 +43,13 @@ references. Load the reference for the current stage only, not the entire librar
43
43
  Bind `dataset.id`, describe columns, declare checks and units, and register with
44
44
  `mr-data recipe RECIPE.json --json`. Repair all lint findings before queuing work.
45
45
  The server returns the recipe digest; do not compute or invent it.
46
- Decide each source's refresh continuation before you register it: `closed: true` where the
47
- address names a range that has demonstrably ended, a `window` with **both** `request`
48
- endpoints where the address carries a date range, a `collection` where the corpus is an index
49
- of pages, and nothing where the source is mutable with no changed-since contract. A keyed JSON
50
- API (`authenticated.https.api_key@2.0.0` or `@2.1.0`) takes its `window` through declared
51
- request parameters, with `location: "parameter"` on both endpoints. Its run walks the window
52
- one day or month at a time, so it must state `limits.max_requests`, sized for every unit. A source
53
- declaring none of these is `resync_only`, and one `resync_only` source makes the entire table
54
- resync-only: it will never refresh on a schedule. Declaring every source is only the first
55
- gate; the shape those declarations form is the second, and Studio admits two families only:
56
- every source a recorded stream, or at least one `window` with a `request`. Beside a window the
57
- plan may hold `closed` siblings, or per-row request collections that carry the window's
58
- partition column, but not both. A closed-only plan, any other `collection`, and a `window`
59
- beside a recorded stream are each refused, so `closed: true` alone does not make a
60
- table refresh. The second family is necessary and not sufficient: as soon as the plan holds
61
- more than one source, every window in it must agree on one `merge.materialization`,
62
- `merge.partition.column` and `merge.partition.key`, and that column must be a name
63
- `table.columns` declares. Adding one `closed` sibling beside a lone window is what turns that
64
- requirement on, so a window partitioning on the publisher's own header under a name the table
65
- renames refreshes alone and stops the moment a second source joins it. Declare only what the
66
- source's own address proves, and name the `resync_only` sources and the reason in the build
67
- message.
46
+ Decide how each source continues before you register it, and whether the table needs a
47
+ declared `rebuild`: read [making a table incremental](references/making-a-table-incremental.md).
48
+ Run `mr-data recipe explain RECIPE.json --json` first. It names every reason the table could
49
+ not refresh, not only the first. Before any `--full` of a paid collection, run
50
+ `mr-data recipe forecast RECIPE_ID --digest DIGEST --json` and cap `pages.max_fetches_per_run`
51
+ from it. Declare only what the source's own address proves, and name the `resync_only`
52
+ sources and the reason in the build message.
68
53
  6. Read [build sizing](references/6-build-one-run-sized-to-acquire-every-measured-source-whole.md).
69
54
  Use `--full` for the requested build: it is progressive by default, with a five-minute
70
55
  inspection checkpoint while the same acquisition continues. Choose bounds from measured
@@ -125,18 +110,13 @@ merely to obtain a green run. Read [recovery details](references/agent-protocol.
125
110
  Record cadence only when authorized and `mr-data recipe readiness --json` reports the current
126
111
  revision refresh-ready. A blocked mutable snapshot requires an explicit table resync, not a
127
112
  scheduled whole-source fallback. Do not promise freshness without evidence.
128
- A recipe that is not refresh-ready is a design fault to repair, not a state to wait out: read
129
- `blocking_source_names` and every source's classification in the readiness answer. That list
130
- is all-or-nothing: when one source states no continuation Studio cannot derive a plan at all,
131
- so it classifies EVERY source `resync_only` and names every one of them, and a twenty-source
132
- recipe with one bare address comes back with twenty names rather than the one to repair. Read
133
- the document to find which of them actually declares nothing rather than revising nineteen
134
- truthful windows. An EMPTY list beside `refresh_ready: false` is the other answer: every source
135
- is declared and the plan's SHAPE or its predecessor state is what refuses. Revise against what
136
- this run measured, register the revision and resync once. The
137
- revision changes the recipe digest, so the sealed predecessor stops matching and one full
138
- resync is the price of the repair -- which is why the decision belongs in step 5. A table left
139
- not refresh-ready never refreshes; it does not become ready later.
113
+ A recipe that is not refresh-ready is a design fault to repair, not a state to wait out. Run
114
+ `mr-data recipe explain RECIPE_ID --json`: each finding names its rule code, its sources and
115
+ Studio's suggested repair, and [making a table incremental](references/making-a-table-incremental.md#which-plans-refresh)
116
+ says what each code means. Revise against what this run measured, register the revision and
117
+ resync once. The revision changes the recipe digest, so one full resync is the price of the
118
+ repair, which is why the decision belongs in step 5. A table left not refresh-ready never
119
+ refreshes unless it declares `rebuild`; it does not become ready later.
140
120
  Download and verify artifacts when the user requested bytes.
141
121
  10. Report rows and coverage actually verified, checks, limitations and the stable dataset link.
142
122
  Read [delivery](references/9-present-only-what-survived-inspection-with-caveats.md) for details.
@@ -153,10 +133,23 @@ merely to obtain a green run. Read [recovery details](references/agent-protocol.
153
133
  | Source credentials | [Credentials](references/source-credentials.md) |
154
134
  | Live stream recording | [Streams](references/recording-a-stream-venue.md) |
155
135
  | Prediction target or leakage | [Prediction labels](references/prediction-labels.md) |
136
+ | How each source continues, `rebuild`, and the cost of a refresh | [Making a table incremental](references/making-a-table-incremental.md) |
156
137
  | Refresh cadence | [Promotion and cadence](references/promote.md) |
157
138
  | Dataset notes and evidence blocks | [Decision records](references/writing-a-decision-record.md) |
158
139
  | Exact schemas and worked recipes | [Reference index](references/reference-pages.md) |
159
140
 
141
+ ## Needs Studio 4.14
142
+
143
+ Check first: run `mr-data recipe explain RECIPE.json --json` and read `studio_capabilities`. Use
144
+ this only when `snapshot_refresh` is true; otherwise a snapshot table keeps the one day its last
145
+ full read, and that is what to tell the user. With it true, a snapshot table keeps a daily history,
146
+ and its size is decided when you register it. **The history ceiling is fixed at registration, and
147
+ raising it discards the history.** Set `window.snapshot.max_partitions` to the number of days to
148
+ keep, and `limits.max_source_bytes` to bytes per day × those days with headroom, up to 4 GiB.
149
+ Measure bytes per day from the first full, and re-register before the first refresh if the horizon
150
+ is short. [Needs Studio 4.14](references/making-a-table-incremental.md#needs-studio-414) has the
151
+ arithmetic, the guards, and the other features this check gates.
152
+
160
153
  ## Communication and boundaries
161
154
 
162
155
  Keep routine operations quiet except where the host requires progress updates. Explain material
@@ -304,126 +304,14 @@ drawn with its endpoint alone, and a reader is left to guess from a query string
304
304
 
305
305
  ### Say how each source refreshes
306
306
 
307
- Studio reads one refresh strategy per source out of this document, and a source that states none
308
- is `resync_only`. One `resync_only` source makes the whole table resync-only: it never refreshes
309
- on a schedule, however truthful its siblings are.
310
-
311
- | what the source declares | classification | next action |
312
- | --- | --- | --- |
313
- | `source_class: "stream"` | `recorded` | `recorded` |
314
- | `closed: true` | `closed` | `reuse_predecessor` |
315
- | a `collection` | `collection` | `acquire_incremental` |
316
- | a `window` carrying a `request` | `window` | `acquire_incremental` |
317
- | none of those | `resync_only` | `resync_required` |
318
-
319
- The rows are in Studio's own precedence order -- stream, then `closed`, then `collection`, then
320
- `window` -- because a source may declare more than one of those members and the first match wins.
321
- A source carrying both `closed: true` and a request window is `closed`, and its window is never
322
- read. A recorded stream that also says `closed: true` is `recorded`, not `closed`.
323
-
324
- `closed: true` says the range at this address is over and a refresh may reuse the bytes the
325
- predecessor sealed rather than ask again. Use it for a range that has demonstrably ended, and
326
- understand what you are accepting: if the publisher later restates that period, the table keeps
327
- serving the old bytes, no run fails, and only an explicit resync repairs it. Never mark the
328
- current period closed -- that drops new data outright, which is a different and worse mistake.
329
-
330
- A `window` is the better answer wherever the address carries time, because it re-requests its
331
- recent range on every refresh and so picks up corrections inside `lookback_seconds` on its own.
332
- It needs `start_at`, `granularity`, `timezone`, `lookback_seconds`, `max_span_seconds` and
333
- `merge`, and a `request` naming BOTH ends -- an address that names only one side of a range
334
- cannot be narrowed. Each grammar below is closed; a spelling outside it belongs to a later
335
- version and is refused.
336
-
337
- - `request.start` and `request.end` take `encoding`: `date_parts` (names three parameters and
338
- takes `pad`), `iso_date` or `epoch_seconds` (each names one parameter and takes no `pad`).
339
- - Each endpoint's `location` is `query` (the default) or `path` for an address. A keyed JSON API
340
- (`authenticated.https.api_key@2.0.0` or `@2.1.0`) states `parameter` on both. Each name is then
341
- a required declaration in `generic_api.request.parameters` that the request interpolates. Its
342
- run walks the window one day or month at a time, and the source states `limits.max_requests`.
343
- *A date window* in
344
- [the recipe document](https://mostlyright.md/docs/reference/recipe/) has the rules.
345
- - `bound` is `inclusive` or `exclusive`. The engine's own window is half-open
346
- `[start_inclusive, end_exclusive)` in UTC; start/inclusive and end/exclusive pass both instants
347
- through unchanged, and the other two spellings shift by a day. **Probe the publisher rather
348
- than assuming**: both spellings validate against the schema, and only the start is checked at
349
- registration, so a wrong `end` silently fetches a different range than the address states.
350
- - `merge.materialization` is `partition_replace` only.
351
- - `merge.partition.column` names a column of the ACQUIRED relation -- the header the publisher
352
- sent, not the name your statement gives it. **That holds only while the window is the recipe's
353
- one source.** In a plan of more than one source the column must ALSO be a name `table.columns`
354
- declares, so a renamed field is refused at admission and has to take the one-source route. If
355
- this recipe has, or will have, a second source of any kind -- a `closed` sibling is enough --
356
- partition on a name the table itself declares.
357
- - `merge.partition.key` is `iso_date_prefix` (first ten characters of an ISO value),
358
- `iso_date_value` (a complete ISO date), `compact_utc_hour` (a real `YYYYMMDDHH`) or
359
- `iso_month_prefix` (the first seven characters, a calendar month). A month key needs `start_at`
360
- on the first of a month and `max_span_seconds` of at least 7,948,800.
361
- - `merge.row_identity` names the columns the merged relation must be unique on.
362
-
363
- `start_at` is a UTC midnight, and the start parameters already written in the address must render
364
- exactly that instant. If the address says `year1=2026&month1=5&day1=31`, `start_at` is
365
- `2026-05-31T00:00:00Z`. A keyed JSON API's start values frozen in `connector.parameters` must
366
- render it the same way.
367
-
368
- Declaring nothing is the honest answer for a mutable address with no changed-since contract, and
369
- pagination is not one. Say which sources you left `resync_only` and why, because a recipe that
370
- never asked the question and one that asked and answered `resync_only` register identically.
371
-
372
- **Declaring every source is the FIRST gate, and the SHAPE of the plan is the second.** Once Studio
373
- has one action per source it asks whether a worker can materialize the plan those actions make,
374
- and admits two families only: every source a recorded stream, which appends sealed batches, or at
375
- least one `window` carrying a `request`, with `closed` siblings permitted beside it, which replaces
376
- the bounded partitions the window asked for. A closed-only plan refreshes nothing -- it restores
377
- the predecessor's bytes and leaves no partition to replace. Any `collection` in the plan refuses
378
- the whole table, alone or beside a window, with one exception. A per-row request collection over
379
- a `window` of the plan refreshes with it when it names the window's `merge.partition.column` in
380
- `request.carry_columns` and no `closed` source is in the plan. A `window` beside a recorded stream
381
- refuses the whole table too. Each
382
- of those is `RESYNC_REQUIRED` before acquisition: the table registers, builds and serves, and only
383
- an explicit resync ever moves it again. So `closed: true` alone does NOT make a table refresh, and
384
- marking every source closed to clear the first warning buys a table that is just as dead and warns
385
- about nothing.
386
-
387
- **The second family is NECESSARY and not sufficient, and the count is of sources.** A plan holding
388
- more than one source -- one `window` and one `closed` sibling is already two -- is materialized by
389
- the several-source lane, which writes ONE table manifest. Every window in such a plan must
390
- therefore agree with the others on `merge.materialization`, `merge.partition.column` and
391
- `merge.partition.key`, and each partition column must be a name `table.columns` declares.
392
- Disagreeing windows, and a partition column the table does not declare, are both
393
- `RESYNC_REQUIRED`. So adding a `closed` sibling beside a lone window is not free: it is what turns
394
- the declared-column requirement on.
395
-
396
- **The THIRD gate is the SHAPE OF THE DOCUMENT, and a run is what checks it.** A recipe with
397
- exactly one source carrying a `request` window builds on a bounded route of its own, and that
398
- route holds the document to six further rules: the partition column inside `merge.row_identity`,
399
- `merge.row_identity` equal to `table.grain` in order, at least one identity column besides the
400
- partition column, a rename-free one-statement projection with no `where` and no function,
401
- `key_uniqueness` as the only check kind, and rows the publisher already served in order. Three of
402
- the six refuse the run. The other three fail silently: they drop every later refresh onto the
403
- complete-history fallback, which rebuilds the whole table and is what the window was declared to
404
- avoid. Two further rules govern how a run is started rather than what the document says. Register,
405
- build with a `full` run, and only then refresh, because a refresh reads its recipe off the latest
406
- SUCCEEDED run rather than the newest registered revision. A refresh started by hand states its own
407
- `--window START END`, or it is refused `RUN_WINDOW_REQUIRED`. [The recipe
408
- document](https://mostlyright.md/docs/reference/recipe/) writes all eight out under *What the
409
- bounded lane needs, beyond a usable window*, and says which fail which way. Fetch that section
410
- before the first build, because none of it is visible at registration.
411
-
412
- **Decide it from MEASUREMENT, not from the ceiling you typed.** `limits.max_source_bytes` is a
413
- bound written before anything was fetched, and it is wrong in both directions: one live publisher
414
- came in an order of magnitude under the ceiling declared for it, and another came in over. The
415
- run's own coverage is the other thing entirely. Build once, read the coverage, and correct the
416
- declarations against it before you record a cadence. A revision changes the recipe digest and
417
- costs one full resync, so the cheapest time to be right is here.
418
-
419
- **Where that coverage is depends on the route the build took.** An ordinary build seals a
420
- `receipt`, and `mr-data receipt RUN --json` carries one entry per source with `bytes_fetched`,
421
- `rows_kept`, `rows_available` and `truncated`. A build on the one-windowed-source bounded route
422
- seals no receipt at all, and `mr-data receipt` answers `THIN_NO_MATCHING_ARTIFACT` naming what it
423
- sealed instead. Read `mr-data status RUN --json` for that one: its `coverage` block carries `rows`,
424
- `bytes`, `window` and `truncated`. That block is Studio's fold over every source, so it is one
425
- source's own delivery only on a one-source recipe, which this route always is. Only
426
- `rows_available` is missing, and `truncated` still says whether a ceiling cut the source short.
307
+ Studio reads one continuation per source out of this document, and a source that states none is
308
+ `resync_only`. One `resync_only` source makes the whole table resync-only: it never refreshes on a
309
+ schedule, however truthful its siblings are. Choose each source's continuation, and decide
310
+ whether the table declares `rebuild`, with
311
+ [making a table incremental](making-a-table-incremental.md). It has the decision tree, the
312
+ request window grammar, the plan shapes Studio refreshes, and what each continuation costs. Run
313
+ `mr-data recipe explain RECIPE.json --json` on the draft before you register it: it names every
314
+ reason the table could not refresh at once, with Studio's suggested repair for each.
427
315
 
428
316
  ### Say what each column is, and what it shows
429
317
 
@@ -187,21 +187,16 @@ held answer prints back as `confirm_command`. Any authenticated surface of the p
187
187
  settle it. `mr-data run --cancel RUN_ID` stops a run that is queued or running.
188
188
 
189
189
  Do not treat the accepted command vocabulary as execution evidence. Before proposing a schedule,
190
- classify every source under one truthful continuation strategy and record the supporting evidence.
191
- Normal refresh materializes an all-recorded-stream recipe, or a plan holding at least one direct
192
- `window.request` source with a compatible partitioned predecessor, `closed` reuse permitted beside
193
- it. Beside it is not free: as soon as the plan holds more than one source, every window in it must
194
- agree on one `merge.materialization`, `merge.partition.column` and `merge.partition.key`, and that
195
- column must be a name the table declares. A per-row request collection that reads a window of
196
- the plan and carries its partition column may join it when no `closed` source does. The
197
- classifier may name closed reuse or collection continuation. Closed-only plans, any plan carrying
198
- another collection, and a window beside a recorded stream still return `RESYNC_REQUIRED` before
199
- acquisition. Their bounded table materializers do not exist yet. A `window.snapshot` or unwindowed mutable source is likewise
200
- resync-only. Explicit resync is full,
201
- has no predecessor, and a collection starts from the beginning. Never hide one behind conditional
202
- revalidation, generic pagination, or a whole-source comparison. Research publisher cursors,
203
- revision identities, listings, corrections, and deletions, but use only deployed recipe grammar
204
- that represents the proven strategy. For each incremental source, record the affected key or
205
- partition and a fixture proving
206
- that applying its delta to the predecessor produces the same rows as a full build over
207
- predecessor-plus-delta. A `backfill` may be refused before acquisition; the refusal says so.
190
+ classify every source under one truthful continuation strategy and record the supporting evidence,
191
+ using [making a table incremental](making-a-table-incremental.md).
192
+ `mr-data recipe explain RECIPE_ID --json` says which plan shapes this Studio refreshes and why a
193
+ table does not. Explicit
194
+ resync is full, has no predecessor, and a collection starts from the beginning. Never hide one
195
+ behind conditional revalidation, generic pagination, or a whole-source comparison. Research
196
+ publisher cursors, revision identities, listings, corrections, and deletions, but use only
197
+ deployed recipe grammar that represents the proven strategy. For each incremental source, record
198
+ the affected key or partition and a fixture proving that applying its delta to the predecessor
199
+ produces the same rows as a full build over predecessor-plus-delta. Before a `--full` of a paid
200
+ collection, run `mr-data recipe forecast RECIPE_ID --digest DIGEST --json` and cap
201
+ `pages.max_fetches_per_run` from it. A `backfill` may be refused before acquisition; the refusal
202
+ says so.
@@ -12,11 +12,11 @@ gap rather than doing anything, and `export-hosted-candidate`, which is a backen
12
12
  | `mr-data probe` | `probe SOURCE_ID QUESTION_ID --dataset DATASET_ID [--kind source_inspect\|sample_rows\|profile_columns\|evaluate_expression]` asks one already-registered source one question and prints the answer. **Do not plan a source inspection around it.** Both positionals are identifiers — `QUESTION_ID` is a question identifier, which no v4 registration receipt returns — and the command rides the frozen `/v3/sessions` routes, which a deployment may have switched off. Read a source instead by registering the recipe and taking one unwindowed run under `--max-rows`, then `peek`, `query` and `receipt`. |
13
13
  | `mr-data catalog` | `catalog search "QUESTION"` asks the sealed public-source catalogue which of its entries might answer a question and ranks them best first. Every ranked entry comes back with the disposition its own facts earned — `admitted`, `human_escalation_required` or `refused` — because an entry the catalogue could not vouch for is still a finding. `--format csv` states the one data format the question requires — one token per question, never repeated — and it is not a filter: an entry that does not declare that format still comes back ranked, with disposition `refused` and `filters_match` false, so nothing is held back; `--limit N` ranks at most N, up to 25. It fetches nothing and registers nothing. The catalogue holds one provider (Data.gov) and only part of it, so it is never exhaustive and an empty answer is not evidence that no such source exists. When the answer is `catalog_unavailable`, this deployment has no catalogue to search: record the lane and carry on. |
14
14
  | `mr-data dataset` | Bring the dataset page into existence before there is anything on it, then fill it in while somebody watches. `dataset create --name TEXT` mints it and prints the `dataset_id`; `dataset show ID` reads it back; `dataset set ID --name TEXT --topics "a,b,c" --license ID --description-file F` writes the title, the descriptive tags, the SPDX licence and the description under the version it was read at, retrying once if somebody else wrote first, and an empty `--topics` or `--license` takes that value off the page; a saved write whose public sync fails exits 2 and reports `public_projection_synced: false` — use `dataset sync ID` to retry that sync without rewriting Studio; `dataset note ID --heading H --blocks-file B` writes one cell of the decision record that OUTLIVES every run, and `--list` reads it back; `dataset watch ID` follows the page's own event stream; `dataset activity ID --phase P --message TEXT` says what is happening right now, silently, and is never a chat message and never a cell; `dataset publish ID [--mode public|link|private]` says who can read the dataset — `public` lists it in the public directory and serves it at an address anybody can read, `link` serves it at an unlisted address, `private` takes it back to the workspace — and `dataset publish ID --show` reads that back without changing it; `dataset archive ID --confirm-name TITLE` retires the page and frees its title, deleting nothing. |
15
- | `mr-data recipe` | Register one recipe document — dataset, question, table plan, sources, transform, checks and units — in one call, and print the identifiers the server derived. The document is read first and every fault comes back in one refusal, each with the JSON pointer that names it; `--no-lint` sends it as written instead. Registration refuses `THIN_BRIEF_MISSING` when the dataset's record carries no answered question and no delegation, and `THIN_RECIPE_DATASET_UNBOUND` when the document names no `dataset.id`; `--delegated "their words"` writes the delegation onto the dataset and registers in the same command, and clears the first of those two and never the second. `mr-data recipe show ID` reads one back. |
15
+ | `mr-data recipe` | Register one recipe document — dataset, question, table plan, sources, transform, checks and units — in one call, and print the identifiers the server derived. The document is read first and every fault comes back in one refusal, each with the JSON pointer that names it; `--no-lint` sends it as written instead. Registration refuses `THIN_BRIEF_MISSING` when the dataset's record carries no answered question and no delegation, and `THIN_RECIPE_DATASET_UNBOUND` when the document names no `dataset.id`; `--delegated "their words"` writes the delegation onto the dataset and registers in the same command, and clears the first of those two and never the second. `mr-data recipe show ID` reads one back. `mr-data recipe explain FILE` (or a recipe identifier) lists every reason its table can or cannot refresh, each with a rule code and Studio's suggested repair, and exits 2 when one blocks it. `mr-data recipe forecast RECIPE_ID --digest DIGEST` says what one run would ask of each source before it runs, and exits 3 when the run would overrun today's platform quota or one attempt. `mr-data recipe readiness --table TABLE_ID --current-only` reads the revision one table runs now. [Making a table incremental](making-a-table-incremental.md#the-loop-explain-forecast-run-diagnose) says when to use each. |
16
16
  | `mr-data cover` | Generate and attach one branded 1200×630 dataset cover. Give it the dataset ID and what the image should depict; Studio fixes the model, single-color style, curated random palette, dimensions and storage. |
17
- | `mr-data run` | Start one run against a registered recipe, named as `--recipe RECIPE_ID --digest RECIPE_DIGEST` — both required, neither positional, and the digest is the bare hex the registration receipt printed. The mode is one of six: `sample`, `full`, `refresh`, `backfill`, `compact` and `replay`. Four have a shorthand flag (`--sample`, `--full`, `--refresh`, `--backfill`) and two do not, so write `--mode MODE`, which is accepted for every one of them. A refresh executes only Studio's persisted strict source-action plan. Although the classifier may name closed reuse, a request-window or collection delta, or recorded input, current normal refresh materializes only a plan carrying at least one direct `partition_replace` request window with a compatible predecessor — `closed` siblings may reuse their sealed bytes beside it, a lone window needs a retained source-history record, and several must agree on materialization and partition layout — or an all-recorded-stream plan. A per-row request collection that reads a window of the plan and carries its partition column may join it when no `closed` source does. Closed-only, any plan carrying another collection, a window beside a recorded stream, snapshot and unwindowed plans return `RESYNC_REQUIRED` before acquisition. Use `mr-data table resync TABLE_ID --request-id UUID` for an explicit full source reread, retaining that UUID if the response is uncertain. `--backfill` states the exact window with `--window START END`. `--mode replay --sources-from RUN_ID` asks Studio to run the registered revision against the RETAINED RAW INPUTS of one named successful run of the same table: nothing is fetched from this computer, nothing is acquired again, the result is compared against that run and never becomes the live version, and it neither asks for nor records an approval. Where Studio has replay switched off, or the named run is not successful, not the same table, or no longer retains its inputs, it answers a typed refusal — report the code rather than retrying in another mode. `--sources-from` on any other mode is refused `THIN_ARGUMENT_INVALID` before anything is sent. `--max-rows` and `--max-source-bytes` bound ONE SOURCE rather than the finished table. A large run is held for a spend confirmation, which `--confirm` settles and whose printed `confirm_command` re-states every argument the request carried. `--approve-full RUN_ID` releases the full an existing legacy sample-first pair is holding once its preview has succeeded, naming either half of the pair; where the deployment still wants a person at a browser it answers `THIN_INTERACTIVE_HUMAN_REQUIRED` and names the run page. `--retry RUN_ID` tries one failed run again when its triple carries `room_fault: true`, re-stating that run's own coordinate under a byte ceiling that cannot narrow it, and refuses with the triple when the recipe was at fault. `--cancel RUN` stops one. |
18
- | `mr-data status` | Report which of the seven states one run is in, what it delivered and whether a ceiling cut it short, and — on a failure — what failed, where, and whether the fault was the execution room's rather than the recipe's. Exits non-zero on a failed run. |
19
- | `mr-data runs` | Report this workspace's own runs: identifier, mode, state and creation time, plus the failure triple of any that failed and whether that failure was the execution room's. `--status` and `--mode` narrow it and are refused `THIN_ARGUMENT_INVALID` for a word outside the seven states or the six modes; `--limit` says how many, and pages are followed to reach it. A narrow filter over a workspace of thousands of runs reads a long way to find its matches, and a listing that does not end says how many were read and suggests a smaller `--limit`. |
17
+ | `mr-data run` | Start one run against a registered recipe, named as `--recipe RECIPE_ID --digest RECIPE_DIGEST` — both required, neither positional, and the digest is the bare hex the registration receipt printed. The mode is one of six: `sample`, `full`, `refresh`, `backfill`, `compact` and `replay`. Four have a shorthand flag (`--sample`, `--full`, `--refresh`, `--backfill`) and two do not, so write `--mode MODE`, which is accepted for every one of them. A refresh executes only Studio's persisted source-action plan, and a plan shape it does not refresh returns `RESYNC_REQUIRED` before acquisition; [which plans refresh](making-a-table-incremental.md#which-plans-refresh) lists them, and `mr-data recipe explain` says which one a table is. Use `mr-data table resync TABLE_ID --request-id UUID` for an explicit full source reread, retaining that UUID if the response is uncertain. `--backfill` states the exact window with `--window START END`. `--mode replay --sources-from RUN_ID` asks Studio to run the registered revision against the RETAINED RAW INPUTS of one named successful run of the same table: nothing is fetched from this computer, nothing is acquired again, the result is compared against that run and never becomes the live version, and it neither asks for nor records an approval. Where Studio has replay switched off, or the named run is not successful, not the same table, or no longer retains its inputs, it answers a typed refusal — report the code rather than retrying in another mode. `--sources-from` on any other mode is refused `THIN_ARGUMENT_INVALID` before anything is sent. `--max-rows` and `--max-source-bytes` bound ONE SOURCE rather than the finished table. A large run is held for a spend confirmation, which `--confirm` settles and whose printed `confirm_command` re-states every argument the request carried. `--approve-full RUN_ID` releases the full an existing legacy sample-first pair is holding once its preview has succeeded, naming either half of the pair; where the deployment still wants a person at a browser it answers `THIN_INTERACTIVE_HUMAN_REQUIRED` and names the run page. `--retry RUN_ID` tries one failed run again when its triple carries `room_fault: true`, re-stating that run's own coordinate under a byte ceiling that cannot narrow it, and refuses with the triple when the recipe was at fault. `--cancel RUN` stops one. |
18
+ | `mr-data status` | Report which of the seven states one run is in, what it delivered and whether a ceiling cut it short, and — on a failure — what failed, where, and whether the fault was the execution room's rather than the recipe's. Exits non-zero on a failed run. `--diagnose` adds everything else Studio can say about the run: its progress, a per-row source's plan counts, its checkpoints, and how each attempt ended, with a lost attempt's cause marked as an inference. |
19
+ | `mr-data runs` | Report this workspace's own runs: identifier, mode, state and creation time, plus the failure triple of any that failed and whether that failure was the execution room's. `--status` and `--mode` narrow it and are refused `THIN_ARGUMENT_INVALID` for a word outside the seven states or the six modes; `--limit` says how many, and pages are followed to reach it. A narrow filter over a workspace of thousands of runs reads a long way to find its matches, and a listing that does not end says how many were read and suggests a smaller `--limit`. The answer prints `next_cursor`, and `--cursor` continues from it. |
20
20
  | `mr-data watch` | Stream one run's live progress under the durable event type of each stage, resuming across stream cuts. Exits non-zero when the run failed. |
21
21
  | `mr-data query` | Run one bounded read-only SQL statement over a finished run's own table and print the rows. Bounded on rows, on answer bytes and on time, and refused by name when a bound is crossed. |
22
22
  | `mr-data peek` | Print the columns, their logical types and the first rows of one run's table. The type comes off the run's own column profile where the preview carries none, so `type` is null only for a run that sealed no profile. |
@@ -32,8 +32,8 @@ gap rather than doing anything, and `export-hosted-candidate`, which is a backen
32
32
  | `mr-data stream` | Record a public `wss://` venue so a build can read it. `stream document register --file F` admits the connector document, `stream registry create --digest D` admits a set of them, `stream probe` listens briefly and seals nothing, `stream capture --seconds N` records a bounded window, and `stream subscribe` keeps recording. `stream subscription {show|pause|resume|stop} ID` retains the legacy full-record interface. `stream subscription quiescence ID` reads the bounded server-computed proof; `pause-cas` and `resume-cas` read its ETag and make one conditional bounded write. An ambiguous CAS failure is not retried until a fresh invocation observes the resource again. `stream status ID` reads a capture or probe, and `stream recordings --document-digest D` names what a build could read and until when. `--seconds` is at most 600. `mr-data run` takes no duration: a build reads sealed batches and is bounded by them. |
33
33
  | `mr-data open` | Mint a single-use, short-lived address that continues this session in a browser at one dashboard path, and print it. `--open` hands it to the platform opener. The credential decides who mints: a device credential — what `mr-data login` stores — mints at Cloud, and a personal access token mints at Studio. |
34
34
  | `mr-data promote` | Record the cadence one table refreshes on and the reasoning behind it. A table's first succeeded run goes live on its own, so this is not what makes it readable; it is idempotent on a table that is already live, and it is how a withdrawn table is put back. The Harness worker does not perform the catch-up or scheduled refresh; report those only when another deployed component returns durable evidence that it did. |
35
- | `mr-data reschedule` | Change how often one live table refreshes, without the demote and promote that would reset its bookkeeping and buy a catch-up run. `--cadence` takes a cron expression or an interval such as `every 6h`; `--why` records the reasoning. It starts no run. `--lock` freezes the schedule so Studio stops adjusting it; `--unlock` lets it follow the source again. |
36
- | `mr-data table` | Report what one table is serving and how its refresh schedule is going: the state in plain words, the schedule in force, the next refresh, the schedule that was asked for and the reason given for it, and — once Studio has settled on one — the interval it measured and how many source updates that rests on. `table rename TABLE --name NAME` writes a new name, lowercase snake_case and unique within its dataset, fenced on that dataset's version and retried once if somebody else wrote first; nothing is rebuilt, because every run, version and schedule hangs off the identifier, which does not move. `table archive TABLE --confirm-name NAME` retires one table you name by the name it is called, and frees that name; a live table is refused until you `demote` it, and nothing built is deleted. `table archive TABLE [TABLE ...] --confirm DELETE` retires as many tables as you name at once: `DELETE` is the literal word, typed exactly, and it confirms the identifiers you typed rather than a name, so each table is retired under the name Studio is holding for it. Every table is attempted whatever the one before it answered, one line is printed for each, and the command exits non-zero if any was not retired — so read the outcome of each rather than the exit code alone. `--confirm-name` is refused when you name more than one table. |
35
+ | `mr-data reschedule` | Change how often one live table refreshes, without the demote and promote that would reset its bookkeeping and buy a catch-up run. `--cadence` takes a cron expression or an interval such as `every 6h`; `--why` records the reasoning. It starts no run. `--lock` freezes the schedule so Studio stops adjusting it; `--unlock` lets it follow the source again. A table that cannot refresh answers `table_schedule_held` and exits 2, naming the two repairs: declare `rebuild`, or `table resync`. |
36
+ | `mr-data table` | Report what one table is serving and how its refresh schedule is going: the state in plain words, the schedule in force, the next refresh, the schedule that was asked for and the reason given for it, and — once Studio has settled on one — the interval it measured and how many source updates that rests on. Where Studio reports it, it also prints the table's refresh strategy: "rebuilds every 7d; next T" or "held: blocker". `table rename TABLE --name NAME` writes a new name, lowercase snake_case and unique within its dataset, fenced on that dataset's version and retried once if somebody else wrote first; nothing is rebuilt, because every run, version and schedule hangs off the identifier, which does not move. `table archive TABLE --confirm-name NAME` retires one table you name by the name it is called, and frees that name; a live table is refused until you `demote` it, and nothing built is deleted. `table archive TABLE [TABLE ...] --confirm DELETE` retires as many tables as you name at once: `DELETE` is the literal word, typed exactly, and it confirms the identifiers you typed rather than a name, so each table is retired under the name Studio is holding for it. Every table is attempted whatever the one before it answered, one line is printed for each, and the command exits non-zero if any was not retired — so read the outcome of each rather than the exit code alone. `--confirm-name` is refused when you name more than one table. |
37
37
  | `mr-data pin` | Ask Studio to freeze one table pointer on an exact version, for a rollback or a hold. |
38
38
  | `mr-data unpin` | Ask Studio to resume pointer tracking; read the returned state before claiming it resumed. |
39
39
  | `mr-data demote` | Ask Studio to withdraw the pointer and any schedule it owns, for one table or for as many as you name: `demote TABLE [TABLE ...]` withdraws them one after another, attempts every one of them whatever the one before it answered, prints a line for each, and exits non-zero if any is still live. Pair it with `table archive` when you are retiring a set: a live table cannot be archived, so it is withdraw-then-archive, two commands rather than a loop. |
@@ -51,23 +51,18 @@ verify its final receipt.
51
51
 
52
52
  ### Strict refresh controls
53
53
 
54
- `mr-data recipe readiness` pages Studio's immutable-revision inventory and reports predecessor,
55
- incremental-materialization, and differential-proof readiness, every source's classified next
56
- action, and blocking source names. It reads persisted facts; it does not authorize a schedule.
54
+ Which continuation each source declares, and which plan shapes Studio refreshes, is
55
+ [making a table incremental](making-a-table-incremental.md). Its loop is four commands:
56
+ `mr-data recipe explain`, `mr-data recipe forecast`, `mr-data run` and
57
+ `mr-data status RUN_ID --diagnose`. `mr-data recipe readiness` pages Studio's immutable-revision
58
+ inventory: every source's classified next action, the blocking source names, and, where Studio
59
+ reports them, a `blocker_code` and whether a `rebuild` is declared. It reads persisted facts; it
60
+ does not authorize a schedule.
57
61
 
58
- A refresh executes only Studio's persisted source-action plan. The classifier may name closed
59
- reuse, a request window or collection delta, or recorded input, but current normal refresh
60
- materializes only a plan carrying at least one direct `partition_replace` request window with a
61
- compatible predecessor, or an all-recorded-stream plan. `closed` siblings may reuse their sealed
62
- bytes beside a window; a lone window needs a retained source-history record, and several windows
63
- must agree on materialization and partition layout. A per-row request collection that reads a
64
- window of the plan and carries its partition column may join it when no `closed` source does.
65
- Closed-only, any plan carrying another collection, a window beside a recorded stream, snapshot and
66
- unwindowed plans return `RESYNC_REQUIRED` before acquisition.
67
- `mr-data table resync TABLE --request-id UUID` is the explicit
68
- full reread; retain and reuse the caller-generated UUID after a lost response. A held resync receipt
69
- prints `mr-data run --confirm-held RUN_ID` for that exact run. New full resyncs are progressive;
70
- an existing legacy sample-first resync still uses `--approve-full` after its preview succeeds.
62
+ `mr-data table resync TABLE --request-id UUID` is the explicit full reread; retain and reuse the
63
+ caller-generated UUID after a lost response. A held resync receipt prints
64
+ `mr-data run --confirm-held RUN_ID` for that exact run. New full resyncs are progressive; an
65
+ existing legacy sample-first resync still uses `--approve-full` after its preview succeeds.
71
66
 
72
67
  **`--refresh` states its own range, and a run that starts one by hand must pass it.** `mr-data run
73
68
  --refresh` sends what it is given. A refresh of a recipe carrying a non-snapshot request window