Skip to content

PoracleNG API Enhancement Requests

This document tracks PoracleNG API gaps that required workarounds in PoracleWeb.NET, and what became of each. Some gaps are still referenced by inline HACK/TODO comments in the codebase.

Everything requested upstream landed in PoracleNG 5.4.0

Every request filed against PoracleNG while PoracleWeb.NET worked out how to stop reading and writing its database was answered in jfberry/PoracleNG#328, which ships as 5.4.0: #243 (exemptFromAreaSecurity), #252, #253 and #259 (area delete and rename across profiles), #323 (the type on a rule mute), #325 (bulk writes) and #326 (a strict create, answered as dry_run plus previous). The one exception is #324, which was declined: v2 keeps null as the stored wildcard, and PoracleWeb.NET translates it. PoracleWeb.NET requires 5.4.0 for that reason, so the workarounds for older servers are gone, and every 5.4.0 answer listed below is now in use. The tracker is #996.

Background

PoracleWeb.NET now proxies all alarm tracking writes through the PoracleNG REST API (see PoracleNG API Proxy). This migration was prompted by a March 31, 2026 incident where a NULL template column written directly by PoracleWeb.NET crashed PoracleNG's state reload for 15 hours.

The migration is complete for all eleven alarm types, on /api/v2. Pokéstop Events (incident) never touch IPoracleTrackingProxy; their CRUD goes through IPoracleIncidentProxy. Some operations still lack dedicated PoracleNG endpoints and use workarounds that are less efficient. The gaps listed below are these operations.


Gaps

Bulk Distance Update

ID: bulk-distance-update
Priority: High
Code refs: Each alarm service's UpdateDistanceByUserAsync and UpdateDistanceByUidsAsync methods

Current behavior: Adopted. PoracleWeb.NET sends one v2 PATCH per type naming the uids and the distance. Two variants: 1. Update ALL alarms of a type for a user/profile 2. Update specific alarms by UID list

What's needed: A PoracleNG endpoint that accepts a batch distance update:

PUT /api/tracking/{type}/{id}/distance
Body: { "distance": 500 }
// Updates all alarms of {type} for user {id} on their active profile

PUT /api/tracking/{type}/{id}/distance/bulk
Body: { "uids": [1, 2, 3], "distance": 500 }
// Updates specific alarm UIDs

Workaround without enhancement: Fetch all alarms via GET, then POST each one back with the distance field changed. Very inefficient for users with hundreds of alarms.

Landed in 5.4.0 (jfberry/PoracleNG#325, via #328), together with bulk clean below, as a v2 partial update over a uid set: PATCH .../tracking/{type} with {uids, set}. It answers per-uid refusals (invalid, conflict) instead of failing the batch. DistanceRewrite.Plan still splits off the area-scoped and place-scoped rules before sending, to report them without a round trip; conflict comes back as skippedConflict. The PATCH is sent trusted, because PoracleNG re-validates each stored rule's areas and untrusted it refuses a user's own drawn fence. Adopted in PoracleWeb.NET with sub-project 3b.


Bulk Clean Toggle

ID: bulk-clean-toggle
Priority: High
Code refs: CleaningService.cs

Current behavior: Adopted. PoracleWeb.NET sends one v2 PATCH per type naming the uids and the clean bit, so edit-in-place and summary bits set from the bot survive the toggle.

What's needed: A PoracleNG endpoint to batch-toggle the clean flag:

PUT /api/tracking/{type}/{id}/clean
Body: { "clean": 1 }
// Sets the given bits on all alarms of {type} for user {id} on their active profile,
// leaving the bits it was not given alone

Workaround without enhancement: Fetch all alarms via GET, then POST each back with the clean field changed. Same inefficiency as bulk distance.

Landed in 5.4.0 with bulk distance (jfberry/PoracleNG#325). Adopted in PoracleWeb.NET with sub-project 3b: one PATCH .../tracking/{type} per type with {uids, set: {clean}}.


Dashboard Counts

ID: dashboard-counts
Priority: Medium
Code refs: DashboardService.cs

Current behavior: DashboardService calls IPoracleTrackingProxy.GetAllTrackingAsync() which returns full alarm payloads for all types. Counts are extracted from the response arrays.

What's needed: A PoracleNG endpoint that returns alarm counts per type:

GET /api/tracking/counts/{id}
Response: { "pokemon": 537, "raid": 27, "egg": 17, "quest": 38, ... }

Workaround without enhancement: One read of the v2 tracking snapshot (GET /api/v2/humans/{id}/tracking) returns full payloads for all types. Works but returns complete alarm objects just to count them.


Admin Delete All Alarms

ID: admin-delete-all-alarms
Priority: Medium
Code refs: HumanService.cs:DeleteAllAlarmsByUserAsync

Current behavior: PoracleWeb.NET fetches all UIDs per alarm type via the proxy, then bulk-deletes each type sequentially.

What's needed: A PoracleNG admin endpoint:

DELETE /api/tracking/all/{id}
// Deletes ALL tracking for user {id} across all alarm types and profiles

Workaround without enhancement: Loop through each alarm type, GET all UIDs, then POST bulk delete for each. Slow and not atomic.


Profile Delete Cascade

ID: profile-delete-cascade
Priority: Low (resolved)
Code refs: ProfileController.cs:Delete

Status: Resolved, verified upstream. ProfileController.Delete proxies to DELETE /api/v2/humans/{id}/profiles/{n} and PoracleNG cascades. SQLHumanStore.DeleteProfile (processor/internal/store/human_sql.go) deletes the profiles row, deletes every tracking row for that (id, profile_no), and when the deleted profile was the active one moves current_profile_no to the lowest remaining profile, copying that profile's area and coordinates into humans. Deleting profile 1 while it is the only profile is the single exception: the row goes, the tracking stays.


Atomic Profile Switch

ID: atomic-profile-switch
Priority: Low (adopted)
Code refs: ProfileController.cs:SwitchProfile, PoracleHumanProxy.cs:SwitchProfileAsync

Status: Adopted. ProfileController.SwitchProfile now calls IPoracleHumanProxy.SwitchProfileAsync(userId, profileNo) -- a single atomic call. PoracleNG handles saving the old profile's areas and loading the new profile's areas internally. The multi-step dual-write has been removed.


Atomic Area Update

ID: atomic-area-update
Priority: Low (adopted)
Code refs: AreaController.cs:UpdateAreas, PoracleHumanProxy.cs:SetAreasAsync

Status: Adopted. AreaController.UpdateAreas calls IUserAreaWriter.SaveSelectionAsync, which sends one trusted v2 POST .../areas after PoracleWeb.NET's own allowed-name check. PoracleNG writes both humans.area and profiles.area internally. See the Trusted setAreas (bypass userSelectable filter) entry below.


Trusted setAreas (bypass userSelectable filter)

ID: trusted-set-areas
Priority: High
Code refs: IUserAreaWriter.cs, UserAreaWriter.cs, UserGeofenceService.cs, AreaController.cs:UpdateAreas (historical refs: the deleted IUserAreaDualWriter and PreserveOwnedAreasInHumanAsync)

Current behavior: PoracleNG's POST /api/humans/{id}/setAreas handler (processor/internal/api/humans.go:HandleSetAreas) intersects the submitted area list against fences where UserSelectable == true for non-admin users. Any area whose fence has userSelectable=false is silently dropped -- no error, no warning. PoracleWeb.NET's GeofenceFeedController.cs serves user-drawn custom geofences with userSelectable: false (to hide them from the Poracle bot's !area picker and from other users' views), so every SetAreasAsync call that contains a user-drawn geofence name loses that name. This is the root cause of #163 -- "custom geofence toggle doesn't persist."

Status: adopted, for user-geofence area writes and per-alarm override_areas alike (history below). Filed as jfberry/PoracleNG#215 and given a trusted flag in PR #217. Building against that branch showed the flag does not close this gap, on three counts:

  1. It lifts more than the userSelectable filter. settableAreaNames folds the community area restriction behind the same unrestricted := admin || trusted, while the comment beside the flag says it lifts userSelectable only. Reproduced on a build of develop with [area_security] enabled = true and a human restricted to a five-area community: an untrusted request stored ["erina"] and rejected Aberdeen; the same request with trusted: true stored both. Since setAreas is a whole-list replace, the one call that needs the flag is also the one carrying the user's requested admin areas -- so using it would hand any user every area on the instance. Filed as #228.
  2. There is no profile target. POST /v2/humans/{id}/areas takes id and nothing else and writes CurrentProfileNo, so RemoveAreaFromAllProfilesAsync and RenameAreaInAllProfilesAsync -- which must span every profile when a drawn fence is deleted or renamed -- have no API form at all.
  3. Per-rule override_areas is still refused. POST /v2/humans/{id}/tracking/{type} with an override_areas naming a userSelectable=false fence answers 422 "area not permitted", and the tracking write had no trusted of its own at the time. (SetAlarmOverrideAreasAsync and UserOwnedOverrideAreaProxy, the workarounds for it, are gone; see below.)

PR #230, merged 2026-10-06, addresses all three -- and on re-test, properly: jfberry confirmed admin lifts both userSelectable and the community filter while trusted lifts only userSelectable, closing #228 rather than over-correcting it the way an earlier build on the same branch did. (The over-correction this section used to describe -- trusted rejecting a drawn fence outright under area_security -- was that earlier, pre-#230 build; it did not survive into the merged fix. Re-tested live against a develop build carrying

230 before trusting this claim again.) The other two gaps are untouched: no profile target on setAreas,

and override_areas still has no trusted form on the v1 tracking write (v2's does, per #230, but nothing on this side has moved alarm creates to v2 yet -- see the v2 migration status below).

Adopted for all six methods (first three in #838 / #937, the rest with the area writes release). Adding or removing one area and the Areas page save use PoracleNG's v2 trusted setAreas; removing a name from every profile and renaming it use v2's remove-everywhere and rename-everywhere. There is no writer and no area_security gate any more: PoracleWeb.NET checks each name itself (selectable for the user, one of their own fences, or already on the profile) before sending trusted. The two tables cannot drift, because setAreas commits humans.area and the active profiles.area together inside PoracleNG on one HTTP call. The per-alarm override_areas workaround (SetAlarmOverrideAreasAsync, UserOwnedOverrideAreaProxy) went when alarm creates and edits moved to v2: the tracking proxy checks each name with IUserAreaPolicy and sends the write trusted. No HACK: trusted-set-areas tag is left. The text below is the history of how that was reached.

That second point exposed a gap in the workaround of the time. RenameAreaInAllProfilesAsync, and the delete path, touched humans.area and profiles.area only, never override_areas. A rule scoped to a deleted or renamed fence keeps the dead name, and UserOwnedOverrideAreaProxy strips only names the user still owns, so the dead name goes to PoracleNG on the rule's next edit. With #211's fix, newOverrideContext builds the permitted set from the live fences and answers 400 "area not permitted" for anything else (read on develop at 25ff8c0a), so on a server carrying #217 that rule cannot be edited until it is deleted.

5.4.0 answered the remaining gaps (#328). DELETE /api/v2/humans/{id}/areas?name=&all_profiles=true removes one name from every profile in a transaction and takes dry_run=true, which reports the alarms that would be broadened by losing a fence they were limited to (#253, with #252 as the documentation fix). PATCH /api/v2/humans/{id}/areas?from=&to= renames across profiles, rewriting override_areas in the same transaction (#259). trusted lifts only userSelectable, and a user's own fence can carry exemptFromAreaSecurity (#243), so the "confirmed off" gate on area_security is no longer needed. Adopted with the area writes release: IUserAreaDualWriter is deleted and every user-geofence area write goes through the v2 routes. The per-alarm override_areas site followed with the v2 alarm writes, so no HACK: trusted-set-areas tag is left. The workaround description below is kept as history.

Workaround (HACK), history. Deleted with the area writes release; it ran for all six methods until then, and before 5.4.0 was the fallback for three: UserGeofenceService delegates to IUserAreaDualWriter, a tiny atomic-write abstraction that holds the Poracle DbContext and commits both humans.area and the active profiles.area in a single SaveChangesAsync call. The single-SaveChanges guarantees EF Core wraps both writes in one implicit transaction — humans.area and profiles.area cannot drift, even if the process crashes between reads. AreaController.UpdateAreas additionally calls IUserGeofenceService.PreserveOwnedAreasInHumanAsync after the proxy SetAreasAsync call to re-add any user-owned geofences that PoracleNG stripped; this prefers the same trusted path, falling back to the writer's bulk AddAreasToActiveProfileAsync. These direct-DB writes were tagged HACK: trusted-set-areas; that grep now finds none. The two other direct writes this list used to carry, a profile rename and a human delete, went with 5.4.0 (see the v2 findings below).

Because the direct-DB writes skip PoracleNG's HandleSetAreas handler, they also skip its terminal reloadState(deps) call — so AddToProfileAsync, RemoveFromProfileAsync, and PreserveOwnedAreasInHumanAsync each call ReloadGeofencesSafeAsync manually to ask PoracleNG to refresh its in-memory state. The trusted path triggers its own reload server-side, so the manual call is redundant there and load-bearing only on the fallback; it stays unconditional at all three call sites rather than threading "which path was taken" back out of a private helper that has no other reason to report it. Without it on the fallback path, a toggle would only take effect on the next organic state reload (potentially minutes).

Regression history: Before PR #88 (v2.0.0), the direct-DB path was the only path. The proxy migration routed user geofence area writes through setAreas, which introduced the silent-strip bug. The direct-DB code is the restored pre-#88 behavior, scoped specifically to user geofence names.


NULL Field Defaults

ID: null-field-defaults
Priority: Low (resolved)

Status: Resolved. BaseRepository and EnsureNotNullDefaults() have been removed. All alarm writes go through the PoracleNG API, which applies proper defaults via cleanRow(). The remaining direct-DB repositories (poracle_web-owned tables) handle null normalization as needed; the human repository is gone.


PoracleNG monsters.go COALESCE Gap

ID: monsters-go-coalesce
Priority: Low (fixed upstream)

Status: Fixed. processor/internal/db/monsters.go selects COALESCE(template, '') AS template on PoracleNG main, matching every other tracking query file, so a NULL template no longer crashes the state reload for everyone. ping is still selected raw, but PoracleNG's initial schema declares it NOT NULL on every tracking table it creates, so there is no second crash vector to close.

The March 31, 2026 incident this tracked is still why alarm writes go through the API instead of the database. That reasoning does not depend on the query being defensive.


available_languages, readable since 5.2.1

Filed as jfberry/PoracleNG#194, fixed by PR #197 — closed.

POST /api/humans/{id}/setLanguage refuses any language absent from general.available_languages, and until 5.2.1 nothing exposed that list, so the alert-language menu had to offer all eleven of this site's languages and let the write fail.

GET /api/config/poracleWeb now carries availableLanguages. PoracleApiProxy reads it, SettingsController projects it as poracle_alert_languages, and AlertLanguageService.restrictTo narrows the menu to codes Poracle will accept. Absent or empty means unrestricted, and both accept any code, so the two need no telling apart.


disabledHooks, corrected in 5.2.1

Filed as jfberry/PoracleNG#195, fixed by PR #197 — closed.

fort is in the disabledHooks array as of 5.2.1 and PoracleDisabledHookMap maps it like any other hook. pokestop, which was in the array while nothing in the processor read the flag, is gone from it and the config field is deprecated.

Both halves left a tail for servers older than 5.2.1, and it is gone. UpstreamFeatureFlagService no longer reads general.disable_fort_update separately, and pokestop still maps to nothing so that a stray entry can't switch off lures, invasions and quests on a flag that does nothing.

disable_showcase is the same shape one release later: enforced, absent from disabledHooks, and read separately by IPoracleApiProxy.GetShowcaseDisabledAsync. Filed as #210 and fixed in PR #217, which ships in 5.4.0.


v2 findings, filed upstream as #208-#216

Nine things found while planning the v1-to-v2 migration against PoracleNG 5.2.1, each confirmed by calling a running instance on 2026-08-24 rather than by reading source. All nine were filed as jfberry/PoracleNG#208 through #216, accepted, and fixed in PR #217, merged 2026-08-31 and shipped in 5.4.0. The "Here" paragraphs say what PoracleWeb.NET did about each; the workarounds that existed only for servers without the fix are gone.

Eight of the nine are below; the ninth, disable_showcase missing from disabledHooks, sits with its twin under disabledHooks.

active_hours.day is bounded 0-6 while the scheduler reads ISO 1-7

#208 -- fixed on develop: day is ISO 1-7 and day: 0 is refused.

The v2 schema declared day as minimum: 0, maximum: 6 and the migration guide documented it as "0 = Sunday". isoDow in processor/cmd/processor/profiles.go uses Monday 1 through Sunday 7, and nothing translated between them, so through v2 a Sunday schedule could not be expressed at all and the value that was accepted matched no weekday. Any client following the guide wrote schedules that never fire.

Here: ActiveHoursValidator enforces 1-7, which is what the fix settles on. Profile writes now go through v2 and the schedule is sent as v2's entry array.

v2 invasion reads omit the targeting field for a named grunt, so GET then PUT is impossible

#209 -- fixed on develop, and larger than reported: 41 of the 59 grunt_type values in shipped data had no read representation, not the four probed.

v2 required exactly one of type_id, grunt_id, everything, boss on a write. A rule whose grunt_type is a type name round-tripped (water becomes type_id: 11); a rule whose grunt_type is a named grunt (blanche, player team leader, npc 0) came back carrying no targeting field of any kind, so handing a v2 read back to a v2 write answered 422. The fix admits grunt_type itself to the one-of set, and a read emits exactly the field the rule is stored as.

Here: adopted, first in PoracleWeb.NET #894 behind a second gate on the server's grunt masterdata, because 32 of 201 invasion rules in production carried a name v2 refused (kecleon, gold-stop and showcase, which are Pokéstop events, and metal, which the game data calls steel). With 5.4.0 every invasion read and write is v2 and the gate and InvasionGruntNameService are gone: the event names are saved through the incident routes, and metal is rewritten to steel before it's sent (the rule repair fixes the stored ones).

Two things the schema does not say, both established by calling a running build: it contradicts itself on gender -- V2InvasionRule.gender says "ONLY valid together with type_id" while grunt_type says it "may be combined with gender", and the latter is correct -- and it normalises a spaced name on write, so player team leader is stored as player_team_leader. Worth knowing before adopting the fix: it also stops type_id, everything and boss being emitted on a read.

override_areas is not validated, on either version or either surface

#211 -- fixed on develop, and the reason the re-test found nothing is now known.

A non-admin's override_areas was stored verbatim on 5.1.0 v1, on 5.2.1 v1 and on 5.2.1 v2 -- for a real user-drawn fence carrying userSelectable: false, and for a fence name that does not exist at all. The setAreas filter on the same human, in the same session, stripped the same fence name, so the human was demonstrably non-admin and the filter demonstrably live. Method in the verification note.

The check was not weak, it never ran: validateOverrideFields gates on oc.permitted != nil, permitted is built from deps.AreaLogic, and processor/cmd/processor/main.go never sets AreaLogic -- still true on main today. Dead code on every tracking write, v1 and v2, all eleven types.

Here: adopted. IUserAreaPolicy authorises the names and the tracking write is sent ?trusted=true, so PoracleNG stores the list; the decorator and its direct column write are deleted.

language validation depends on configuration the client cannot read

#216 -- fixed on develop: the code is validated against the loaded locales, and the lowercasing is documented.

POST /api/v2/humans/{id}/language accepted "zz" with 200 and stored it, while the same call is refused on a deployment that sets general.available_languages. The write also lowercases, so "DE" stores de.

Here: AlertLanguageService.load matches humans.language case-insensitively against the languages this UI ships and stores it back in the UI's own casing, so a stored pt-br still selects the pt-BR row.

/health carries no applied-migration number

#212 -- closed deliberately without adding one. Migrations are mandatory at startup, so a database can only be ahead of its binary, never behind; and publishing the number would make PoracleNG's migration numbering a public contract. PR #217 answers the concrete question instead, with a costume capability flag on /health, GET /api/v2/activity and GET /api/masterdata/costumes.

Here: PoracleSchemaVersionReader is gone. Nothing needs the migration number now that 5.4.0 is the minimum, so PoracleWeb.NET no longer reads schema_migrations or information_schema.

No list-humans and no delete-human, on either version

#214 -- fixed on develop: GET /api/v2/humans with ?type= and ?id=a,b,c, and DELETE /api/v2/humans/{id}.

Every human route was single-{id}: GET /api/humans, GET /api/v2/humans and DELETE /api/v2/humans/{id} all answered 404.

Here: adopted, in PoracleWeb.NET #839/#936 first as a fallback, and now with no fallback. The list, the batch read that resolves geofence owners' names and the delete all go through /api/v2/humans, and HumanRepository is deleted. The list item carries seven fields (admin_disable, current_profile_no, enabled, id, language, name, type) and the admin grid also renders disabled_date and notes; #229 (closed, merged via PR #230) added them, and confirms type=webhook is the exact stored value for a webhook (HumanKind.Webhook). The existence check behind the purge reads the proxy too, which answers null only for a 404 and throws for anything else, so an outage is no longer reported as "already gone" (#994).

Profile create returns no profile_no, and nothing can rename a profile

#213 -- fixed on develop: create returns the created profile, and PATCH is a real PATCH that can rename.

POST /api/v2/humans/{id}/profiles answered {"status":"ok"}, and PoracleNG assigns the lowest free number rather than max + 1, so the caller could not predict it. PATCH .../profiles/{n} required active_hours and refused every other property, name included.

Here: adopted, in PoracleWeb.NET #891 behind a schema probe, and now unconditional: the create returns the number, and the rename is PATCH .../profiles/{n}, sent with only the active_hours the caller submitted. ProfileNumbering's list-create-list-diff and IProfileRepository.RenameAsync are deleted, along with the schema flags that chose between paths. A new profile's areas and location are written by NewProfileGeography through ?profile=N on the v2 areas and location routes (#993), because PoracleNG's add still ignores both; if that fails the new profile is deleted again, since no direct write is left to repair it.

v2 setAreas keeps the v1 userSelectable filter

#215 -- answered on develop, then fixed properly in #230 (merged 2026-10-06). setAreas reports what it stored against what it rejected, and takes an opt-in trusted flag that now lifts the userSelectable filter only -- the earlier build's over-broad scoping (bypassing the community area restriction too, see #228) did not survive into the merged fix. Re-tested live against a develop build carrying #230.

Re-confirmed on 5.2.1 rather than taken from source: POST /api/v2/humans/{id}/areas with ["<a user-drawn fence>", "aberdeen"] stored ["aberdeen"] -- silently, 200, exactly as v1 does. That remains true on 5.2.1; it is #230, in 5.4.0, that changes the behaviour.

Here: first partially adopted in #838 / #937, then completed with the area writes release: every user-geofence area write goes through the v2 routes and the dual writer is gone. The per-alarm override_areas column followed when creates moved to v2, which takes trusted on creates and edits.


ping is blanked unconditionally by v1 writes too, not only by pre-#249 v2

Status: upstream half fixed in jfberry/PoracleNG#249 (merged 2026-10-11, in 5.4.0); the v1 half is not fixed and is why a refusal remains.

Every V2*Rule had no field for ping until #249, and the handlers stored Ping: "" unconditionally on a v2 write — verified live against 5.2.1. What had never been checked until this week: whether falling back to v1 for a pinged row actually preserved it, as the long-standing fallback comment claimed ("sends the row to v1, which keeps it"). It doesn't. Verified live, against a jfberry/PoracleNG develop build: v1's write handler blanks ping unconditionally too — present, changed, or left untouched, create or update, field sent or omitted from the request. There has never been a write surface, on any PoracleNG released to date, that preserves a role or user mention through an edit made from this site. Every such edit, for any reason, on any server, has been silently deleting the mention.

Here: v2 carries ping on every rule and every create and edit now goes through v2, so a mention survives an edit. The refusal PoracleWeb.NET used to apply when an edit would fall back to v1 is deleted with the fallback. Creates still don't offer a Mention field: the edit dialogs do. PoracleWeb.NET #956 (the first fix) and #957 (a UX bug it surfaced: the Mention placeholder was realistic enough to be mistaken for a stored value).


Tracking create has no upsert path for natural-key types

Status: closed by a schema change in 5.2.1. Migration 000008_drop_tracking_unique_keys (upstream commit 5a3886a, 2026-08-18, three days before the 5.2.1 version bump) drops both keys.

lure and invasion were the only types PoracleWeb.NET tracks that carried a unique index over a natural key:

lure       lure_tracking(id, profile_no, lure_id)
invasion   invasion_tracking(id, profile_no, gender, grunt_type)

HandleCreateLure / HandleCreateInvasion treat a row as "already present" only when every field matches, so changing a field outside the natural key -- distance, template or clean on a lure -- was not recognised as an existing row, and the handler attempted an INSERT that collided with the index:

Tracking API: insert lure: Error 1062 (23000):
Duplicate entry '<id>-<profile_no>-<lure_id>' for key 'lure_tracking'

PoracleNG answered 500 {"message":"database error"} and the edit was discarded, so the only way to edit these two types was to delete the row first. That is what NaturalKeyTrackingUpdate does, at the cost of rotating the uid on every edit and orphaning anything holding the old one -- quick-pick applied state tracks uids. ITrackedUidRemapper moves that state across, so the rotation is handled rather than merely known about.

Here: gone. Lure and invasion edits are one v2 PUT, so the delete-then-create and its uid rotation no longer exist.

Pokemon rotated too, for a different reason: on 5.2.x its edits went through PUT /api/v2/humans/{id}/tracking/pokemon/{uid}, whose engine is delete-then-insert. It used to be the one type whose uid survived an edit.

Upstream has since stopped rotating. jfberry/PoracleNG#303 (merged 2026-10-17) moves a v2 PUT's replacement row back onto the old uid, and #305 (merged the same day) does the same for ApplyDiff, which covers bot edits, v1 POST /api/tracking/* and v2 POST. A failed reassign is logged and the rule keeps its new uid, so the rotation can still happen, just rarely. Both ship in 5.4.0. Nothing here changes: ITrackedUidRemapper is a no-op when old and new uid match and still covers the rare failure, and the delete-then-create fallbacks above rotate regardless because they are two requests, not one.

303 also retyped every v2 human and profile shape (booleans, real arrays, latitude/longitude); that was

adapted to in PoracleWeb.NET #969 and #970.


Summary Table

Gap Priority Workaround in use Status
Bulk distance update High None Landed in 5.4.0 (#325): PATCH .../tracking/{type} {uids,set}. Adopted
Bulk clean toggle High None Landed in 5.4.0 (#325). Adopted
Create silently updates a different rule; maxbattle never dedups High Client-side DiffTracking mirror, max battle identical-alarm check Landed in 5.4.0 (#326, answered as POST ?dry_run=true plus previous). Adopted; the mirror is deleted and creates and edits go through v2
Tracking mutes match uid alone Medium scope=tracking not offered Landed in 5.4.0 (#323): a rule mute carries its tracking_type. Listed and lifted here; creating one is a separate decision
v2 stored wildcards prose-only Medium Tracking reads map null to our defaults Declined (#324): v2 keeps null as the wildcard. TrackingV2Translator.ToV1Row maps null to this application's own defaults, and tracking reads now go through v2
Trusted setAreas High v2 trusted setAreas for every user-geofence area write, behind PoracleWeb.NET's own allowed-name check (the dual writer is deleted) 5.4.0 carries every piece: trusted (#230), delete across profiles with dry_run (#253, #252), rename across profiles (#259), exemptFromAreaSecurity (#243). Adopted
Dashboard counts Medium One read of the v2 tracking snapshot Open, returns full payloads
Admin delete all alarms Medium Fetch UIDs per type, bulk delete each Open
Admin list / delete human Medium None Adopted, in #839/#936, once #229 reported the fields the admin grid needs. HumanRepository is deleted
v2 pokemon catch-all unwritable Medium None; no v1 write path is left, so a pokemon_id = 0 rule goes to v2 like any other #227: minimum: 1 refused a rule PoracleNG itself stores. Our half of it -- writing pvp_ranking_best = 0 -- fixed in PoracleWeb.NET #895
Profile delete cascade -- None needed PoracleNG cascades; verified upstream
Atomic profile switch Low Already in PoracleNG Adopted
Atomic area update Low Already in PoracleNG Adopted, for admin areas and user geofences alike
NULL field defaults Low None Resolved by the proxy migration. PoracleNG fills only absent fields, so the *Create model defaults are what's stored
monsters.go COALESCE -- None needed Fixed upstream; template is COALESCE'd on main
available_languages not readable -- None needed Adopted on 5.2.1 (#194)
disabledHooks omits fort Low None Fixed in 5.2.1 (#195); the second config call for older servers is deleted
Natural-key create collision -- None; NaturalKeyTrackingUpdate is deleted Keys dropped by 5.2.1 migration 8, and every edit is one v2 PUT
ping blanked on every write surface High Refuse an edit that would fall back to v1 while the row holds a mention Adopted. jfberry/PoracleNG#249 (in 5.4.0) fixes v2, and with no v1 edit path left the refusal is gone