Record geographical positioning qualification and Development deployment

This commit is contained in:
Nick Beckley 2026-11-13 15:01:09 +00:00
parent 9eb1f553ef
commit efc28808f3

View File

@ -0,0 +1,23 @@
# Geographical positioning delivery — 13 November 2026
1. **Implemented functionality.** Locations now expose geographical status, candidate selection, exclusion, retry and deliberate hierarchy resolution. Existing location creation does not submit lookup. Reparenting an existing location beneath an eligible root submits that branch; name/type edits invalidate identifying context without submitting fresh requests. Maps adds Position geographically with a real canvas preview, Cancel/Escape, Apply, existing Save/revision checks and existing Undo/Redo. Word Companion, manuscript synchronisation/persistence, Context and Intent were not changed.
2. **Roots and types.** Bundled ISO 3166 country/subdivision reference data provides worldwide country support and explicit or country-qualified administrative roots, with UK/US aliases and England, Scotland, Wales and Northern Ireland. Existing Country, Region, Town and Village types qualify; generic State/County/City types are supported if present, without changing the lookup table. Premises and non-geographical ancestors are excluded. Bare ambiguous regions and fictional roots fail closed. Direct and deep hierarchies are supported.
3. **Provider and verified conditions.** Public Nominatim is the initial configurable provider, following the developer's explicit informed decision. The [published policy](https://operations.osmfoundation.org/policies/nominatim/) was checked on this date. The implementation uses one designated machine, one database-serialized external request at a time, an identifying PlotDirector User-Agent, persistent caching and visible OpenStreetMap/ODbL attribution. It always applies a 15-second minimum interval (four/minute), stricter than the absolute one/second ceiling. There are no API credentials, periodic refreshes, automatic scans or unrestricted import endpoints. No OS Open Names/local UK gazetteer is shipped.
4. **Queue/cache.** Durable per-location jobs use generation and lease fencing, two-minute restart recovery, provider timeout, four bounded attempts and backoff. A database gate serializes requests across application instances, retains cooldown and caps live requests at 200/day. Admission is at most 20 locations per author action, one batch per author/hour and six application batches/hour; retry shares that admission allowance. A shared cache stores public provider identities, metadata, coordinates, attribution and resolution time, keyed by provider/endpoint and complete geographical context. It contains no private project hierarchy or manuscript descriptions. Author confirmations remain per-location and are never promoted from one ambiguous private choice to another author.
5. **Confirmation and automatic matches.** A single non-truncated candidate with an exact provider place name, matching country/subdivision and all available additional administrative context can resolve automatically when context extends beyond a country-only root. Otherwise the author sees the candidate's place/region/country and confirms an index with the observed generation. Broad UK-only names, including insufficiently contextualised Newtown, are not silently assigned a coordinate. Confirmed matches survive unrelated edits; stale results and cross-account confirmations are rejected.
6. **Maps and coordinates.** The local spherical azimuthal equidistant projection uses north-up orientation, circular longitude centring, one aspect-preserving scale and padding. Single/coincident locations remain finite. Extents beyond 15 degrees from the centre are refused instead of producing a misleading global layout. Only resolved, unlocked location markers move; paths, drawings and other features retain their stored contents. Existing connected routes keep following linked markers as before. Apply adds one Undo step; manual dragging cannot change real-world coordinates.
7. **Database status.** Development was verified as `PlotDirector_Development`. Migrations 253–256 are applied and their 12 geography procedures verified. Required fresh-install order is **253, 255, 254, 256**: the initial qualification of 254 exposed a short job-state column; forward-only 255 repaired its width before 254 resumed. Applied numbered migrations were not edited to repair the live schema. A successful copy-only compressed CHECKSUM backup and nonempty backup file were verified. RESTORE VERIFYONLY was unavailable to the application principal; no restore/reset was attempted. See the implementation guide for the exact backup path and rollout order.
8. **Automated/browser verification.** The solution build passed with zero warnings/errors. The normal regression harness passed all 421 configured groups (488 PASS output records including nested suites). Focused tests cover country/alias/type/hierarchy rules, fake-provider outcomes, cache identity, ambiguity, automatic contextual matching, errors/backoff, provider configuration, authorisation and CSRF. Rollback SQL tests passed invalidation, durable deduplication, expired-lease recovery, stale-result rejection, author confirmation/exclusion and hierarchy admission. Sixteen concurrent real database reservations produced exactly one winner; fresh connections and provider cooldown could not bypass the gate. Projection tests passed direction/distance ratio, aspect/padding, single/coincident/polar/antimeridian cases and wide-extent refusal. Browser tests passed new preview/cancel/Escape/Apply/Save/Undo/Redo/manual movement in light/dark browser/PWA layouts, safe candidate text rendering, existing Maps author workflows, existing Locations drag/drop and PWA/service-worker regressions. Authenticated Development tests passed candidate confirmation, foreign-project/CSRF rejection, real map Save/reload and the actual PWA ribbon, using only dedicated deterministic fixtures. No live geocoding calls occurred. The dedicated account and all its fixture projects/locations were removed through normal account deletion; post-cleanup SQL shows the original 32 geography rows awaiting author requests, no live provider reservations and an empty shared cache.
9. **Deployment and exact commit.** Development runs implementation commit **9eb1f553ef8c807104346a7d01b41e7c570235ad** on the existing shared branch. Release: `geography-9eb1f55-20261113T144835Z`. Publish-to-authenticated-verification window: **14:48:35–14:57:27 GMT, 8 minutes 52 seconds**. Service state, local GET, public TLS-verified HTTPS GET, authenticated changed routes, DLL metadata and matching published/deployed DLL SHA-256 were verified. Hash: `3c5ed7861642463dadbca92132a9dcdc34056de795e0265fbaf785e723617a25`. No warning/error entries appeared during release verification. The previous physical application directory is retained at `/srv/apps/plotdirector-dev/current-before-geography-9eb1f55-20261113T144835Z`; the release archive is retained under `/srv/apps/plotdirector-dev/releases/`. No queued/active import, Story Intelligence, synthesis or enrichment work was interrupted. Production was not accessed or deployed.
10. **Configuration, limits and acceptance.** Development has Nominatim enabled with the identifying Development URL and designated host `atlas`. Existing rows remain unsubmitted: enabling the provider did not trigger a scan. Watched Development JSON supports immediate disable or switching to another Nominatim-compatible endpoint without redeployment; code defaults remain disabled for unconfigured installations. An actual public-provider round trip remains a small manual acceptance step: deliberately request an eligible hierarchy, wait for the finite queue, inspect/confirm any uncertain matches, then preview/apply/save geographical positioning and undo it. Automated tests intentionally do not depend on the public service. Dense coincident markers can overlap, large geographical extents are refused, and the conservative hourly batch allowance may require waiting between multiple quick hierarchy edits. Project backups currently preserve map canvas positions but do not export geographical confirmations; a restored hierarchy needs an explicit resolution request again. The unrelated pre-existing `Docs/Investigations/CanonicalManuscriptArchitectureAssessment.md` remains untracked and unchanged.
Implementation, policy links, configuration and migration/test instructions: [GeographicalPositioning.md](GeographicalPositioning.md).