Repository navigation
feat(research): support nationwide DE/DK operator imports without dotenv - #141
Merged
Merged
Conversation
…index feat(research): prepare public semantic knowledge index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Research operator commands currently try to read the runtime
.enveven when root has already exportedoperator.envbefore switching tooklab. The three operator entry points now explicitly disable dotenv loading; normal runtime Settings remain unchanged.The municipality scope now covers all 16 German states from the supplied BKG catalog and an explicit 98-municipality Danish catalog across all five regions. German AGS checks remain exact, Danish imports require catalog-pinned relation IDs, and 90 additional German city exceptions were individually verified through the own Nominatim instance. The 107 exceptions still require their exact relation/region/level/AGS tuple. Scope ordering and resume remain deterministic, with the bound adjusted from 20,022 to 20,098.
Migration 0017 follows unchanged 0016 and only replaces the region constraint. Its downgrade locks and refuses to proceed while out-of-old-scope rows exist; it never deletes them. SQLAlchemy metadata and the deployment upgrade target/fingerprint are aligned. No new grants, API contract changes, automatic imports, or runtime dotenv changes.
Validation:
uv run ruff check .,uv run ruff format --check ., anduv run mypy: pass (283 formatted files / 194 typed source files).uv run pytest -qcompleted: 2,525 passed, one optional Qdrant integration skipped (TEST_QDRANT_URLunset), 26 SQL-console fixture setup errors. These were caused by the extranational_plan_operatorrole created for live plans in the same disposable PostgreSQL cluster; the console deliberately rejects unknown cluster-wide EXECUTE consumers. The completed plan database and role were removed without changing application code or relaxing any guard. The affected console tests and all research/migration tests were rerun: 372 passed, no failures or skips.0016 → 0017deployment test: passed, including table OID/owner/grant preservation and unchanged synthetic source schema.git diff --checkand documentation Prettier/link checks: pass.Live evidence (2026-09-28): BKG workbook conversion yields 10,747 German municipalities, excluding 192 unincorporated areas. The Danish inventory has 98 entries. Read-only plans used the own Nominatim instance and an empty disposable PostGIS database: DK 96 new / 2 rejected (Thisted 787/R2095303 and Aabenraa 580/R1928466 absent in lookup); German 107 verified city exceptions plus Saarbrücken: 108 new / 0 rejected; an additional plan passed for Aachen, Göttingen, Hannover, Saarbrücken and Eisenach (Thuringia), totaling 112 distinct verified German municipalities. A bounded default-scope plan reports all 10,845 input entries. This is not a full provider plan of all German municipalities or a classification against existing production areas.
Deploy 0017 before the compatible backend, coordinating import jobs for the table lock. Existing UUIDs, geometries, grants and source data are preserved. Re-start scope imports from offset 0 after changing from the old geographic scope, since the region ordering expands; subsequent resume requires the same catalog and selection. No production apply or merge performed.