Repository navigation
[heft] Validate plugin parameters before cleaning or watching - #6202
Open
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 2 commits into
Open
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 2 commits into
Yashwanth Reddy Verupaka (yashwanth195) wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
Summary
Allow Heft plugins to declare parameters incompatible with cleaning or watch mode. Reject those combinations before lifecycle hooks, plugin application, output deletion, or watch startup.
Details
allowWithCleanandallowInWatchModemetadata to all seven plugin parameter kinds.0and empty strings.truemetadata preserves existing behavior, as does the standalonecleancommand. Validation runs once before action startup.This is a standalone change based directly on
main. It contains no plugin-selection or sharding changes and requires no other PR. The build produced no public API report changes.The CI follow-up also replaces a timing-dependent daemon test with the existing deferred-write integration-test pattern and a fake-timer unit regression. This checks write-completion ordering and idle-to-active tracking without relying on real-time deadlines or socket buffer sizes; daemon production code is unchanged.
How it was tested
Windows, Node.js 24.22.1, repository Rush 5.182.0. All checks used this branch's own build outputs.
node common\scripts\install-run-rush.js build --to @rushstack/heftapps\heft:node ..\..\common\scripts\install-run-rushx.js _phase:test --test-path-pattern Parameter --disable-code-coveragenode common\scripts\install-run-rush.js build --to @rushstack/rush-daemonlibraries\rush-daemon:node ..\..\common\scripts\install-run-rushx.js _phase:test --find-related-tests lib-commonjs\test\ConnectingClientTracker.test.js --find-related-tests lib-commonjs\test\DaemonRequestWirePhased.test.js --disable-code-coveragenode common\scripts\install-run-rush.js prettiernode common\scripts\install-run-rush.js change --verify --target-branch upstream/maingit diff --cached --checkandgit diff --checkThe 68 parameter-manager tests cover every parameter kind, schema validation, inactive values, independent clean/watch restrictions, defaults, aliases, and scoped collisions. The 10 CLI tests launch the built Heft executable and verify preserved output sentinels, absent lifecycle/task markers, and immediate watch rejection, plus successful normal cleaning and unrestricted execution.
For the daemon follow-up, all 10 tracker unit tests and 8 phased-request wire integration tests passed. The new cases assert the delayed send completes before the daemon refreshes activity, and use fake timers to verify the idle-to-active transition. Existing Heft validation was reused rather than rerunning unchanged suites.
Impacted documentation
The schema descriptions and TypeScript metadata documentation explain the opt-in behavior and effective-value rules. No
heft-plugin.jsoninit template exists in this repository. The CLI documentation can mention the preflight behavior: https://heft.rushstack.io/pages/intro/cli/