One shared altConfigs selection, failing loudly on an empty selection - #4
Merged
Merged
Conversation
…ling loudly on an empty selection
This was referenced Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
altConfigs selection was implemented twice and about to be implemented a third time.
ci-buildusedSelect-AltConfigs.ps1,resolve-dependenciescarried its own inline copy, and a draft forci-versioningadded a third that filtered entries on theirorg/reposegments againstgithub.repository.That third filter is why this is a refactor and not a tidy-up. It selects nothing on any fork, because
github.repositoryis the fork's path whilealtConfigs.txtnames the upstream. Observed on a sandbox run: the step executed, found the file, selected zero configurations, printed nothing and reported success. It would also select nothing onRevit_ModelQA_Tool, whose file names a different repository on all ten lines. The shared implementation ignoresorg/repodeliberately, which is correct for both cases and is now the only implementation.Changes:
Select-AltConfigs.ps1andBuild-AltConfigs.ps1move to.github/scripts/, alongside the Pester tests that already live thereci-buildandresolve-dependenciesconsume them; the inline parse inBuild-Dependencies.ps1is deletedci-versioninggains an alt-config build using the same script, which closes a measured gap:resolve-dependenciesalready builds every dependency'sRelease*configurations, but nothing builds the caller's own. On sandboxRevit_Toolkit, 0 year-suffixed assemblies after dependencies and 2 after itsRelease-only build, against 10 lines in itsaltConfigs.txt. Cost measured over three runs onwindows-2025-vs2026: 76s against a 47s baseline, 1.6x, because the first configuration carries the warm-up and each further one takes 4 to 8 seconds.The new assertion is the point of the change. A non-empty
altConfigs.txtthat selects nothing now fails with the entries it saw, instead of exiting 0 in silence. The absence of a signal was the damage; the filter was only how the silence arose.Failing is safe because the alternative shape does not exist. Across the fleet, 14 repositories carry
altConfigs.txtand every one is exactly 10 lines, 5Releaseand 5Debug. None isDebug-only. A test records that aDebug-only file would fail, so the choice is visible rather than accidental.Six new Pester tests, 22 in the file. Three mutations, each caught by the intended test: always-silent, which is the old behaviour, plus dropping either guard.
Cross-action script references use
$GITHUB_ACTION_PATH/../../scripts, the same derivationprepare-runneralready uses to find the repository root. Confirmed against a real runner log that the action checkout carries the whole repository layout, so.github/scriptsis present.