Skip to content

fix(profiles): validate machine overrides before applying settings - #2619

Merged
nicobailon merged 2 commits into
nicobailon:mainfrom
quifox:fix/profile-machine-validation
Oct 1, 2026
Merged

nicobailon merged 2 commits into
nicobailon:mainfrom
quifox:fix/profile-machine-validation

Conversation

@quifox

@quifox quifox commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

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.

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds validation to machine placement settings in profiles.

No actionable regression was identified, but exact-head CI was not verified, so merge readiness remains unconfirmed.

Summary

The PR validates and normalizes saved-profile machine overrides before settings are written or models are probed. Changes since the previous review also make global mission listings project current metadata from mission records and add focused regression tests.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  P[Saved profile] --> V[Validate machine overrides]
  V -->|Invalid| E[Reject without writing settings or probing models]
  V -->|Valid| A[Load settings or check models]
  I[Global mission index] --> R[Read and validate mission record]
  R --> L[Project current fields into global list]
Loading

Reviews (3) · Last reviewed commit: "docs: credit contributor for #2619"

Comment thread CHANGELOG.md Resolved
quifox added a commit to quifox/pi-subagents that referenced this pull request Oct 1, 2026
@nicobailon
nicobailon force-pushed the fix/profile-machine-validation branch from bb484d9 to 543cbb4 Compare October 1, 2026 15:10
@nicobailon
nicobailon merged commit 8a577c2 into nicobailon:main Oct 1, 2026
12 of 13 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