Skip to content

Install buildingsync-measures-gem from GitHub; fail fast on missing measures - #38

Merged
JieXiong9119 merged 2 commits into
l200-baseline-hvacfrom
l200-hvac-measures-gem-from-github
Dec 3, 2026
Merged

JieXiong9119 merged 2 commits into
l200-baseline-hvacfrom
l200-hvac-measures-gem-from-github

Conversation

@kflemin

@kflemin kflemin commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

The L200 topology baseline needs the HVAC topology measures from
buildingsync-measures-gem. They were loaded from a local sibling checkout
(local_path ../../buildingsync-measures-gem), which BOSS only checked for
existence, and CI checked out a pinned commit next to BOSS.

Install the repo from GitHub with rake measures:install_external instead,
pinned to commit 6ee630f on the add-hvac_heating_with_terminal_cooling-measure
branch until the gem has a release. comstock is pinned too (a4ff2f9 on main),
so both external repos install the same code every time. It stays scenario_only, so fallback baselines don't
reference it.

  • config/external_measure_repos.yml: url/ref entry; comment shows how to
    switch back to local_path for local development
  • ci.yml: drop the sibling checkout steps and BSYNC_MEASURES_REF; the
    integration job already runs measures:install_external
  • README and L200 flowcharts: describe the GitHub install
  • Manifest comments: prefer a release tag or a full commit SHA over a branch;
    short SHAs are rejected because git fetch origin <ref> can't resolve them
  • Raise when writing an OSW if a repo it needs is not installed
    (resolved_measure_directories(require_installed: true)) or if a planned
    topology measure is not in measure_paths, instead of writing an OSW that
    fails at run time. rake measures:list_external still only warns.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

@kflemin
kflemin requested a review from JieXiong9119 December 2, 2026 04:14

@JieXiong9119 JieXiong9119 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review changes

1. Unit CI installs external measures

  • ci.yml: the unit job now runs bundle exec rake measures:install_external during setup.
  • Why: once the sibling checkout was removed, the binder contract test in hvac_target_binder_spec.rb started skipping silently, so mismatches between BOSS and the gem's measure arguments were no longer caught.
  • No cache step was added to the unit job. install_external re-checks out the pinned ref on every run, so a cache would only save time.

2. Out-of-date installs are detected

  • ExternalMeasureRepoManager#verify_pinned_commit runs when OSWs are written (require_installed: true).
  • If a repo's ref is a full 40-character SHA, it compares the installed HEAD in vendor/external_measures/<repo> with the pin. On a mismatch it stops with: "installed at X, but the manifest pins Y. Run bundle exec rake measures:install_external."
  • Why: after someone pulls a ref bump without reinstalling, the old checkout was used without any warning. The existing check only looks at whether measure folders exist, so changed arguments or behaviour went unnoticed.
  • Not checked: local_path repos, and tag or branch refs.

@JieXiong9119
JieXiong9119 merged commit 17afb25 into l200-baseline-hvac Dec 3, 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.

2 participants