Repository navigation
fix(doctor): shape install records before reading paths - #397
Merged
Merged
Conversation
what changed: Install-state reads accept only objects, keep non-empty string paths and path arrays, and filter skill hashes with the installer's existing string-value rule. Doctor warns by filename when an existing record lacks a readable deployment path instead of passing ill-typed data to path functions. why: Parsed JSON was treated as a valid install record, allowing numbers, arrays and other values to crash doctor or be spread into future writes. Apply the same boundary typing already used for machine config. No alternative design was set aside. what it touched: machine/doctor libraries and tests, architecture, changelog and research-kit README inventory. Existing install-state field names and other metadata are preserved. what you verified: verified - red-first 89 passes and three expected failures; then 92 doctor/machine tests passed in 134.6 seconds. Covered non-object records, ill-typed and blank paths, mixed arrays/hash values, read-only preservation, named deploy warnings and the CLI's JSON output. Handoff OK, preflight PASS, doctor READY collector/firecrawl-cli in this checkout. The required full offline suite runs in the commit gate before acceptance. what you got wrong and fixed: nothing to report.
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.
Doctor passed untyped install-state JSON to path functions, crashing on values such as
kitHome: 42and accepting primitive records as installations. Install-state reads now shape existing fields, and doctor names an unreadable deployment record with a deploy warning and install remedy.Fixes #365
what changed: Require an object; filter path strings, path arrays and skill hashes using existing type rules. Added library and CLI regressions for malformed records and retained valid metadata.
why: Parsed JSON alone does not establish a valid path or install record. Apply the same type boundary used for machine config. No alternative design was set aside.
what it touched: machine/doctor libraries and tests, architecture, changelog and research-kit README inventory. No new record format.
what you verified: verified - red-first 89 passes and three expected failures; then 92 doctor/machine tests passed in 134.6 seconds, including parseable CLI JSON and named deploy warnings. Handoff OK, preflight PASS, doctor READY collector/firecrawl-cli in this checkout. The standard full offline commit gate accepted
1dae0ab39506986f1e4788c8e7009320529b4e56.what you got wrong and fixed: nothing to report.