Skip to content

Suhail 2026 source expansion (+ track suhail_pipeline package) - #37

Merged
Pinstack merged 4 commits into
mainfrom
suhail-2026-source-expansion
Jul 15, 2026
Merged

Suhail 2026 source expansion (+ track suhail_pipeline package)#37
Pinstack merged 4 commits into
mainfrom
suhail-2026-source-expansion

Conversation

@Pinstack

Copy link
Copy Markdown
Owner

Lands this session's evidence-led Suhail source audit + integration work, and records the in-progress src/meshic_pipelinesrc/suhail_pipeline package rename (the package was untracked on disk).

What changed

Stage 1 (geometric tiles)

  • Capture inline market time-series now on parcels/neighborhoods/subdivisions/centroids (transaction_price/price_of_meter/transactions_count/transaction_date at 1w/1m/6m/12m) + zoning_group + Arabic-name fixes.
  • Remap layers whose tile field names changed (bus_lines had captured zero attributes; metro_stations/riyadh_bus_stations coords; qi_population_metrics metric fields).
  • New layers: non_saudi_ownership_zones (unique-id upsert); dimensions (tile-scoped delete+append via source_tile); building_detection (synthetic bd_id upsert). Two new accumulate write modes: write_tile_scoped + compute_synthetic_pk.
  • Decoder: skip non-MVT (HTML error-page) payloads cleanly.

Stage 2 (enrichment)

  • Promote transaction attributes out of raw_data into queryable columns; fix building-rules dedup that collapsed all rules per parcel; capture price-metrics neighborhood_id (+ neighborhood stub insertion); split parsers into pure functions.

Schema / tests / docs

  • Alembic migrations c7f4a9d21b60 (market fields, reshaped layers, new tables) and d8b1e6f42a90 (dimensions + building_detection); both reversible (round-trip verified).
  • Contract tests over real captured fixtures (tests/fixtures/suhail_live_2026_07/) + new-layer key/write tests + decoder guard. 96 unit tests pass.
  • docs/SUHAIL_SOURCE_AUDIT_2026-07.md: full audit + gap analysis.

Validation

Live E2E against tiles.suhail.ai / api2.suhail.ai + local Postgres 18: Stage-1 (7,542 parcels, new columns populated, idempotent, source-vs-persisted cross-check matched the live API), fixed layers, Stage-2 enrichment, and multi-batch accumulation + idempotency for dimensions/building_detection.

Note for reviewers

This branch carries the suhail_pipeline package as it stands on disk (pre-existing uncommitted rename content + this session's edits — not separable, since the package was untracked). The repo's other ~86 pre-existing modified files are intentionally not included.

🤖 Generated with Claude Code

Pinstack and others added 2 commits July 15, 2026 11:04
…ackage

Records the in-progress package rename src/meshic_pipeline -> src/suhail_pipeline
(the package was untracked on disk) and lands this session's Suhail-2026 source
audit and integration work on top of it.

Source (Stage 1 geometric):
- Capture inline market time-series now on the parcels/neighborhoods/subdivisions/
  centroids tiles (transaction_price/price_of_meter/transactions_count/
  transaction_date at 1w/1m/6m/12m) + zoning_group + Arabic name fixes.
- Remap layers whose tile field names changed (bus_lines captured zero attributes;
  metro_stations/riyadh_bus_stations coords; qi_population_metrics metric fields).
- New layers: non_saudi_ownership_zones (unique id upsert); dimensions (tile-scoped
  delete+append via source_tile, keyless multi-row); building_detection (synthetic
  bd_id upsert). Two new accumulate write modes: write_tile_scoped +
  compute_synthetic_pk / SYNTHETIC_PK_CONFIG / TILE_SCOPED_LAYERS.

Enrichment (Stage 2):
- Promote transaction attributes out of raw_data into queryable columns; fix the
  building-rules dedup that collapsed all rules per parcel; capture price-metrics
  neighborhood_id (+ neighborhood stub insertion); split parsers into pure functions.

Schema/tests/docs:
- Alembic migrations c7f4a9d21b60 (market fields, reshaped layers, new tables) and
  d8b1e6f42a90 (dimensions + building_detection). Both reversible.
- Contract tests over real captured fixtures (tests/fixtures/suhail_live_2026_07/)
  and new-layer key/write tests. Full unit suite: 93 passed.
- docs/SUHAIL_SOURCE_AUDIT_2026-07.md: evidence-led audit + gap analysis.

Note: this commit carries the suhail_pipeline package as it currently stands on
disk (pre-existing uncommitted rename content plus this session's edits, which were
not separable since the package was untracked). The repo's other ~86 pre-existing
modified files (dated 2026-03-20) are intentionally left unstaged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The tile server can return an HTML error/maintenance page instead of a vector
tile; decode would otherwise raise a protobuf DecodeError. Add an early guard in
MVTDecoder.decode_bytes that returns {} when the payload starts with '<' (MVT is
binary protobuf and never does), plus tests. Salvaged and cleaned up from the
abandoned fix-mvt-decoder-str-bug branch (dropped its print/debug and hardcoded
province-id hack).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Pinstack and others added 2 commits July 15, 2026 12:19
…ject

Companion to the package-directory rename in this branch: updates every remaining
`meshic`/`Meshic` reference to `suhail`/`Suhail` (pyproject entry points + project
name, 14 test imports, README, docs, scripts). Without this the committed branch was
internally inconsistent — tracked tests still imported `meshic_pipeline` and
pyproject declared the old console scripts, so a clean checkout would fail the suite
and install a broken CLI. Also gitignores the `.gstack/` tool dir.

Pure rename (1703 meshic->suhail line swaps) plus the one .gitignore line; no
behavioural change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ranch) as a demonstrated-need-gated future option

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Pinstack
Pinstack merged commit bf51f62 into main Jul 15, 2026
1 of 2 checks passed
@Pinstack
Pinstack deleted the suhail-2026-source-expansion branch July 15, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant