mostlyright-data 0.31.47__tar.gz → 0.31.49__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.
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/PKG-INFO +1 -1
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/SKILL.md +8 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/4-decide-say-what-you-chose-what-you-refused-and-ask-one-question.md +10 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/5-draft-one-recipe-document-one-call.md +9 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/6-build-one-run-sized-to-acquire-every-measured-source-whole.md +40 -8
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/agent-protocol.md +4 -2
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/commands.md +1 -1
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/enriching-with-small-models.md +23 -2
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/patterns.md +9 -1
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/readers.md +20 -2
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/sources.md +38 -5
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/recipe_lint.py +71 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/.gitignore +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/README.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/pyproject.toml +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/scripts/hatch_build.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/agents/openai.yaml +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/1-open-the-page-and-the-link-to-it-in-the-first-message.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/2-brief-two-to-four-questions-each-with-a-recommended-answer.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/3-probe-read-a-source-before-committing-to-it.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/7-interrogate-ask-the-run-what-it-actually-delivered.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/8-fix-revise-the-document-and-register-it-again.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/9-present-only-what-survived-inspection-with-caveats.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/autonomous-delivery.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/before-the-first-tool-call.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/boundaries.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/cloud-authentication-preflight.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/live-run.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/making-a-table-incremental.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/narrating-the-run.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/not-hosted-yet.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/one-install.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/predicting-with-tabular-models.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/prediction-labels.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/preparing-table-search.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/promote.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/receipts.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/recipe-test.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/recording-a-stream-venue.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/recovering-an-import-failure.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/reference-pages.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/required-protocol.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/satellite-signals.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/source-credentials.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/the-one-thing-to-say-about-the-skill-itself.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/transforms.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/user-communication-contract.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/writing-a-decision-record.md +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/scripts/write_research_notebook.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/__init__.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/agent_protocol.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/canonical.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/key_seam.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/page_coverage.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/part_check_evidence.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/session_probes.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/skill_assets.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/table_manifest.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/__init__.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/activity.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/backoff.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/categories.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/dataset-categories-v1.json +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/dataset_layout.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/delivery.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/description_shape.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/download.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/enrichment.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/fast_features.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/matching_benchmark.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/probe.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/progress_rate.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/progress_vocabulary.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/recipe.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/recipe_brief.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/recipe_explain.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/recipe_forecast.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/recipe_test.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/refresh_rehearsal.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/release_check.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/research.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/router.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/run_diagnose.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/run_prefix.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/runs.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/session.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/stream.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/stream_venue.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/studio_capabilities.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/support.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/table_search_contract.json +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/table_view.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/transport.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/user_agent.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_artifacts.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_catalog.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_connected.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_connections.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_dataset_covers.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_datasets.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_handoff.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_matching.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_narrative.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_public.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_public_pull.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_query.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_reader.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_runs.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_search.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_search_contract.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_secrets.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_stream.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_tables.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/vocabulary.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/__init__.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/attendance.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/clarification.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/cloud_auth.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/commands/__init__.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/commands/auth.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/commands/clarify.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/commands/login.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/commands/whoami.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/credential_native.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/credential_store.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/credentials.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/login.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/path_kind.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/plain_file.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/remediation.py +0 -0
- {mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/render.py +0 -0
|
@@ -71,6 +71,7 @@ the source shape that fits.
|
|
|
71
71
|
| --- | --- | --- | --- |
|
|
72
72
|
| One public file that never changes | `public.https` with a Reader pin | `closed: true` | [one file](references/patterns.md#one-public-file-that-never-changes) |
|
|
73
73
|
| One large public Parquet file whose publisher answers byte ranges | a `parquet.tabular@1.1.0` pin | `columns` | [ranged Parquet](references/patterns.md#one-large-public-parquet-file-read-by-range) |
|
|
74
|
+
| Many public files that each fit, together past 10 million rows | one `public.https` source per file, unioned | per-source `max_rows`, a `parquet.tabular` pin, a `row_expectation` past 10,000,000 | [many files](references/6-build-one-run-sized-to-acquire-every-measured-source-whole.md#many-files-that-each-fit) |
|
|
74
75
|
| Keyed JSON API paged by page number, whose first page states the page count | `authenticated.https.api_key@2.1.0` with the counted `pagination.parallel` | `total_pages_pointer`, `max_page_bytes`, the gap | [keyed API](references/patterns.md#keyed-json-api-with-pages-fetched-together) |
|
|
75
76
|
| API that takes a date range | `window.request` | `lookback_seconds` | [date range](references/patterns.md#api-that-takes-a-date-range) |
|
|
76
77
|
| Many pages behind one index | `public.https.collection@2.0.0` | the gap | [collection](references/patterns.md#many-pages-behind-one-index) |
|
|
@@ -193,6 +194,13 @@ step 6. The stage 3 reference holds its rule. Gate 4 is step 6.
|
|
|
193
194
|
extract, standardize or match source when the brief asked for that judgement or the person accepted the offer,
|
|
194
195
|
from the binding `mr-data models` lists, and let a rule settle every row it can before the
|
|
195
196
|
model reads the rest ([writing a classify source](references/enriching-with-small-models.md#writing-a-classify-source)).
|
|
197
|
+
When enriching rows from a table's website URL column across many third-party domains, fetch the
|
|
198
|
+
pages with `public.https.collection@2.0.0` (`source_rows` `url_column` +
|
|
199
|
+
`pages.allow_any_public_origin: true`) pinned to `html.web_extract@1.8.0`
|
|
200
|
+
(`mode: "readable_text"`), test bounded with `pages.max_fetches_per_run: 30` over the real
|
|
201
|
+
upstream source, and choose `classify` (`gemini-decisions`) for fixed categories, booleans, or
|
|
202
|
+
multilingual normalization versus `extract` for verbatim spans
|
|
203
|
+
([heterogeneous public websites](references/sources.md#extracting-from-heterogeneous-public-websites-allow_any_public_origin)).
|
|
196
204
|
Register a live predict table only after a backtest table has compared it with a baseline
|
|
197
205
|
([predicting with tabular models](references/predicting-with-tabular-models.md)).
|
|
198
206
|
Put the predictions in the table people read, in their own `predicted_<target>` columns beside
|
|
@@ -31,6 +31,16 @@ consequences before changing the intended dataset. Carry the answers into the re
|
|
|
31
31
|
table and column descriptions, source selection, transform and checks, and record assumptions
|
|
32
32
|
separately from decisions the user made.
|
|
33
33
|
|
|
34
|
+
**A corpus of files that each fit is not a refusal.** When the publisher already ships many files
|
|
35
|
+
and each file is under a source's own ceiling, the decision is one source per file, with column
|
|
36
|
+
projection, a `parquet.tabular` pin in `reader.decode_options`, a per-source `max_rows`, and a
|
|
37
|
+
table `row_expectation` past 10,000,000 when the files together pass it. Do not refuse that
|
|
38
|
+
dataset, and do not ask the person to pick a country, a region or a year instead of those files.
|
|
39
|
+
A single file that itself passes 10,000,000 rows or 4 GiB decoded is the limit to name, after you
|
|
40
|
+
have looked for a per-file split the publisher already ships.
|
|
41
|
+
[Build sizing](6-build-one-run-sized-to-acquire-every-measured-source-whole.md#many-files-that-each-fit)
|
|
42
|
+
says which ceiling applies.
|
|
43
|
+
|
|
34
44
|
**Blocked sources: always say what unlocks it and how to enrol the credential.** A source you could
|
|
35
45
|
not reach because it needs an API key, an account or an approval is not a dead end and must never
|
|
36
46
|
be reported as one. Name the unblock step in the block's `reason` and in the chat message: who
|
|
@@ -444,6 +444,15 @@ run, because the dialect is validated at the acquire stage rather than at regist
|
|
|
444
444
|
| `continuity` | exactly one | `max_gap_seconds` |
|
|
445
445
|
| `row_expectation` | none; naming one is refused | at least one of `min_rows`, `max_rows` |
|
|
446
446
|
|
|
447
|
+
`min_rows` and `max_rows` are integers. A `row_expectation` with either one past 10,000,000 is how
|
|
448
|
+
a table of that size is admitted: the Python engine seals at most 10,000,000 rows, and that check
|
|
449
|
+
moves the build to the native engine. Each source still states its own `limits.max_rows`. Omitting
|
|
450
|
+
it leaves the source at 10,000,000 rows even on the native engine. A publisher's many files, each
|
|
451
|
+
under that source ceiling, are many sources unioned in the first transform, not one check used as
|
|
452
|
+
a reason to shrink the place.
|
|
453
|
+
[Many files that each fit](6-build-one-run-sized-to-acquire-every-measured-source-whole.md#many-files-that-each-fit)
|
|
454
|
+
is the shape.
|
|
455
|
+
|
|
447
456
|
`DECLARED_CHECK_INVALID: check X reads exactly one column and names 3` means write one check per
|
|
448
457
|
column. Bounds are strings, because no fractional number may appear anywhere in the document:
|
|
449
458
|
`"min_value": "-50"`.
|
|
@@ -176,8 +176,8 @@ most 1 GiB, because the whole decoded relation is held in memory while it is cla
|
|
|
176
176
|
A staged source is decoded to a file and is not narrowed to that 1 GiB. On either route the decoded
|
|
177
177
|
table is also held to the source's own `limits.max_source_bytes`, so when a source inflates, as a
|
|
178
178
|
compressed archive does, declare that at the decoded size and not at the size of the download. A
|
|
179
|
-
wide source is
|
|
180
|
-
|
|
179
|
+
wide source is narrowed by projecting fewer columns in `reader.decode_options`. A long corpus
|
|
180
|
+
is not narrowed by dropping a place. The ceilings below say which of those is a real limit.
|
|
181
181
|
|
|
182
182
|
`limits.max_source_bytes` states where fetching STOPS rather than how big the source is, so the
|
|
183
183
|
preflight does not refuse a large one. Registration puts one sentence on the receipt under
|
|
@@ -194,13 +194,45 @@ After registering, run `mr-data recipe forecast RECIPE_ID --digest DIGEST` and c
|
|
|
194
194
|
schedule, and under the projection every scheduled rebuild is held
|
|
195
195
|
([rebuild](making-a-table-incremental.md#rebuild-the-fifth-continuation)).
|
|
196
196
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
197
|
+
### Many files that each fit
|
|
198
|
+
|
|
199
|
+
**A table past 10,000,000 rows fits when the recipe says so.** The Python engine seals at most
|
|
200
|
+
10,000,000 rows. A `row_expectation` whose `min_rows` or `max_rows` is past 10,000,000 admits the
|
|
201
|
+
table on the native engine. That engine seals one table version as at most 4,096 parts of
|
|
202
|
+
4,194,304 rows and 256 MiB each, about 17 billion rows and 1 TiB. A run of that recipe left on
|
|
203
|
+
the Python engine is refused `409 KEEL_ENGINE_REQUIRED` before it starts, because the recipe
|
|
204
|
+
declares more rows than the Python engine builds. Omitting the check leaves the seal on the
|
|
205
|
+
Python engine's 10,000,000-row ceiling. Neither is a reason to offer a smaller place when each
|
|
206
|
+
file already fits.
|
|
207
|
+
|
|
208
|
+
**Each source keeps its own ceiling, on either engine.** A whole file stays at 10,000,000 rows and
|
|
209
|
+
4 GiB staged. A ranged Parquet fetch stays at 1 GiB of selected column chunks and 2,048 ranges. A
|
|
210
|
+
source that is not staged decodes at most 1 GiB. A recipe names at most 256 sources. A source that
|
|
211
|
+
omits `limits.max_rows` stays at 10,000,000 rows even on the native engine, so state `max_rows`
|
|
212
|
+
on every source of a large table, at that file's measured rows with headroom, and not above what
|
|
213
|
+
that file's route can read. Lowering `max_rows` or `max_source_bytes` to make a corpus fit
|
|
214
|
+
truncates the preview or refuses the full build. It does not fetch less.
|
|
215
|
+
|
|
216
|
+
**Many files that each fit are one source per file.** Project the columns the table needs, pin
|
|
217
|
+
`parquet.tabular`, and put the projection in `reader.decode_options`. `mr-data reader normalize`
|
|
218
|
+
reads that object from `--options-file`. The parameter name is `reader.decode_options`. A
|
|
219
|
+
parameter named `options` is refused `422` as "not a reserved Reader pin parameter". Set each
|
|
220
|
+
source's `max_rows`. Union the sources in the first transform step. When the table will pass
|
|
221
|
+
10,000,000 rows, declare the `row_expectation` above. Sixteen GeoParquet files of about 5.1
|
|
222
|
+
million rows and a projected 264-376 MiB each, such as an Overture Places release, are sixteen
|
|
223
|
+
sources. Build all of them. Do not tell the person the dataset does not fit and ask them to pick
|
|
224
|
+
a country.
|
|
225
|
+
|
|
226
|
+
**One file past its own ceiling is a real limit. Name the ceiling.** A single file over
|
|
227
|
+
10,000,000 rows, or over 4 GiB decoded, does not fit. One GHCN `by_year` CSV.gz is that file: the
|
|
228
|
+
recipe cannot split bytes the publisher put in one object. Before you ask the person to drop a
|
|
229
|
+
year or a place, use a per-file split the publisher already ships — one file per station, per
|
|
230
|
+
month, or per part, when those files themselves fit — and make each a source. Offer a smaller
|
|
231
|
+
scope only when no such split exists.
|
|
232
|
+
|
|
233
|
+
A wide file is still narrowed by projection in `reader.decode_options`, not by splitting it.
|
|
202
234
|
[The recipe document](https://mostlyright.md/docs/reference/recipe/) carries the measured numbers
|
|
203
|
-
behind
|
|
235
|
+
behind a source ceiling.
|
|
204
236
|
|
|
205
237
|
A corpus of many pages behind one index is a COLLECTION rather than many sources: see
|
|
206
238
|
[Authoring a collection source](sources.md#authoring-a-collection-source).
|
|
@@ -41,8 +41,10 @@ input. `unknown` never means “revise the recipe”.
|
|
|
41
41
|
|
|
42
42
|
## Reader options
|
|
43
43
|
|
|
44
|
-
`reader.decode_options` is canonical JSON text in the recipe's connector parameters. The
|
|
45
|
-
|
|
44
|
+
`reader.decode_options` is canonical JSON text in the recipe's connector parameters. The wire
|
|
45
|
+
field is `decode_options`. A connector parameter named `options` is refused `422` as "not a
|
|
46
|
+
reserved Reader pin parameter". The CLI flag that supplies the object is `--options-file`. The
|
|
47
|
+
certified Reader family and version in the server remain authoritative for allowed
|
|
46
48
|
keys, defaults and semantics. The CLI does not validate or invent family-specific options.
|
|
47
49
|
|
|
48
50
|
## Bounded source inspection
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/commands.md
RENAMED
|
@@ -17,7 +17,7 @@ run in full.
|
|
|
17
17
|
| `mr-data clarify` | Check whether clarification is allowed. Use `--attended` for an active user chat and `--unattended` for a scheduled invocation; an explicit operator veto such as `MOSTLYRIGHT_ATTENDED=0` still wins. A non-TTY subprocess does not prove the user is absent. The command does not ask the person in chat or wait for a reply; the agent must do that. It exits non-zero when nobody can answer or the recipe is already registered. |
|
|
18
18
|
| `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. **It rides the frozen `/v3/sessions` routes, which a deployment may have switched off, so do not plan a source inspection around it.** Both positionals are identifiers. `QUESTION_ID` is a question identifier, which no v4 registration receipt returns. The v4 way to look at a source before registering it is `mr-data source inspect`, in the next row. The other way to read one is a bounded run of a scratch table, never of the real table, as [the probe rule](3-probe-read-a-source-before-committing-to-it.md#the-probe-rule-test-on-a-scratch-table-never-on-the-real-table) says. |
|
|
19
19
|
| `mr-data source` | `source inspect` takes a bounded look at one source, and it is the v4 path where `probe` is not. [Stage 3](3-probe-read-a-source-before-committing-to-it.md) says when to use it. It starts one of three ways, and each prints the `session_id`, `probe_id` and `source_id`, plus the `dataset_id` and `question_id` when it has them. For a new public HTTPS CSV that needs no key, give `--dataset-id`, `--question`, `--source-name`, `--source-url`, `--claimed-basis` and `--claim-evidence-digest`: it prepares the source and opens a session. For a source already prepared, give `--dataset-id`, `--question-id` and `--source-id`, which opens a session. In a session you already hold, give `--session-id` with `--source-id`. `--context-source-id` adds a source to a session it opens. `--session-id` with `--probe-id` reads the answer back; `--probe-id` alone is refused. A look is bounded to 65,536 bytes, 1,000 rows and 300 seconds. A larger file can fail `BYTE_LIMIT` after a wait, so read it by a bounded run of a scratch table. `queued` and `truncated` are not complete answers, and `capability_unavailable` means this deployment cannot inspect, so read the source by a bounded run of a scratch table instead, as [the probe rule](3-probe-read-a-source-before-committing-to-it.md#the-probe-rule-test-on-a-scratch-table-never-on-the-real-table) says. What it finds is exploratory evidence, not a run and not a receipt. |
|
|
20
|
-
| `mr-data reader` | `reader normalize --family-id ID --family-version VERSION --options-file FILE [--workspace-id ID]` asks the server's Reader service to apply one certified family's own defaults and option rules to a JSON object of options, at most 64 KiB, and prints the normalized `decode_options`, `decode_options_json` and `options_digest`. The second is the text a recipe carries as `reader.decode_options`, and the third is the `options_digest` a Generic API's `generic_api.response.reader` states for exactly those options. A connector pin takes no `reader.options_digest` parameter ([Readers](readers.md)). It changes nothing, and this client does not validate or invent a family's options: the server decides. Run it for every Reader pin before you register, so a wrong option is refused here and not inside a run. |
|
|
20
|
+
| `mr-data reader` | `reader normalize --family-id ID --family-version VERSION --options-file FILE [--workspace-id ID]` asks the server's Reader service to apply one certified family's own defaults and option rules to a JSON object of options, at most 64 KiB, and prints the normalized `decode_options`, `decode_options_json` and `options_digest`. The second is the text a recipe carries as `reader.decode_options`, and the third is the `options_digest` a Generic API's `generic_api.response.reader` states for exactly those options. The wire field is `decode_options`. A connector parameter named `options` is refused `422` as "not a reserved Reader pin parameter", and a connector pin takes no `reader.options_digest` parameter ([Readers](readers.md)). It changes nothing, and this client does not validate or invent a family's options: the server decides. Run it for every Reader pin before you register, so a wrong option is refused here and not inside a run. |
|
|
21
21
|
| `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. |
|
|
22
22
|
| `mr-data public` | Read Mostly Right's public dataset catalogue. `public search "QUERY"` ranks published datasets (`--topic`, `--limit` and `--cursor` narrow and page it), `show SLUG` reads one overview, `tables SLUG` lists its table identifiers, `schema TABLE_ID` reads one table's schema, `sample TABLE_ID` prints its published preview rows, `lookup "QUERY"` is the connector search shape and `fetch SLUG` returns the dataset's Markdown document. Those seven need no login. For app integration or polling, run `mr-data public api-guide TABLE_ID` for the table’s query and conditional snapshot requests. A public guide needs no login. For a private workspace table set `MOSTLYRIGHT_USE_KEY` in the environment. A `query` body with `search.engine=resident` uses MCP and the workspace of `MOSTLYRIGHT_USE_KEY`. For ordinary query bodies, `query TABLE_ID`, with `--body` or `--body-file`, and `download-url TABLE_ID` do need `mr-data login`: they ask Cloud, with the device key, to run one query over a public table and to say how it can be downloaded. Preview rows are not a query, and those commands pass no table bytes. `pull SLUG` writes the dataset into `DIR/SLUG/` (`--dir`, default `./datasets`; `--table TABLE_ID` repeats to pick tables): `README.md`, `dataset.json`, and per table `schema.json` and `sample.json`, all read-only. Only with `--data` does it add each table's `data.parquet`, and only where the publisher enabled download and an `mr_use_` key is in the `MOSTLYRIGHT_USE_KEY` environment variable; never pass the key as an argument. `--data` connects the dataset to the key's workspace and counts each download against its allowance, so leave it off unless the bytes are needed. A rerun asks Cloud whether a file it already verified is still current and keeps it when Cloud says so, and a failed table is recorded in `dataset.json` without stopping the others. |
|
|
23
23
|
| `mr-data connected` | `connected list` shows the public datasets connected to this workspace and `connected add SLUG` connects one by its slug. It needs `mr-data login`: both ask Cloud, with the device key, over the routes MCP's `list_connected_datasets` and `connect_dataset` use. |
|
|
@@ -116,6 +116,26 @@ also keep the rows it settled from being sent at all: see [Needs server 4.14](#n
|
|
|
116
116
|
offers, deterministic ones first, each with the column it reads and what it would add. One
|
|
117
117
|
concrete sentence each, not a menu of everything possible.
|
|
118
118
|
|
|
119
|
+
### Choosing `classify` vs `extract` on website text
|
|
120
|
+
|
|
121
|
+
When you fetch third-party websites with `public.https.collection@2.0.0` (`source_rows`
|
|
122
|
+
`url_column` + `pages.allow_any_public_origin: true`) and `html.web_extract@1.8.0`
|
|
123
|
+
(`mode: "readable_text"`), pick the downstream model by the shape of the answer you need:
|
|
124
|
+
|
|
125
|
+
- **Use `classify` (`gemini-decisions` first) for fixed categories, enums, booleans, or
|
|
126
|
+
multilingual normalization** — for example determining whether a site offers self-service bays
|
|
127
|
+
vs an automatic tunnel, whether a venue is open 24/7, or assigning a standardized industry or
|
|
128
|
+
topic label across pages written in German, French, Polish, or Russian. `gemini-decisions`
|
|
129
|
+
understands multilingual text directly without a translation step, answers in ~250 ms per row
|
|
130
|
+
with zero cold start, and returns calibrated per-label probabilities.
|
|
131
|
+
- **Use `extract` only for verbatim spans pulled from the page text** — exact company names,
|
|
132
|
+
prices, street addresses, phone numbers, dates, or lists of named offers. Every extracted value
|
|
133
|
+
must appear verbatim in the input text or it is dropped, so `extract` returns blanks whenever a
|
|
134
|
+
category name is normalized or in a different language than the source page, and its service
|
|
135
|
+
takes 3–5 minutes to cold-start when idle.
|
|
136
|
+
|
|
137
|
+
Do not force a fixed categorical or multilingual labelling task through `extract`.
|
|
138
|
+
|
|
119
139
|
### Writing a classify source
|
|
120
140
|
|
|
121
141
|
A classify source is a [per-row request](sources.md#authoring-a-per-row-request) over the source
|
|
@@ -167,8 +187,9 @@ An extract source has the same per-row shape with the extraction body
|
|
|
167
187
|
|
|
168
188
|
- `input` is `{"view": "input", "text": "{text_column}"}`. `text` is the only placeholder, and it
|
|
169
189
|
names a column of the upstream source, never of the transform. Give it visible text, not raw
|
|
170
|
-
HTML: read the page in the upstream source with
|
|
171
|
-
|
|
190
|
+
HTML: read the page in the upstream source with `html.web_extract@1.8.0` (`mode: "readable_text"`)
|
|
191
|
+
for heterogeneous public websites, or a pinned `html.web_extract` DOM selector for a single
|
|
192
|
+
structured publisher ([Readers](readers.md)).
|
|
172
193
|
- `fields` is a literal list of 1 to 64 `{name, description}` entries. Changing it changes the
|
|
173
194
|
source's capture identity, so settle the list in the brief.
|
|
174
195
|
- `one: true` asks for a single object per row, for a detail page; leave it out for a list of
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/patterns.md
RENAMED
|
@@ -134,7 +134,15 @@ explicit resync. Use it only for a file that will not change, such as a dated re
|
|
|
134
134
|
whole file. Its `columns` are `{path, as}` objects. `limits.max_requests` is 3 plus one per range,
|
|
135
135
|
here 3 plus the 2,048 ranges a read may take. The publisher must answer a range request with
|
|
136
136
|
`206` and an `ETag` or `Last-Modified`, or the run fails. A source that pins it states no window,
|
|
137
|
-
and the recipe states no `execution_policy`.
|
|
137
|
+
and the recipe states no `execution_policy`. The pin parameter is `reader.decode_options`; the
|
|
138
|
+
command that fills it reads `--options-file`. A parameter named `options` is refused `422`.
|
|
139
|
+
`limits.max_rows` here is this one ranged file, whose selected chunks stay inside 1 GiB. A whole
|
|
140
|
+
file still stops at 10,000,000 rows and 4 GiB staged. A single file over 10,000,000 rows or 4 GiB
|
|
141
|
+
decoded still does not fit. A release that is already many files, each under its own route, is
|
|
142
|
+
one source per file with its own `max_rows`, plus a table `row_expectation` past 10,000,000 when
|
|
143
|
+
the files together pass it. It is not a smaller country.
|
|
144
|
+
[Many files that each fit](6-build-one-run-sized-to-acquire-every-measured-source-whole.md#many-files-that-each-fit)
|
|
145
|
+
is the rule. [Readers](readers.md) has every limit.
|
|
138
146
|
|
|
139
147
|
```json
|
|
140
148
|
{
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/readers.md
RENAMED
|
@@ -31,8 +31,12 @@ field and finding none does not mean v4 cannot pin one.
|
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
A parameter under `reader.` that is not one of those three is refused rather than ignored.
|
|
35
|
-
|
|
34
|
+
A parameter under `reader.` that is not one of those three is refused rather than ignored. The
|
|
35
|
+
name `options` is not one of them: a connector parameter `options`, or `reader.options`, is a
|
|
36
|
+
`422` whose message is "not a reserved Reader pin parameter". The wire field is `decode_options`,
|
|
37
|
+
on this pin and on `mr-data reader normalize`. The command reads the object from `--options-file`
|
|
38
|
+
and returns it as `decode_options` and `decode_options_json`. All three or none: there is no other
|
|
39
|
+
place a Reader is named. Read the pin grammar and the closed registry of
|
|
36
40
|
certified coordinates at [Readers](https://mostlyright.md/docs/reference/readers/).
|
|
37
41
|
|
|
38
42
|
**No command tries a Reader against a URL.** `mr-data peek` reads the preview one hosted run sealed.
|
|
@@ -117,6 +121,12 @@ decoder. Zero matches and multiple matches both refuse.
|
|
|
117
121
|
| `html.web_extract@1.0.0` | `mode: dom` with closed CSS-like record/field selectors, or `mode: json` with an inert JSON script selector and RFC 6901 field pointers. |
|
|
118
122
|
| `html.web_extract@1.1.0` | Same settings as 1.0.0; extracted text follows DOM order, with one space at block-element boundaries and `<br>` and none between inline runs. |
|
|
119
123
|
| `html.web_extract@1.2.0` | Same text as 1.1.0; bounded integer `:nth-child(N)` / `:nth-of-type(N)` and field `scope: ancestor` with `ancestor_selector`. Requires the corresponding deployed certification. |
|
|
124
|
+
| `html.web_extract@1.3.0` | Adds `value: html` (an element's own source markup); optional `required: false` multi-match returns null; `mode: json` adds `non_scalar`. |
|
|
125
|
+
| `html.web_extract@1.4.0` | Adds `value: count` and `value: inert_json` on DOM columns. |
|
|
126
|
+
| `html.web_extract@1.5.0` | Same settings and text as 1.4.0 with a 250,000-node DOM ceiling for large pages. |
|
|
127
|
+
| `html.web_extract@1.6.0` | Adds `mode: text_chunks` with a single-match `selector`, emitting `chunk_index`, `chunk_count`, and lossless 256 KiB `text` chunks. |
|
|
128
|
+
| `html.web_extract@1.7.0` | Same settings and modes as 1.6.0 over browser-implied end tags (300,000-node ceiling) for pages with unclosed `<p>`, `<li>`, and table tags. |
|
|
129
|
+
| `html.web_extract@1.8.0` | Same as 1.7.0 plus lenient HTML charset decoding (UTF-8, meta charset single-byte European/Cyrillic encodings, cp1252 fallback) and `mode: readable_text` (optional `max_chars` 512–65,536, default 16,384), emitting one row per page with fixed columns `title`, `meta_description`, `text`, and `text_length`. Use this coordinate for heterogeneous third-party websites. |
|
|
120
130
|
| `protobuf.tabular@1.0.0` | Digest-pinned base64 FileDescriptorSet, fully-qualified message type, `single` or `length_delimited` framing, and fields with an explicit repeated `explode` or `refuse` choice. |
|
|
121
131
|
| `parquet.tabular@1.0.0` | Optional `columns` selects a bounded ordered Parquet projection. |
|
|
122
132
|
| `parquet.tabular@1.1.0` | Required `columns` of `{path, as}` select fields through structs by dotted path. An optional row filter keeps the rows every predicate in its `all` list admits. A public HTTPS source is read by range: only the footer and the selected column chunks are fetched. |
|
|
@@ -164,6 +174,14 @@ needs. Check every limit before you pin it.
|
|
|
164
174
|
- A recipe that states `execution_policy` cannot use it. The run is refused.
|
|
165
175
|
- A source that pins it may not declare a request window. Pin `1.0.0` there.
|
|
166
176
|
- Its `columns` are objects of `path` and `as`, not the bare names `1.0.0` takes.
|
|
177
|
+
- The pin that carries those columns is `reader.decode_options`. A parameter named `options` is
|
|
178
|
+
refused `422` as "not a reserved Reader pin parameter". The file `--options-file` reads is the
|
|
179
|
+
object; it is not a field named `options`.
|
|
180
|
+
- One ranged file stays inside 1 GiB and 2 048 ranges. A release of many such files, each also
|
|
181
|
+
under 10,000,000 rows, is one source per file. The table's `row_expectation` is what admits the
|
|
182
|
+
combined rows.
|
|
183
|
+
[Many files that each fit](6-build-one-run-sized-to-acquire-every-measured-source-whole.md#many-files-that-each-fit)
|
|
184
|
+
is the rule. A whole file over 10,000,000 rows or 4 GiB decoded is still one file too big.
|
|
167
185
|
|
|
168
186
|
`mr-data reader normalize --family-id parquet.tabular --family-version 1.1.0` checks the options.
|
|
169
187
|
`mr-data recipe explain` names a `1.0.0` pin that could move, under `fast_features`.
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/sources.md
RENAMED
|
@@ -53,15 +53,17 @@ Write it as a source whose connector is that coordinate plus a `collection` memb
|
|
|
53
53
|
this is not arbitrary recursive crawling. It requires the matching server API/worker release.
|
|
54
54
|
A `source_rows` discovery may state a [per-row `request`](#authoring-a-per-row-request) instead
|
|
55
55
|
of `url_column`.
|
|
56
|
-
- `collection.pages` says what may be fetched and how much. It names `allowed_origins
|
|
57
|
-
must include the discovery address's own origin
|
|
56
|
+
- `collection.pages` says what may be fetched and how much. It names either `allowed_origins`
|
|
57
|
+
(which must include the discovery address's own origin) or, for a credential-free public
|
|
58
|
+
`source_rows` `url_column` or `explicit` collection over third-party sites,
|
|
59
|
+
`allow_any_public_origin: true` (never both). It may state `max_pages`, `max_fetches_per_run`
|
|
58
60
|
(up to 50 000, or up to 4 000 000 on a per-row request collection), `concurrency` (up to
|
|
59
61
|
10 000), `request_timeout_seconds`, `retries` and a `revisit` rule. `retries` is 0 to 3 and 2
|
|
60
62
|
when left out. Registration refuses 4 or more. Its pace is `min_interval_milliseconds` in whole
|
|
61
63
|
milliseconds. Left out, a collection starts at 1000 ms and adapts down to 250 ms. The legacy
|
|
62
|
-
whole-second `min_interval_seconds` is the other spelling.
|
|
63
|
-
Every other member has a stated meaning when it is
|
|
64
|
-
says which to state.
|
|
64
|
+
whole-second `min_interval_seconds` is the other spelling. One of `allowed_origins` or
|
|
65
|
+
`allow_any_public_origin: true` is required. Every other member has a stated meaning when it is
|
|
66
|
+
left out. [Pace and width](#pace-and-width) says which to state.
|
|
65
67
|
- `limits.max_requests` is REQUIRED and bounds every request the run makes, discovery and detail
|
|
66
68
|
pages together. `limits.max_source_bytes` bounds the fetched bytes; `limits.max_rows` clamps the
|
|
67
69
|
merged relation.
|
|
@@ -119,6 +121,37 @@ redirects are likely — trailing slashes, `http`→`https`, `www`, which is mos
|
|
|
119
121
|
`limits.max_requests >= discovery.max_requests + 2 * max_fetches_per_run`. A budget larger than the
|
|
120
122
|
corpus can absorb costs nothing.
|
|
121
123
|
|
|
124
|
+
#### Extracting from heterogeneous public websites (`allow_any_public_origin`)
|
|
125
|
+
|
|
126
|
+
When an upstream table already has a URL column pointing to many distinct third-party websites
|
|
127
|
+
(for example a `website` column across hundreds or thousands of businesses, venues, or
|
|
128
|
+
organizations), do **not** hand-copy domains into `pages.allowed_origins` or build a fake
|
|
129
|
+
`explicit` list to work around origin limits. Declare a `source_rows` `url_column` collection with:
|
|
130
|
+
|
|
131
|
+
- `pages.allow_any_public_origin: true` (and omit `pages.allowed_origins`), on a credential-free
|
|
132
|
+
(`credential_mode: "none"`) `data_classification: "public"` source.
|
|
133
|
+
- Reader pin `html.web_extract@1.8.0` with canonical decode options
|
|
134
|
+
`{"max_chars":16384,"mode":"readable_text"}` (normalize with `/v4/readers/normalize` or
|
|
135
|
+
`mr-data reader normalize`). It decodes UTF-8 and common legacy European/Cyrillic charsets
|
|
136
|
+
leniently, strips scripts, styles, navigation, headers, footers, forms, and hidden overlays,
|
|
137
|
+
never fails on missing `<body>` or multiple tags, and emits four fixed columns per page:
|
|
138
|
+
`title`, `meta_description`, `text`, `text_length`.
|
|
139
|
+
- `limits.max_requests >= 3 * pages.max_fetches_per_run` to cover redirect hops (`apex` → `www`,
|
|
140
|
+
canonical domain moves) and retries.
|
|
141
|
+
|
|
142
|
+
Under `allow_any_public_origin: true`, dirty URLs in the upstream column are normalized before
|
|
143
|
+
fetching (`http://` upgraded to `https://`, bare hostnames like `www.example.de` prefixed with
|
|
144
|
+
`https://`, `#fragments` stripped, internationalized domains converted to punycode), and
|
|
145
|
+
malformed, non-HTTPS, IP-literal, or private/internal addresses are cleanly skipped per row
|
|
146
|
+
without failing the run. Safe public HTTPS redirects (`apex` ↔ `www`, canonical host moves) are
|
|
147
|
+
followed automatically, while private/loopback/metadata targets remain blocked on every hop.
|
|
148
|
+
|
|
149
|
+
To run a bounded scratch test before a full build, keep the same `source_rows` `url_column`
|
|
150
|
+
discovery over the real upstream table and set `pages.max_fetches_per_run: 30` (and
|
|
151
|
+
`limits.max_requests: 90`). The collection fetches up to 30 real sites, tolerates unreachable or
|
|
152
|
+
broken individual websites cleanly, and lets you inspect the extracted `title` and `text` before
|
|
153
|
+
scaling `max_fetches_per_run` to the full corpus.
|
|
154
|
+
|
|
122
155
|
For a dependent graph, declare recipe-level `acquisition_limits` with `max_requests` and
|
|
123
156
|
`max_source_bytes`. Every source must explicitly state both ceilings; their sums must fit the
|
|
124
157
|
totals. Unused capacity does not transfer between sources.
|
|
@@ -1775,6 +1775,7 @@ def _coherence(document: Mapping[str, Any], *, declared: Sequence[str]) -> list[
|
|
|
1775
1775
|
findings.extend(_unique(document.get("sources"), "sources", "name", "source names"))
|
|
1776
1776
|
findings.extend(_source_coherence(document.get("sources")))
|
|
1777
1777
|
findings.extend(_row_request_coherence(document.get("sources")))
|
|
1778
|
+
findings.extend(_public_web_pages(document.get("sources")))
|
|
1778
1779
|
findings.extend(_row_request_batch_coherence(document.get("sources")))
|
|
1779
1780
|
findings.extend(_predict_coherence(document.get("sources")))
|
|
1780
1781
|
findings.extend(_table_partition_coherence(document, known=known))
|
|
@@ -2662,6 +2663,76 @@ def _row_request_coherence(sources: Any) -> list[Finding]:
|
|
|
2662
2663
|
return findings
|
|
2663
2664
|
|
|
2664
2665
|
|
|
2666
|
+
def _public_web_pages(sources: Any) -> list[Finding]:
|
|
2667
|
+
"""Coherence checks for ``collection.pages.allow_any_public_origin``."""
|
|
2668
|
+
|
|
2669
|
+
if not isinstance(sources, list):
|
|
2670
|
+
return []
|
|
2671
|
+
findings: list[Finding] = []
|
|
2672
|
+
for index, source in enumerate(sources):
|
|
2673
|
+
if not isinstance(source, Mapping):
|
|
2674
|
+
continue
|
|
2675
|
+
collection = source.get("collection")
|
|
2676
|
+
if not isinstance(collection, Mapping):
|
|
2677
|
+
continue
|
|
2678
|
+
pages = collection.get("pages")
|
|
2679
|
+
if not isinstance(pages, Mapping):
|
|
2680
|
+
continue
|
|
2681
|
+
allow_any = pages.get("allow_any_public_origin")
|
|
2682
|
+
if allow_any is None:
|
|
2683
|
+
continue
|
|
2684
|
+
at = f"/sources/{index}/collection/pages"
|
|
2685
|
+
if type(allow_any) is not bool:
|
|
2686
|
+
findings.append(
|
|
2687
|
+
Finding(
|
|
2688
|
+
DOCUMENT_INVALID,
|
|
2689
|
+
f"{at}/allow_any_public_origin",
|
|
2690
|
+
"must be a boolean",
|
|
2691
|
+
)
|
|
2692
|
+
)
|
|
2693
|
+
continue
|
|
2694
|
+
if not allow_any:
|
|
2695
|
+
continue
|
|
2696
|
+
if "allowed_origins" in pages:
|
|
2697
|
+
findings.append(
|
|
2698
|
+
Finding(
|
|
2699
|
+
DOCUMENT_INCOHERENT,
|
|
2700
|
+
f"{at}/allowed_origins",
|
|
2701
|
+
"must be omitted when allow_any_public_origin is true",
|
|
2702
|
+
)
|
|
2703
|
+
)
|
|
2704
|
+
discovery = collection.get("discovery")
|
|
2705
|
+
kind = discovery.get("kind") if isinstance(discovery, Mapping) else None
|
|
2706
|
+
url_column = discovery.get("url_column") if isinstance(discovery, Mapping) else None
|
|
2707
|
+
is_url_column = (
|
|
2708
|
+
kind == "source_rows"
|
|
2709
|
+
and isinstance(url_column, str)
|
|
2710
|
+
and bool(url_column)
|
|
2711
|
+
and isinstance(discovery, Mapping)
|
|
2712
|
+
and "request" not in discovery
|
|
2713
|
+
)
|
|
2714
|
+
if not (is_url_column or kind == "explicit"):
|
|
2715
|
+
findings.append(
|
|
2716
|
+
Finding(
|
|
2717
|
+
DOCUMENT_INCOHERENT,
|
|
2718
|
+
f"{at}/allow_any_public_origin",
|
|
2719
|
+
"is allowed only on source_rows url_column or explicit collections",
|
|
2720
|
+
)
|
|
2721
|
+
)
|
|
2722
|
+
connector = source.get("connector")
|
|
2723
|
+
mode = connector.get("credential_mode") if isinstance(connector, Mapping) else None
|
|
2724
|
+
classification = source.get("data_classification")
|
|
2725
|
+
if mode != "none" or classification != "public":
|
|
2726
|
+
findings.append(
|
|
2727
|
+
Finding(
|
|
2728
|
+
DOCUMENT_INCOHERENT,
|
|
2729
|
+
f"{at}/allow_any_public_origin",
|
|
2730
|
+
"is allowed only on credential-free public sources",
|
|
2731
|
+
)
|
|
2732
|
+
)
|
|
2733
|
+
return findings
|
|
2734
|
+
|
|
2735
|
+
|
|
2665
2736
|
def _chart_coherence(table: Any) -> list[Finding]:
|
|
2666
2737
|
"""A chart held against the type of the column it is declared on, and its extra members."""
|
|
2667
2738
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/agents/openai.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/boundaries.md
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/live-run.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/one-install.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/promote.md
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/receipts.md
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/recipe-test.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/skills/mr-data-build/references/transforms.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/__init__.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/agent_protocol.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/canonical.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/key_seam.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/page_coverage.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/session_probes.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/skill_assets.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/table_manifest.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/__init__.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/activity.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/backoff.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/delivery.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/download.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/probe.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/recipe.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/research.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/router.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/runs.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/session.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/stream.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/support.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/transport.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_public.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_query.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_reader.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_runs.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_stream.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/thin/v4_tables.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/__init__.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/attendance.py
RENAMED
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/cloud_auth.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/credentials.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/login.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/path_kind.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/plain_file.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/remediation.py
RENAMED
|
File without changes
|
{mostlyright_data-0.31.47 → mostlyright_data-0.31.49}/src/mostlyright/data_harness/ux/render.py
RENAMED
|
File without changes
|