facett de-duplication campaign — record
Class:
history. The running record of theduplication-audit(clusters A–L) consolidation: what was folded to a single home, and — just as important — what was left deliberately because a merge would ADD code, change output, or carry real regression risk for no true-dup gain. Descriptive "how the shared home works" lives in the relevant*-design.md; this file is the ledger + the honest "why not" for the clusters left standing.
The audit (duplication-audit-2026-07-28) ranked twelve true-dup clusters A–L across facett's ~70 crates. Consolidation ran in passes; a later adversarial verifier confirmed the work was real but that cluster J had two byte-identical survivors and that A/D/E/G/H/I were still open. This is the settled state.
FOLDED TO ONE HOME (true dups, done)
- B — warm-red / amber literal (~24×) →
facett_core::look::{RED, AMBER}(look/color.rs).facett_stat::Verdict::colorre-exports them, so there is one warm-red in the workspace. No224,90,90/224,72,72Color32literal remains outside core (thefacett-demowidget-gallery[224,90,90,255]is a raw palette swatch array being displayed, not a use of the colour). Done ineb28853. - F —
lerp_color(4×) +heat_color(2×) →facett_core::look::{lerp_color, heat_color}. Done ineb28853. - C — terrain DEM (~340 LOC map3d ↔ flight) → lives once in
facett-map3d; flightpub uses it. Done in1cd703f. - J — serial FR step + box-fit →
facett_core::barnes_hut::{fr_step_serial, normalize_box}(4fcf438), plus the two survivors the verifier found (197aab5): the PRIMARY 3-Dfacett-graph3d Layout3D::Forceinline loop now delegatesfr_step::<3>/fr_step_serial::<3>(temp 0.04), andfacett-graphview::gpu_layout::normalize_boxdeletes its byte-identical local copy for core's. Seeforce-layout-twolane-design.md§f2b (incl. the coincident-node behavior note — left as-is, documented there). - L — Sutherland–Hodgman rect clip →
facett_core::render::cpu::scissor(9c302b4). - G — status chip (RichText form) →
facett_core::look::chip.facett-deploykeyandfacett-buildthing::deckhad byte-identical localfn chip; both now delegate (7c68d57). - I — map fill-way paint recipe (4×) →
facett_map::tessellate::paint_filled_way(takes already-projected ring + holes;fill: OptionsoMapFacetstrokes unfilled polygons;outline_holesflag).facett-mapMapView+MapFacetandfacett-geomapGeoMap+osm2ddelegate; each keeps its own genuinely-different projection preamble (f32to_px/ f64cam.to_px+ S-H clip / tilt-fade). Byte-exact: therabbit_2d/real_map_2d/basemapPNG goldens are unchanged (7c68d57).
LEFT DELIBERATELY (would add code / change output / real regression risk)
-
A — camera / pan-zoom (~10 copies). The single biggest structural item, and the one deliberately deferred.
facett-corealready carries the intended homes: the 2-Dnav::Navigableand the 3-Drender::camera::Camera/V3/Projected/view_proj, which is reproduced bit-for-bit fromfacett-map3d's and already goldened for equivalence by thecamera_seamtest (2-D and 3-D). So the seam exists and is proven; what remains is a typed migration, not a byte-safe swap:- The 3-D finish would replace
facett-map3d::camera's ownV3/Projected/view_proj(map3d addsview_proj_mirroredwater + the flight floating-origin camera on top) with core's types, rippling through map3d andfacett-map3d-flight(which re-exports map3d) and their 3-D render goldens. - The 2-D finish would move
graphpan/graphview/map's cameras ontoNavigable, but those copies have diverged by coordinate space and feature (map carriesbearing_deg+tilt_degin f64; the graph cameras are f32 pan/zoom with aclamp(0.25,4.0)), so a single adopter is a behavioral rewrite across panes that all carry snapshot goldens. Verdict: DEFERRED — the duplication is intentional-and-goldened; completing it is a multi-crate typed/behavioral migration whose risk is not justified by dedup alone.
- The 3-D finish would replace
-
D — graphpan ≈ graphview (whole-component). The
GraphNode/GraphEdge/GraphModeldup is real, but this is a crate merge:facett-graphpanis a distinctFacet(GraphPanView) depended on byfacett-graphnav,facett-buildthing,facett-demo,facett-streamlitand the umbrella;graphviewis the "consolidated engine". Folding one into the other migrates 4+ dependents and reconciles two panes' goldens. Verdict: DEFERRED — pane merge, wide blast radius; not a byte-safe dedup. -
E — facett-plot ⊂ facett-plotters.
ChartKind+Seriesare duplicated and plotters is a superset — butfacett-plothas a real external consumer (facett-warehousedeck) and the twoChartKindenums differ (plot: Line/Bars; plotters: Line/Bar/Scatter/…). Merging is a crate merge that retypes warehousedeck. Verdict: DEFERRED — pane/crate merge with a live consumer; not byte-safe. -
H — tiny format helpers. JUSTIFIED SPECIALIZATION, not forced:
human_bytes/human_size(binview/pipeline/plandag/file) share the ÷1024 loop skeleton but each emits a deliberately different string —"1.5 MB"vs IEC"1.5 MiB"vs terse"1.5M"vs a 4-unit cap. One shared fn preserving every contract needs a units+separator parameter at every call site = added surface; one shared fn with a single convention changes displayed text in 3 of 4 crates.crate_color(binview vs coderoom-view) share the FNV-1a hue hash but differ in both the Oklch L/C tuning (0.68/0.14 vs 0.62/0.13) and the return type (Color32vs coderoom's ownColor); merging changes rendered colour (breaks the coderoomhex()robot golden) or needs a parameterised wrapper each site keeps.fmt_dur(cicd, seconds) vsfmt_elapsed(jobview, ms + status-aware) are different signatures/inputs sharing only a ~1-line"{}m {:02}s"tail. Verdict: JUSTIFIED — the skeletons rhyme but the contracts diverge; the workspace already centralises the real primitives (hash_color,look::lerp_color).
-
K — gantt vs timeline time-axis. Left at audit time (partial dup; a shared
TimeAxisadopter would ADD an abstraction the two visuals don't otherwise share).
Justified splits confirmed NOT dups
Per the audit's "looks-duplicated-but-correct" list: the impl_facet_via_elm! ELM architecture (49 crates, not copy-paste), geomap/osm as well-behaved facett-map consumers, the map3d ↔ map3d-flight layered split (only the terrain DEM, cluster C, was a real copy), the style.rs/WKB/tessellation single owners, and the barnes-hut + graphcloud + cpu-painter core homes.