Stop gating identification on IA.properties identificationClassN - #1778
Conversation
IBEISIA.validForIdentification(ann, context) rejected any non-trivial annotation whose iaClass was not in the legacy IA.properties identificationClassN allowlist. Identification config lives in IA.json, so a stale list (amphibian-reptile: a fire-salamander template) or blank entries (iot: "identificationClass0 =", read as "") silently dropped annotations from WBIA/HotSpotter identify, matchAgainst assignment in convertAnnotation/manualAnnotation.jsp, and AcmIdBot registration. Remove the gate; validForIdentification keeps its null and bbox checks. The allowlist helpers are kept unchanged and marked @deprecated for external callers. No replacement eligibility gate is introduced; existing path-specific IA.json checks remain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex (GPT-6 Astra) <noreply@openai.com>
Review recordCodex round 1 (plan): not converged. Findings:
Response: A survey of all 280 branches found only two installs that define the key. Neither uses it as a deliberate exclusion:
I kept the helpers Codex round 2 (plan): converged. One Minor: the Javadoc and PR wording implied IA.json becomes a universal gate. I reworded it. Codex round 3 (code): converged, no findings. Caught by the test run, not by review: This record isn't a claim that the change doesn't need human review. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1778 +/- ##
=======================================
Coverage 54.84% 54.84%
=======================================
Files 314 314
Lines 12704 12704
Branches 4006 4095 +89
=======================================
Hits 6968 6968
+ Misses 5441 5435 -6
- Partials 295 301 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Problem
IBEISIA.validForIdentification(ann, context)rejected any non-trivial annotation whoseiaClasswas missing from the legacy IA.propertiesidentificationClassNallowlist. Species and class configuration moved to IA.json long ago, so the list goes stale without anyone noticing. When it's stale, annotations drop out of identification with only aNOTE:log line to show for it.Of the 280 local and origin branches surveyed, only two install branches define the key:
identificationClass0..2 = fire_sal, salanader_fire, salanader_fire_adult, a 2021 fire-salamander template. The install now configures about 35 taxa in IA.json (frog,toad,lizard,caiman, …). HotSpotter silently skips every one of them that isn't a salamander.identificationClass0 =andidentificationClass1 =.Properties.getPropertyreturns""for a blank value, so the list becomes["", ""]. That list is non-empty, so every annotation with a real class fails the gate.mainand every other install don't define the key. On those the gate already lets everything through, and this PR changes nothing for them.Change
validForIdentification. The null-annotation and bbox checks stay, and theAnnotationLitecache behavior is unchanged. Both overloads keep their signatures, so no caller changes.validIAClassForIdentification(both overloads) andgetAllIdentificationClasseswith their behavior unchanged, marked@Deprecated, for any external or custom-JSP callers.AcmIdBotcomment that described the old check.IBEISIAValidForIdentificationTest:IA.getPropertyis scoped with try-with-resources.No replacement eligibility gate is added. The existing path-specific IA.json checks remain, for example
isValidIAClassbefore settingmatchAgainstinconvertAnnotationandmanualAnnotation.jsp.Behavior change on installs that define the list
On an install whose mounted IA.properties defines
identificationClassN, annotations of classes not in that list now passvalidForIdentification. The affected paths are:sendIdentifyandbeginIdentifyAnnotations, the HotSpotter path)processCallbackmatchAgainstassignment inconvertAnnotationandmanualAnnotation.jsp, still gated by IA.json__sendAnnotationsGetCurrentIAInfo?onlyIdentifiable=trueThe v2 ml-service / MiewID path and React manual annotation never used this gate and are unaffected.
Deploy notes
grep identificationClasson each install's mountedWEB-INF/classes/bundles/IA.properties. The branch copies were surveyed; the mounted files may differ. Any install that used the list to deliberately exclude a class should move that exclusion into IA.json first.AnnotationLitecaches per-annotationvalidForIdentification=falseresults in memory, and the restart clears the stale ones.identificationClassNlines in IA.properties are now ignored and can be removed whenever it's convenient.Testing
mvn test: 1067 tests, 0 failures, 0 errors, 7 skipped.IBEISIAValidForIdentificationTestfails on the old code (2 assertion failures) and passes after the change (4/4).AcmIdBot*Test: 32/32 pass.🤖 Generated with Claude Code
Reviewed with Codex (GPT-6 Astra): 2 plan-review rounds and 1 code-review round, converged with no Critical or Major findings.