Skip to content

Report non-blocking HVAC notes instead of falling back - #39

Merged
kflemin merged 1 commit into
l200-baseline-hvacfrom
d1-nonblocking-hvac-notes
Dec 5, 2026
Merged

kflemin merged 1 commit into
l200-baseline-hvacfrom
d1-nonblocking-hvac-notes

Conversation

@kflemin

@kflemin kflemin commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Background

On the L200 path, BaselineHvacPlanner rejected every selector result that was not a match. A file with an "Integrated with central air distribution" outdoor-air record, or a MechanicalVentilation record with VentilationType None or no type, fell back to create_typical_building_from_model HVAC even when its conditioning system mapped cleanly. The buildingsync-measures-gem mapping doc (HVAC_MAPPING_AND_MIGRATION.md, rows 88 and 89) says these records should not block. #37 fixed this only for records linked to its PTAC pair.

What this PR does

Selector (hvac_topology_selector.rb)

  • Result gains blocking (nil = blocking, false = note) and basis (:doc, :policy, :approximation). _check_result rejects combinations that make no sense, such as a non-blocking match or a note without a basis.
  • integrated outdoor air (any VentilationType except DOAS) is a non-blocking :doc note. An untyped integrated record is no longer missing_input.
  • None or untyped on conditioned deliveries is a non-blocking :doc note. Other MechanicalVentilation children are listed as "Not transferred". A record that links only unconditioned ventilation deliveries blocks, because it needs a conditioned delivery.
  • None on deliveries that are all explicitly unconditioned stays blocking, now with a message.
  • Unknown is read as untyped by policy (:policy). Other stays blocking.
  • ComStock recovery is a :policy match. With allow_approximations: false it is not_mappable.
  • Removes Add heating with terminal cooling mapping to L200 baseline #37's pair-only absorption; the rules above cover it, and every OtherHVACSystem gives its own result again.
  • A load-time check raises if a DELIVERY_RULES match row lacks :absent or :guards.

Planner, report, CLI

  • Plan#notes carries notes on topology and fallback plans. Plan#note_entries deduplicates them and marks matches on a fallback plan "(not applied)". :doc notes log at INFO; :policy and :approximation notes log at WARN.
  • hvac_mapping_report.json adds allow_approximations and notes.
  • New option --[no-]allow_approximations (default on). The README documents it and --require_l200.

Not in this PR (later fix-plan items): spot exhaust, air cleaners and exhaust-only as :policy notes; GSHP as :approximation.

How to test

bundle exec rspec spec/tests/unit
bundle exec boss write_baseline_osw spec/files/v2.7.0/Example_ASHRAE_L2_Report_l200_erv.xml -o tmp/out-on
bundle exec boss write_baseline_osw spec/files/v2.7.0/Example_ASHRAE_L2_Report_l200_erv.xml -o tmp/out-off --no-allow_approximations

🤖 Generated with Claude Code

Integrated outdoor-air records and MechanicalVentilation records with
VentilationType None or no type sent otherwise good L200 files to the
create_typical fallback, although the buildingsync-measures-gem mapping
doc (rows 88 and 89) says they should not block the conditioning match.

Selector results now carry two new fields. `blocking` is nil for a
blocking result and false for a note; `basis` is :doc, :policy or
:approximation. _check_result enforces the combinations that make sense.

- Row 88: integrated outdoor air, for any VentilationType except DOAS,
  is a non-blocking :doc note. Links, if any, must resolve.
- Row 89: None or untyped on conditioned deliveries is a non-blocking :doc
  note, and every MechanicalVentilation child is read as an annotation.
  Several such records may share a conditioned delivery. A record that
  links only unconditioned ventilation deliveries blocks.
- Row 87: None on deliveries that are all explicitly unconditioned stays
  blocking, now with a real message.
- Unknown is read as untyped by policy (:policy); Other stays blocking.
- ComStock recovery (row 83) is a :policy match.
- #37's pair-only absorption is replaced by these general rules, so every
  OtherHVACSystem gives its own result again.

The planner keeps notes in a new Plan#notes on both topology and fallback
plans. Plan#note_entries deduplicates them, marks matches on a fallback
"(not applied)", and logs :doc at INFO and :policy/:approximation at WARN.
hvac_mapping_report.json gains `allow_approximations` and `notes`.

New CLI option --[no-]allow_approximations (default on).
--no-allow_approximations keeps the mapping doc's blocking rules: ComStock
recovery becomes not_mappable and Unknown blocks.

No fixture changes plan status. About ten Audit Template and ASHRAE files
move their None/untyped records from fallback reasons to notes; they still
fall back for other reasons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kflemin kflemin changed the title Report non-blocking HVAC notes instead of falling back (D1, item 2) Report non-blocking HVAC notes instead of falling back Dec 4, 2026
@kflemin
kflemin merged commit b0304c7 into l200-baseline-hvac Dec 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant