Skip to content

Latest commit

 

History

History
172 lines (152 loc) · 27.1 KB

task.md

File metadata and controls

172 lines (152 loc) · 27.1 KB

Audit Fix Tasks — @kruschdev/pascal-plugin-surfaces (Neon Audit)

🔴 Bugs (must fix)

  • BUG-01: classifyRoomKind regex word-boundary truncation (\bbath\b, \bbed\b, \bhall\b miss "Bathroom", "Bedroom", "Hallway") — src/surfaces/tables.ts:479
  • BUG-02: createSurfacesMaterialPool passes explicit side: undefined to MeshStandardMaterial, triggering Three.js console warnings — src/cad/materials.ts:58
  • BUG-03: Drywall joint compound formula (factor: 1.8 / 61.7) over-estimates buckets 10x (BoardWise decimal bug 1.8 vs 0.16 lbs/sqft = ~385 sqft per 4.5-gal bucket at GA-214 Level 4) + dw-compound-allpurpose.coveragePerUnit mismatch (34 vs 385) — src/surfaces/catalog.ts:73, src/surfaces/recipes.ts:442
  • BUG-04: Custom customRecipeId binding on surface job nodes (wall-finish, floor-finish, roof-finish, counter-slab) now executes end-to-end in buildSurfacesSchedule — src/surfaces/schedule.ts, src/nodes/*.ts
  • BUG-05: extractBuildingSurfaceAnatomy adds fallback for standalone childless roof nodes and separates horizontal ridgeLf (ridge vent) from sloped hipLf (ridge cap) — src/surfaces/geometry.ts, src/surfaces/recipes.ts, src/surfaces/calculators.ts
  • BUG-06: planSurfacesAutoPopulate exterior wall interior-face room classification preserves leftRoomKind when rightRoomName is exterior — src/surfaces/autopopulate.ts:235
  • BUG-07: buildWallSurfaceCad, buildRoofSurfaceCad, and buildCounterSlabCad guarded with safeNum (Number.isFinite) against NaN/Infinity scene geometry — src/cad/surfaces-geometry.ts

🟠 Optimizations & Edge Cases (should fix)

  • OPT-08: siding:fiber-cement-lap kick-out flashing driven by wall-flashing-lf (roof-to-wall intersections only); stone veneer corner LF scaled by actual wall height — src/surfaces/recipes.ts, src/surfaces/schedule.ts
  • OPT-09: auditSceneSurfaces sums roof pipe boots across all roof planes and warns on low-slope flat membranes (tpo/epdm) placed on steep > 4:12 roofs — src/surfaces/audit.ts
  • OPT-10: SurfacesScheduleView Recipe tab merges custom recipes registered on surfaces:assembly.customRecipes — src/ui/schedule-view.tsx:36

🟢 Round 2 Neon Audit & /goal Milestones 1–5

  • BUG-N2-01: Fixed activeLevelId nullability (selectedLevelId ?? null) and sanitized draft rule IDs/factors in SurfacesScheduleView custom recipe builder — src/ui/schedule-view.tsx
  • BUG-N2-02: Guaranteed disjoint clockwise Shape.holes via resolveDisjointWallHoles so overlapping/touching door & window cutouts never corrupt Three.js Earcut triangulation — src/cad/surfaces-geometry.ts
  • BUG-N2-03: Split exterior siding base drip & stone veneer weep screed spans around doorway openings (computeBaseTrimSpans) — src/cad/surfaces-geometry.ts
  • BUG-N2-04: Added resetHiddenDomains() on useSurfacesUi and wired it into runAutoPopulate / clearSurfaces so Layer-Peel visibility toggles stay synchronized with scene nodes — src/ui/store.ts, src/ui/surfaces-panel.tsx
  • M1–M5 Deliverables: Punched 3D openings, 5 stepped cutaway presets, 45-model MIT CAD catalog + .glb exporter (45/45 verified), interactive 3D Cutaway Viewer & Recipe Builder/Sandbox UI, real-world multi-topology corpus tests (31/31 pass, 11,857 assertions), and full docs/ suite.

🔵 Round 3 /audit-fix Findings (Approved Backlog)

  • BUG-A1: Cap multi-story atticAreaSqft to roof footprint or max single-level conditioned floor area — src/surfaces/schedule.ts:645
  • BUG-A2: Handle standalone exterior jobDomain: 'sheathing' (no siding) and interior jobDomain: 'paint' (no new drywall) — src/surfaces/schedule.ts:248-390
  • BUG-A3: Disable Tyvek wrb + cap-nails in calcSheathingJob when wrbKind === 'grade-d-2layer' to stop stone-veneer WRB double-counting — src/surfaces/calculators.ts:382-385
  • BUG-A4: Evaluate bound customRecipeId on surfaces:counter-slab and surfaces:roof-finish nodes — src/surfaces/schedule.ts:507-637
  • BUG-A5: Expose & forward customRecipeId, recipeOverride, openings, wall tile props, and hostWallId geometry in MCP tools & operations — src/agent-tools.ts, src/agent-operations.ts
  • BUG-A6: Fix standalone flat & hip roof fallback geometry (eaveLf/rakeLf/ridgeLf/ridgeHipLf) — src/surfaces/schedule.ts:598-602
  • BUG-A7: Add CSV formula-injection sanitizer + MATERIAL MARKUP / SALES TAX reconciliation rows — src/surfaces/pricing.ts, src/surfaces/schedule.ts
  • BUG-A8: Render amber warning badge in SurfacesInspectorCard when warnings > 0, and pass bathroom metadata in placeQuickJob('wet-tile-shower') — src/ui/inspector-card.tsx, src/ui/surfaces-panel.tsx
  • BUG-A9: Wire includeWaterproofing and includeBackerBoard from surfaces:floor-finish into calcTilingJob — src/surfaces/calculators.ts, src/surfaces/schedule.ts

🟣 Round 4 Gemini 4 Carbon /audit-fix (15-Domain Expansion — 27/27 Resolved)

  • BUG-C1: Fixed 'pt-enamel-trim' -> 'pt-trim-enamel' typo in trim:interior-molding-package — src/surfaces/recipes.ts
  • BUG-C2: Added coverageOverride: 1 on sh-subfloor-adhesive in paneling:shiplap-wainscot & paneling:acoustic-wood-slat — src/surfaces/recipes.ts
  • BUG-C3: Patched cross-tees factor: 0.26 for act-drop-2x4 in calcCeilingJob (ASTM C635 / CISCA) — src/surfaces/calculators.ts
  • BUG-C4: Routed calcCeilingJob({ ceilingSystem: 'drywall-flat' }) to sag-resistant 5/8" ceiling gypsum board — src/surfaces/calculators.ts
  • BUG-C5: Guarded zero/negative/NaN metrics across resolveDriverValue, evaluateSurfaceJob, and fallback perimeterLf — src/surfaces/recipes.ts, src/surfaces/calculators.ts
  • BUG-C6: Changed Zod includeCeilingDrywall & includeSoffitFascia from .default(true) to .optional() so domain-aware fallbacks work — src/agent-tools.ts, src/agent-operations.ts
  • BUG-C7: Added 'ceiling' domain across SurfacesFloorFinishNode, agent-tools.ts, schedule.ts, floor-finish.ts, and surfaces-panel.tsx Quick Job
  • BUG-C8: Exposed jobDomain enum in both surfacesWallFinishParametrics and surfacesFloorFinishParametrics — src/nodes/parametrics.ts
  • BUG-C9: Added wallThicknessM, includePaint, sheathingKind, tileMaterial, panelingKind, plasterKind, trimPackage to surfacesWallFinishRenderDefinition.geometryKey — src/nodes/wall-finish.ts
  • BUG-C10: Added dedicated jobDomain: 'trim' 3D CAD geometry (door-split baseboard, crown, chair rail, opening casing) in buildWallSurfaceCad — src/cad/surfaces-geometry.ts
  • BUG-C11: Extracted isRoomFloor guard in schedule.ts so non-floor tileAreaKind values never clobber room floors or duplicate ceilings/trim
  • BUG-C12: Gated interior drywall/paint audit rules by domain, enforced SRF-IRC-R302-6-GARAGE-CEILING on disabled/non-drywall ceilings, gated ceiling sag/ACT checks on hasActiveCeiling, and linked includeSoffitFascia to SRF-IRC-R806-VENT-BALANCE — src/surfaces/audit.ts
  • BUG-C13: Deferred pool.metalFlashing() in buildRoofSurfaceCad to eliminate orphaned GPU material leaks on 'conical' and 'shed' roofs — src/cad/surfaces-geometry.ts
  • OPT-C1..C9 & CON-C1..C5: Distinct 2D floorplan strokes for all new domains; totalMoldingLf-scaled trim consumables & 'modern-minimal' SKU; gypsum veneer sealer disabled; complete decking:waterproof-membrane recipe; vented sf-vented-cedar & rake J-channel; beadboard-only chair rail, stainblock wallpaper sizing, black slat screws, wet-room paneling warning; X+Z horizontal cutaway stepping + depthWrite: false + dynamic SurfacesCutawayView camera + pointercancel/blur drag release; 'ceiling'/'trim' Layer-Peel pills + + Place sync; 7-panel render-surfaces-cutaway.ts; legible DOMAIN_COLORS.trim; 15-domain / 60-CAD copy parity; split pl-sealer-wax vs pl-sealer-poly-2k.

🟠 Round 5 /audit-fix Findings (Approved Backlog — v0.1.1 Hardening)

🔴 Bugs (must fix)

  • BUG-S1: Fix double-gamma darkening in buildProceduralMaps via c.getRGB(tmp, SRGBColorSpace) — src/cad/materials.ts:108-111
  • BUG-S2: Dispose procedural DataTexture (map/bumpMap) on Material 'dispose' event + in SurfacesCutawayView disposeGroup — src/cad/materials.ts:432-451, src/ui/assembly-cutaway-view.tsx:29-44
  • BUG-S3: Stop interior default colorHex: '#f1efe8' from hijacking exterior siding palettes; preserve per-kind roughness/metalness in sidingFor — src/nodes/wall-finish.ts:141,191, src/cad/materials.ts:492-530, src/agent-operations.ts:155, src/agent-tools.ts:175
  • BUG-S4: Emit local-space CAD geometry in buildSurfacesAssemblyGeometry (no double transform) and remove position/rotation from geometryKey in assembly.ts, counter-slab.ts, roof-finish.ts — src/nodes/assembly.ts:157-158,213-222, src/nodes/counter-slab.ts:160-172, src/nodes/roof-finish.ts:141-142
  • BUG-S5: Wire all Inspector/MCP toggles (includeIceShield, includeDripEdge, includeRidgeVent, sealed, hasSupportBrackets, includeVaporBarrier, includeWeepScreed, pool includeWaterproofing/tileMaterial/groutKind) through schedule.ts -> calculators.ts -> recipes.ts — src/surfaces/schedule.ts, src/surfaces/calculators.ts, src/surfaces/recipes.ts
  • BUG-S6: Make start/end/heightM/colorHex optional in surfaces_apply_wall_finish and position/roofType/widthM/depthM/pitchDeg optional in surfaces_apply_roof_finish (resolving hostRoofId from anatomy) — src/agent-tools.ts, src/agent-operations.ts
  • BUG-S7: Fix transitive fixed-point rectangle merging in resolveDisjointWallHoles — src/cad/surfaces-geometry.ts:87-108
  • BUG-S8: Guard elevationY and polygon coordinates with safeNum in buildFloorSurfaceCad — src/cad/surfaces-geometry.ts:345-458
  • BUG-S9: Audit jobDomain: 'tiling' on surfaces:wall-finish and prevent false-positive SRF-IRC-R302-6-GARAGE-CEILING when a compliant separate garage ceiling node exists — src/surfaces/audit.ts
  • BUG-S10: Preserve childless parentId: null roofs in geometry.ts (top level) and stop duplicating levelId: null walls/rooms/roofs across levels in autopopulate.ts — src/surfaces/geometry.ts:521, src/surfaces/autopopulate.ts:140-142

🟠 Optimizations & Edge Cases (should fix)

  • OPT-S1: Eliminate zero-area phantom BOM charges across all legacy calculators (drywall, insulation, siding, stone-veneer, flooring, tiling, tiling-pool) — src/surfaces/calculators.ts, src/surfaces/recipes.ts
  • OPT-S2: Derive openingAreaSqft, openingCount, and openingPerimeterLf from n.openings for standalone surfaces:wall-finish nodes without hostWallId — src/surfaces/schedule.ts:227-232
  • OPT-S3: Key floorByRoomName by roomId first (multi-story same-name rooms) and use STONE_SLAB_SQFT_PER_RAW_SLAB for custom counter recipes — src/surfaces/schedule.ts:521,717,976-999
  • OPT-S4: Fix surfaces_apply_floor_finish defaults (installMethod, substrateWood, includeCeilingDrywall) and surfaces_apply_wall_finish ZIP WRB auto-pairing — src/agent-operations.ts:158,210-228
  • OPT-S5: Reconcile formatSurfacesBomCsv Material USD column with TOTAL row when markup/tax > 0 — src/surfaces/pricing.ts:195-201
  • OPT-S6: Rotate 2D floorplans for counter-slab & roof-finish; split trim chair rail around openings; apply world-meter UVs on slab/cutaway boxes; eliminate pool coping corner Z-fighting — src/nodes/counter-slab.ts, src/nodes/roof-finish.ts, src/cad/surfaces-geometry.ts
  • OPT-S7: Catch refuse() errors in SurfacesHostPanel / SurfacesScheduleView click handlers and add amber warning badge parity in SurfacesHostPanel — src/ui/surfaces-panel.tsx, src/ui/schedule-view.tsx

🟡 Consistency (nice to fix)

  • CON-S1: Update stale "10 surface domains"/"10-domain" copy to 15; forward override on jobDomain: 'ceiling' drywall-flat; expose tileMaterial/tileAreaKind in surfacesWallFinishParametrics — src/surfaces/pricing.ts, src/agent-tools.ts, src/surfaces/schedule.ts:649, src/nodes/parametrics.ts
  • CON-S2: Assign plumbing vent pipeBoots to the primary roof plane on multi-wing buildings in planSurfacesAutoPopulate instead of multiplying by wing count — src/surfaces/autopopulate.ts:445

🟢 Carbon Phase 4 Clean-Pass Re-Audit Fixes (Pass 1 + Pass 2 — 11/11 Resolved)

  • R5-C1: Removed hardcoded colorHex: '#f1efe8' from surfacesWallFinishRenderDefinition.defaults() and normalized empty-string colorHex in wall-finish.ts / surfaces-geometry.ts
  • R5-C2: 3-colored filtered pool coping cycle (zero corner Z-fighting on odd polygons & skipped micro-segments) and split crown molding around full-height openings — src/cad/surfaces-geometry.ts
  • R5-C3: Unified wet-tile includeWaterproofing defaults across audit.ts, schedule.ts, agent-tools.ts, and agent-operations.ts (zero BOM/audit contradiction)
  • R5-C4: Indexed compliantGarageCeilingKeys by both roomId and roomName (audit.ts) and defaulted MCP garage ceilings to drywall-flat + fire-rated-type-x-5/8 (agent-operations.ts)
  • R5-C5: Resolved hostWallId/hostRoofId globally before resolveLevelId (including parent segmented roof.id fallback) so multi-story MCP calls inherit upper-level geometry & parent level — src/agent-operations.ts
  • R5-C6: Derived firstLevelId/topLevelId in autopopulate.ts from full anatomy.levelIds so single-level autopopulate never pulls building-level roofs onto Level 1
  • R5-C7: Level-scoped floorByLevelAndName + indexed dedicated jobDomain: 'ceiling' nodes for roomSchedule, removed 1-sqft clamp on degenerate standalone walls, forwarded override to companion ceiling paint, applied override.wastePct to custom counter/roof summary fields, and scaled faceCount on interior side === 'both' walls — src/surfaces/schedule.ts

🔴 Round 6 /audit-fix Findings (Approved Backlog)

🔴 Bugs (must fix)

  • BUG-R6-01: Gate exterior companion sheathing to cladding domains (siding/stone-veneer) and forward override on standalone jobDomain: 'sheathing' — src/surfaces/schedule.ts:280-388
  • BUG-R6-02: Make Zod paintType/ceilingSystem .optional() in agent-tools.ts so agent-operations.ts dynamic defaults work, and expose missing supported optional fields — src/agent-tools.ts, src/agent-operations.ts
  • BUG-R6-03: Fix Hip/Dutch/Mansard roof ridgeLf and hipLf when depthFt > widthFt using min/max side lengths — src/surfaces/geometry.ts:201-211, src/surfaces/schedule.ts:856-862
  • BUG-R6-04: Support top-level SurfaceAuditResult in SurfacesChatCard for surfaces_audit_code — src/ui/chat-card.tsx:14
  • BUG-R6-05: Use stable client row keys in SurfacesScheduleView custom recipe builder so rule ID input never drops focus — src/ui/schedule-view.tsx:346
  • BUG-R6-06: Derive effectiveClimateZone from scene surfaces:assembly across SurfacesHostPanel, SurfacesScheduleView, and SurfacesInspectorCard — src/ui/*.tsx
  • BUG-R6-07: Add sealer & gated grade-d-wrb to stone-veneer:brick-veneer without WRB double-counting on sidingKind: 'brick-veneer' — src/surfaces/recipes.ts:777-793, src/surfaces/calculators.ts:507-540, src/surfaces/schedule.ts:298-313
  • BUG-R6-08: Move poly-6mil vapor retarder from rim-joist closed-cell spray foam to exterior wall cavity batt insulation — src/surfaces/schedule.ts:990-1034, src/surfaces/calculators.ts:334, src/surfaces/recipes.ts:571-610
  • BUG-R6-09: Add 'thinset' mortar rule for natural-stone-floor and avoid double-billing baseboard when includeTrimPackage: true — src/surfaces/recipes.ts:851-860, src/surfaces/calculators.ts:680-692, src/surfaces/schedule.ts:652-670
  • BUG-R6-10: Resolve roomSchedule drywallSpec/paintSpec by actual wall jobDomain and includePaint flag — src/surfaces/schedule.ts:1061-1081

🟠 Optimizations / Edge Cases (should fix)

  • OPT-R6-01: Sanitize NaN/negative laborRateUsd, materialMarkupPct, and salesTaxPct in pricing.ts and recipes.ts
  • OPT-R6-02: Disable seam-tape in calcSheathingJob when !isZip && (wrbKind === 'none' || wrbKind === 'grade-d-2layer') — src/surfaces/calculators.ts:390-397
  • OPT-R6-03: Emit a single whole-building surfaces:assembly on targetLevels[0] during multi-level autopopulate — src/surfaces/autopopulate.ts:154-194
  • OPT-R6-04: Scale opening trim LF and openingCount by faceCount on interior side === 'both' drywall+paint walls — src/surfaces/schedule.ts:520-532
  • OPT-R6-05: Derive Layer-Peel domain hidden state from actual scene node visibility — src/ui/surfaces-panel.tsx:284-301
  • OPT-R6-06: Include quartzite-natural in SRF-NSI-SLAB-OVERHANG and skip SRF-IRC-R806-VENT-BALANCE on ridge-less flat/conical roofs — src/surfaces/audit.ts

🟡 Consistency (nice to fix)

  • CON-R6-01: Expose missing audit/schedule-relevant Inspector fields in src/nodes/parametrics.ts
  • CON-R6-02: Fix nonexistent SKU IDs in src/__tests__/audit-fix-round3.test.ts:93,105
  • CON-R6-03: Accurate countertop display labels in autopopulate.ts:398 and complete DRIVERS list in schedule-view.tsx:43-63
  • CON-R6-04: Sync stale counts/comments in README.md, docs/ARCHITECTURE.md, scripts/export-cad-catalog.ts, and src/surfaces/tables.ts

🟢 Round 6 Phase 4 Clean-Pass Re-Audit Fixes (10/10 Resolved)

  • R6-P4-01: Unified exterior effectiveWrb resolution in schedule.ts + includeGradeDPaper/includeGradeDWrb in calculators.ts (zero WRB double-count on default stone-veneer, respects wrbKind: 'none', bills Grade D once on siding/sheathing with grade-d-2layer)
  • R6-P4-02: Resolved substrateConcrete before defaultSubstrateWood in surfaces_apply_floor_finish (agent-operations.ts) so concrete floors no longer default substrateWood: true
  • R6-P4-03: Wired vaporBarrier: 'poly-6mil' for spray-foam-open-cell in calcInsulationJob (calculators.ts)
  • R6-P4-04: Wired underlaymentKind: 'high-temp-ice-water' on shingle roofs and 'synthetic'/'felt-*' on standing-seam metal roofs in calcRoofingJob (calculators.ts)
  • R6-P4-05: Added parentRuleId selector for 'parent-rule-qty' rules and exteriorBoxCount/overhangEdgeLf sandbox metrics in SurfacesScheduleView (src/ui/schedule-view.tsx)
  • R6-P4-06: Disabled 6-mil poly vapor-barrier on concrete-bonded floors (epoxy-garage-floor, polished-concrete, natural-stone-floor / thinset / coat) in calcFlooringJob
  • R6-P4-07: Aligned default includeRidgeVent to exclude ridge-less flat/shed/conical roofs (autopopulate.ts, agent-operations.ts) and added standalone conical roof fallback math (schedule.ts)
  • R6-P4-08: Guarded sequential per-level planSurfacesAutoPopulate against duplicating surviving surfaces:assembly nodes (autopopulate.ts)
  • R6-P4-09: Synced SurfacesHostPanel IECC Climate <select> with effectiveClimateZone and live surfaces:assembly updates (src/ui/surfaces-panel.tsx)
  • R6-P4-10: Preferred specialty wall finishes over repaint-only walls in roomSchedule (schedule.ts) and aligned hasSupportBrackets !== false default in audit.ts

🔴 Round 7 /audit-fix Findings (Approved Backlog)

🔴 Bugs (must fix)

  • BUG-R7-01: Merge basePatches and user.rulePatches per ruleId in mergeOverride — src/surfaces/calculators.ts:78-84
  • BUG-R7-02: Remove mismatched coverageOverride: DRYWALL_SHEET_SQFT[sheetSize] in calcDrywallJob so each resolved SKU uses its true coveragePerUnit — src/surfaces/calculators.ts:138-140
  • BUG-R7-03: Preserve explicit input.finish when isCeiling: true in calcPaintJob and use pt-ceiling-flat only for flat latex ceilings — src/surfaces/calculators.ts:193-231
  • BUG-R7-04: Fix calcRoofingJob Ice & Water Shield double-count on high-temp-ice-water, inject eave/valley ice-shield on metal roofs with synthetic/felt underlayment, and use 200 sqft/roll for felt-30 — src/surfaces/calculators.ts:927-953
  • BUG-R7-05: Coerce incompatible installMethod in calcFlooringJob (coat for epoxy/polished concrete, thinset for natural stone floor) — src/surfaces/calculators.ts:711-737
  • BUG-R7-06: Honor surfaces:assembly.includeAirSealing: false in buildSurfacesSchedule — src/surfaces/schedule.ts:1007-1024
  • BUG-R7-07: Recompute hosted roof/wall takeoffs when user edits pitchDeg/roofType or heightM — src/surfaces/schedule.ts:224-250, 840-886
  • BUG-R7-08: Handle exterior jobDomain: 'tiling' walls with calcTilingJob and prevent double-counted extraRules/tape collision on ceiling drywall-flat override — src/surfaces/schedule.ts:280-408, 706-724
  • BUG-R7-09: Audit exterior checks for side === 'both' walls (audit.ts:310) and treat exterior-domain side === 'both' walls consistently in agent-operations.ts
  • BUG-R7-10: Recompute laborUsd from laborHours * laborRateUsd in buildSurfacesBom when both options.schedule and options.laborRateUsd are provided — src/surfaces/pricing.ts:70-128
  • BUG-R7-11: Use belongsToLevel in level-scoped clearExisting so building-root nodes are preserved and nested descendants are cleaned — src/surfaces/autopopulate.ts:120-124
  • BUG-R7-12: Remove movable capability from wall-finish/floor-finish (no position field) and validate wall-finish tile* fields with Zod enums — src/nodes/wall-finish.ts, src/nodes/floor-finish.ts
  • BUG-R7-13: Eliminate coplanar WebGL Z-fighting on mitered-waterfall slab apron and trim casing intersections; clamp safeNum fallback to [min, max] — src/cad/surfaces-geometry.ts
  • BUG-R7-14: Add default: fallbacks to stoneSlabFor/flooringFor and fix fractional UV tiling seams in buildProceduralMaps via integer periods + texture.repeat — src/cad/materials.ts
  • BUG-R7-15: Fix Custom Recipe Builder duplicate IDs (mat_${seq}), cascade parentRuleId on rename/delete, allow typing fractional factor, and populate valleyLf/wallFlashingLf/roofPenetrationCount in Live Recipe Sandbox — src/ui/schedule-view.tsx
  • BUG-R7-16: Refuse immediately in resolveLevelId (requiring type === 'level') and on nonexistent hostWallId/hostRoofId — src/agent-operations.ts

🟠 Optimizations / Edge Cases (should fix)

  • OPT-R7-01: Key countWallCorners by levelId; use circular area for conical flatAreaSqft; fix standalone shed peakY & flat pitchDeg: 0; remove + 1e-12 in pointInPoly2D — src/surfaces/geometry.ts
  • OPT-R7-02: Honor override.wastePct in calcRoofingJob.squares & calcFlooringJob.effectiveWastePct (skip carpet patternMult); skip duplicate primer on primer-* types & use 300 sqft/gal for limewash-mineral — src/surfaces/calculators.ts
  • OPT-R7-03: Register customRecipeId floors in totalFloorSqft/roomSchedule; honor wrbKind & height/faceCount on interior stone-veneer; add Number.isFinite guards & scale custom wall recipe metrics by faceCount — src/surfaces/schedule.ts
  • OPT-R7-04: Gate adhered-veneer Grade D & weep-screed checks on adhered veneer kinds only; allow 4" clearance for sidingKind: 'brick-veneer'; check wet wall tile backer board — src/surfaces/audit.ts
  • OPT-R7-05: Remove unused visibleLayers/roofMaterial from surfaces:assembly geometryKey; add .min(3) to SurfacesFloorFinishNode.polygon — src/nodes/assembly.ts, src/nodes/floor-finish.ts
  • OPT-R7-06: Share skinGeo on side === 'both' walls; anchor ceiling slab to elevationY; .trim() colorHex in materials.ts — src/cad/surfaces-geometry.ts, src/cad/materials.ts
  • OPT-R7-07: Add paint/insulation/sheathing to PEEL_DOMAINS; level-scope sceneAssembly + visibility parity; add touchAction: 'none', userSelect: 'none' + e.preventDefault() to 3D cutaway — src/ui/*.tsx
  • OPT-R7-08: Constrain MaterialRuleInput numeric ranges and normalize/validate roomKind — src/agent-tools.ts, src/agent-operations.ts
  • OPT-R7-09: Scope roomSchedule name fallbacks to unparented nodes; pass studSpacing & roof-plane eave LF to attic insulation; use thicknessIn: 3.25 for wall closed-cell spray foam — src/surfaces/schedule.ts
  • OPT-R7-10: Align outdoorZones null-level fallback to firstLevelId and simplify redundant showerW ternary — src/surfaces/autopopulate.ts

🟡 Consistency (nice to fix)

  • CON-R7-01: Forward caller overrides in buildAssemblyCutawayCad + (scaled) legend; deduplicate ceiling-act-drop-2x2 vs cutaway in catalog.ts & align insulation-exterior-wall-stack — src/cad/surfaces-geometry.ts, src/cad/catalog.ts
  • CON-R7-02: Expose missing Inspector fields in parametrics.ts, wire includeWeepScreed into buildWallSurfaceCad, and align fallback defaults — src/nodes/parametrics.ts, src/nodes/wall-finish.ts, src/cad/surfaces-geometry.ts
  • CON-R7-03: Clarify surfaces_apply_floor_finish description + default tilePattern; use subscribed updateNodes in surfaces-panel.tsx; sync activeTab in SurfacesChatCard — src/agent-tools.ts, src/ui/surfaces-panel.tsx, src/ui/chat-card.tsx
  • CON-R7-04: Remove stale WeakMap-memoized comment and align fallback defaults in schedule.ts — src/surfaces/schedule.ts

🟢 Round 7 Phase 4 Carbon Clean-Pass Re-Audit Fixes (7/7 Resolved)

  • R7-P4-01: Kept ceiling registration, ceiling drywall/paint, and includeTrimPackage reachable when a room surfaces:floor-finish binds customRecipeId (schedule.ts)
  • R7-P4-02: Scaled wall domain === 'tiling' by faceCount and forwarded pattern, substrateWood, and includeBackerBoard (schedule.ts)
  • R7-P4-03: Guarded metal-roof ice-shield-eave/ice-shield-valley injection against duplicate custom rules and user disabled: true patches (calculators.ts)
  • R7-P4-04: Excluded pool-waterline from surfaces:wall-finish SRF-TCNA-TILE-BACKER matching surfaces:floor-finish (audit.ts)
  • R7-P4-05: Preserved unparented-room (!r.levelId) name fallback while blocking cross-level leaks on multi-story buildings (schedule.ts)
  • R7-P4-06: Resolved parentRuleId against exact prior rule index, allowed factor >= 0, and blocked saving dangling parent-rule-qty rules in SurfacesScheduleView (src/ui/schedule-view.tsx)
  • R7-P4-07: Guarded empty-string hostWall?.levelId/hostRoof?.levelId fallback in agent-operations.ts and simplified plankIdx = 0 in materials.ts