Qualified marking refinements
=============================
This directory contains offline, Worker-executed refinements of an existing
Gaussian-derived infrastructure map. They are not the installed Analyze job
provider. Qualified output documents can be published through the existing
Mission Core urban-map API; publication is separate from automatic job-chain
integration. Do not describe one as the other.
Whole-arrow admission
---------------------
``arrow_admission_bundle.json`` describes the frozen dependency closure for
``paved-whole-arrow-admission-v7``. ``refine_arrow_admission.py`` consumes a
baseline map, cached semantic arrow proposals, their source image/mask manifests,
Gaussian orthographic views, semantic ground fields and optional previously
computed registration candidates. All decisions are recomputed against the
input pixels. It does not read a point cloud, collider, location-specific
coordinates or manually drawn region.
The pass treats a pre-existing linear stem as a fragment, not as proof that the
whole arrow was already recognized. The existing strict conflict policy must
still approve every consumed fragment; an intersecting independent lane line
cannot be removed. Existing complete symbols remain protected.
Arrow context is observed paved ground. The bicycle-specific requirement for
nearby parallel strips is not mandatory for arrows. Independent semantic extent
limits optimization targets so connected asphalt texture cannot dominate the
fit. That extent only seeds the final connectivity check: paint continuing
beyond the semantic mask remains visible to the completeness checks. Raw paint
connectivity is intentionally not opened morphologically in v7, because coarse
opening erased real thin continuations in the examined inputs. This conservative
choice can also reject useful candidates connected to texture.
This admission stage produces a deformable catalogue fit, not a traced paint
contour. It is a candidate initializer: its independently adjustable head and
branch parameters do not preserve a dimensioned marking's proportions. Apply
the fixed-proportion refinement below before treating a result as an immutable
1.18 preset.
Registration checks overlap, boundary residuals and both XY coordinates of the
head/tail ends. The local optional tip refinement uses bounded SciPy Powell
optimization of the same preset parameters. ``paved_registration.py`` is mounted
as ``registration.py`` only in this bundle; the inherited joint-pass module is
unchanged. Homography-transformed geometry and all evidence probes share the
same exact coordinate transform. Exterior probes count endpoint-connected paint,
not an unrelated nearby stripe. Source view support, semantic identity, complete
head/tail evidence and Gaussian-derived heights remain required.
Qualification and publication
-----------------------------
Run on the pinned Worker image in bounded, reservation-owned containers. The
qualification records source hashes, immutable inputs, per-stage execution and
cleanup receipts. Admission requires all of:
* ``test_arrow_admission.py``: fragment ownership, crossing-line protection,
offset/wrong-end rejection, continuation outside the semantic mask, and exact
projective frame consistency.
* ``audit_arrow_admission.py``: exact transaction replay, catalogue geometry,
unchanged non-marking layers and finite Gaussian-derived coordinates.
* ``audit_arrow_sources.py``: provenance back to original cached fits, image
manifests and semantic masks.
* ``verify_arrow_observations.py``: independent pixel and height remeasurement of
every admitted object using the recorded parameters and transforms.
* Visual review of every new transaction on the raw Gaussian render, followed
by publication preflight and exact API readback. Numeric acceptance alone is
insufficient; intermediate numerically accepted partial-head fits were rejected.
``scripts/publish_qualified_urban_maps.py`` preserves the previous documents and
refuses unrelated live changes between planning and apply. Private evidence and
the publication manifest belong under ``.runtime/simulation-qualifications``;
images belong under ``outputs``. Their private IDs and coordinates are not rules.
Scope of the 2026-10-15 qualification
-----------------------------------
The final identical-policy eight-scene pass examined 149 deduplicated arrow
hypotheses and admitted one additional complete turn arrow. All five synthetic
checks, eight transaction audits, eight source audits and eight observation
audits passed. Existing features were preserved. Source inspection found no
location-name overrides or manual regions in this increment. This is a bounded
regression qualification, not proof of recall on arbitrary roads, metric survey
accuracy, marking-standard compliance or autonomous driving authority.
``audit_zigzag_coverage.py`` measures individual cached zigzag legs against
existing zigzag objects. It reports missing candidate legs without adding them;
candidate overlap is not independent ground-truth recall. The current audit
identified four potentially uncovered legs requiring image and identity review.
No new bicycle or zigzag objects were published by the arrow pass.
Fixed-proportion 1.18 arrows
---------------------------
``fixed_arrow_bundle.json`` records the source closure for
``fixed-118-similarity-v4``. ``standard_arrow_templates.py`` constructs five
immutable profiles (straight, left, right, straight-left, straight-right), each
with the two size variants from GOST R 51256-2018 figure B.5/table B.1. Source:
https://www.mos.ru/upload/documents/files/1106/GOSTR51256-2018TehnicheskiesredstvaorganizaciidorojnogodvijeniyaR_.pdf
The selected variant does not establish a speed limit or regulatory compliance.
``refine_standard_arrows.py`` examines every existing eligible arrow with the
same rules. It selects a profile and optimizes exactly four parameters: two
translations, rotation and uniform scale. Head width, neck angle, stem width,
branch station and all vertex proportions are fixed. There is no affine shear,
homography or independent vertex fitting in this stage. Existing geometry only
initializes a bounded search; independent semantic evidence still supplies the
symbol identity and target extent.
``fit_standard_arrows.py`` uses SciPy differential evolution followed by Powell
refinement. The objective combines paint overlap with every immutable corner's
distance to the observed paint edge. Overlap alone can leave a narrow tip
misplaced. Corner measurements use the original paint, not an edge created by
clipping a semantic mask. Whole-symbol connectivity, source-view coverage,
head/tail support, foreign-marking protection and Gaussian-derived height checks
remain mandatory. Unsuccessful fits retain the previous feature unchanged.
``test_standard_arrows.py`` checks profile dimensions, mirror symmetry,
similarity invariance, malformed scale, extraneous paint, semantic clipping and
recovery of a translated/rotated synthetic arrow. ``verify_standard_arrows.py``
reconstructs each exact preset from recorded parameters, remeasures original
pixels and heights, and replays every transaction. In the eight-scene run on
2026-10-15, 25 of 30 eligible arrows were replaced and individually inspected:
13 Maroseyka, 8 Pokrovka, and one each on both Mira scenes, Sadovaya-Triumfalnaya
and Sretenka. Five failed placement evidence and remain unchanged. The separate
1.19 merge arrow is outside this preset conversion. All eight published maps
passed exact canonical API readback. This does not expand candidate recall or
integrate this stage into the installed Analyze job.
Observed zigzag endpoint extension
----------------------------------
``zigzag_extension_bundle.json`` freezes ``observed-periodic-zigzag-end-v1``.
``refine_zigzag_extensions.py`` examines all existing clean zigzag patterns,
derives their alternating two-leg period, and proposes at most one complete
additional leg at each end. A proposal needs at least five existing legs,
consistent phase, original yellow paint support in two Gaussian source views,
known surface, low unexplained paint and no foreign-marking conflict. Existing
vertices and width are preserved. Unknown paint is not synthesized from period
alone. ``verify_zigzag_extensions.py`` repeats geometry, pixels, height and
transaction checks independently from serialized acceptance flags.
The eight-scene run examined 16 endpoints and extended one pattern on Sretenka.
The added leg was visually reviewed and published with exact API readback.
Three other cached candidate legs were a false zigzag over ordinary linework;
they were not added. A visibly shorter terminal return remains outside the
full-period extension rule. ``audit_completed_zigzags.py`` evaluates the output
map, whereas the earlier coverage auditor evaluates its baseline. Neither is
ground-truth recall: the cached proposals omit that terminal return.
Next implementation boundaries
------------------------------
Handle shortened terminal zigzag returns using observed endpoints without
inventing a full period. Resolve the five rejected fixed-preset fits and add
dimensioned 1.19 presets while keeping immutable proportions.
Expand arrow candidate recall beyond the existing semantic cache while retaining
the complete-symbol and frame checks. False positive removal needs positive
counter-evidence, not merely missing paint in a blurred Gaussian view. Package
the complete qualified stage chain into the normal Analyze lifecycle separately,
including cancellation, resource ownership and reproducible fresh-input runs.