Repository navigation
fix(profiles): validate machine overrides before applying settings - #2619
Merged
nicobailon merged 2 commits intoOct 1, 2026
Merged
Conversation
Contributor
|
quifox
added a commit
to quifox/pi-subagents
that referenced
this pull request
Oct 1, 2026
nicobailon
force-pushed
the
fix/profile-machine-validation
branch
from
October 1, 2026 15:10
bb484d9 to
543cbb4
Compare
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.
Malformed machine values in saved profiles can be written into settings before agent discovery rejects them. Validate these values in the shared profile reader using the existing agent machine validator, so invalid profiles leave settings unchanged. Normalize valid strings; explicit false still clears a pin and an omitted field still preserves an existing string pin.
The shared reader also rejects malformed machine fields before check-profile probes models. Document both load and check behavior. Generated model-only profiles are unaffected, validation does not query the live machine catalog, and the reused helper stays internal to source modules.
Validation: profile, override and frontmatter unit tests passed (165 tests), covering unchanged settings bytes on invalid input, normalized pins, false clearing and omitted-field preservation. Typecheck and diff checks passed. A broader combined full-suite run had five failures also reproduced on the unchanged base (a permission-sensitive fixture and orphan-process teardown); it was not a clean full-suite pass. Windows was not tested locally.