feat(research): preserve urban geometry pipelines and qualification suites

Preserve offline geometry, marking, replay and evaluation pipelines with source manifests and synthetic tests. Research qualification does not activate these methods as production navigation.
This commit is contained in:
DCCONSTRUCTIONS
2026-10-29 09:10:00 +03:00
parent 5d56237124
commit 69dc566665
611 changed files with 52016 additions and 28 deletions
@@ -0,0 +1,36 @@
"""Keep the evidence footprint fixed across replacements within one fresh run.
The tolerance belongs to the original observed paint, not to each edit in a
chain. No baseline or previous-run geometry is loaded here.
"""
import numpy as np
import shapely
from marking_rules import POLICY,validate_removed
class PaintConservation:
def __init__(self):
self.footprints={}
def inherited(self,ids,current,geometry):
return shapely.union_all([self.footprints.get(i,geometry(current[i])) for i in ids])
def validate(self,ids,current,geometry,new,candidate,readers):
old=self.inherited(ids,current,geometry)
removed=old.difference(new.buffer(POLICY['retained_paint_tolerance_m']))
if not removed.is_empty:
normal=np.array([-candidate['axis'][1],candidate['axis'][0]])
offsets=(shapely.get_coordinates(removed)-candidate['origin'])@normal
if np.max(abs(offsets))>.7:
return False,dict(reason='ancestral-paint-outside-measurement')
passed,evidence=validate_removed(old,new,candidate,readers)
return passed,dict(reason='fixed-observation-footprint',views=evidence)
def committed(self,ids,current_before,geometry,features):
inherited=self.inherited(ids,current_before,geometry)
complete=shapely.union_all([inherited]+[geometry(f) for f in features])
for i in ids:self.footprints.pop(i,None)
for f in features:
# A split transfers only the local footprint to each child. Its
# preservation was checked jointly before the transaction committed.
self.footprints[f['id']]=complete.intersection(geometry(f).buffer(POLICY['max_join_gap_m']))