Skip to content

Use generated JSON contracts for storage, IPC, bridge and CLI output - #63

Merged
Anheledir merged 2 commits into
mainfrom
feature/generated-json-contracts
Oct 26, 2026
Merged

Anheledir merged 2 commits into
mainfrom
feature/generated-json-contracts

Conversation

@Anheledir

@Anheledir Anheledir commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Application JSON serialization used reflection across protected links, settings/profiles, package/helper records, host IPC, bridge delivery and anonymous CLI responses. Replace those calls with explicit contracts and generated JsonTypeInfo metadata, and disable the CLI's reflection JSON fallback. Unknown contracts fail explicitly; token-bearing PhoneLink is not a public output contract.

Preserve existing field names/order/nulls/defaults, numeric file/IPC enums, named CLI enums and case-insensitive package records. Copy caller options before binding a context so Core and CLI can share installation options without breaking uninstall/helper serialization. The bridge retains the same silent APNS envelope/event ID.

Add compatibility fixtures and a native before/after JSON workflow covering 22 public command/error responses plus baseline filesystem-effect comparison. Update deployment experiments to keep reflection fallback disabled. Local validation: 146 .NET tests, ten tooling tests, public JSON baseline comparison, CLI/TTY/animation/provider/offline resources and install/PATH/uninstall/update/rollback smoke pass. The smaller ReadyToRun candidate also passes all seven local smokes with reflection disabled.

Strict trimmed publishing now reaches only Spectre.Console.Cli IL2104; our JSON IL2026/IL3050 sites are removed. Native AOT's remaining IL3050 diagnostics identify the Spectre CommandApp constructor. #61 owns that remaining dependency/command metadata work; smaller release modes remain gated by #26.

Closes #60. Supports #49 and the reusable library #27/#28. Final native Windows/Linux/macOS CI, deployment experiments, startup benchmarks and all 22 JSON comparisons pass. The smaller diagnostic ReadyToRun candidate passes lifecycle/native-vault smoke on all three platforms; strict analysis consistently reports only Spectre IL2104. AOT likewise has no application JSON diagnostics; its remaining IL3050 sites are the Spectre constructor.

@Anheledir
Anheledir merged commit fe00c36 into main Oct 26, 2026
20 checks passed
@Anheledir
Anheledir deleted the feature/generated-json-contracts branch October 26, 2026 13:17
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.

Replace reflection-based JSON with typed contracts and source generation

1 participant