Repository navigation
Fix PR #3761 RC: tag PrettierOverrideOptions projection gate - #3780
Merged
Merged
Conversation
…ch<T> monoid and *ConfigPatch types for all formatters
Implements ConfigPatch monoid for all 9 formatter files, dissolving the
feature:formatter-config-patch gate. Adds v4.std.patch { FieldPatch<T>,
apply_field_patch } (two-element Override/Inherit lattice per field) and
introduces *ConfigPatch record types + updated *_layer signatures for:
black, clang_format, google_java_format, ktfmt, lean4_format, prettier,
rustfmt, swift_format (gofmt trivially empty — no fields).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ch<T> Delete the 12 formatter-local patch coproducts (PrettierIntPatch, PrettierBoolPatch, and the ten enum-specific variants) and migrate PrettierOverrideOptions to FieldPatch<T> — eliminating the parallel authority that violated INVARIANTS.md P2/P5. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…9/P1) Grounds the declared monoid substrate against std/algebra: adds compose_field_patch<T> (right-biased semigroup op, later layer wins) and field_patch_monoid<T> -> Monoid<FieldPatch<T>> that assembles the Magma/Semigroup/Monoid chain. Identity is Inherit. Resolves the blocking inline review comment on PR #3705. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace coarse FieldPatch<PrettierFormattingOptions> with 23 per-field patches mirroring PrettierFormattingOptions, so a layer can express a single option override without full-record replacement. Update prettier_layer to thread apply_field_patch per field via base.options.* projection. Matches the per-field granularity of every other formatter ConfigPatch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t two-element lattice FieldPatch<T> is 1 + T: for non-singleton T, distinct Override values are distinct patches, so there is no single lattice top. Reframe the external authority comment as the right-biased optional-value patch monoid (Inherit = identity, Override = payload) — matching what the compose/monoid witness actually implements. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ice 10) Replace the local field_patch_bool_eq match-over-storage-shape with law witnesses expressed purely through apply_field_patch (canonical eliminator) and Bool == Bool equality — no new derived operation over the FieldPatch coproduct. Each monoid law is now proven by applying the composed patch to a concrete base and checking the Bool result. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… on same line as = Move multi-line data initializers onto one line; extract associativity witness into compose_assoc_lhs/rhs helper functions to keep line length reasonable. Parser requires expression to begin on the same line as the = token in a data declaration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add fp_monoid_op/fp_monoid_identity helpers that extract from field_patch_monoid<Bool>() and three new TestClaims that route through the Monoid witness surface rather than the raw helpers directly — so a bad wiring of .identity or .semigroup.magma.op inside the Monoid record would be detected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DAG parser treats `f<Bool>()` as a comparison expression, not a generic type application — `Bool` is undefined as a variable. Drop the explicit type arguments; inference resolves T=Bool from the declared return types of fp_monoid_op and fp_monoid_identity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion Codex BLOCKING on PR #3761: scalar FieldPatch<T> is sound but per-formatter *ConfigPatch types are hand-maintained mirrors of *Config. Add the owning feature gate in v4.std.patch (T-4.16 follow-on dissolve-on) and consumer tags on every formatter ConfigPatch until record-field projection lands. Co-authored-by: Cursor <cursoragent@cursor.com>
Claude REQUEST_CHANGES on #3761: drop misleading NixOS/Home Manager anchor (implementation is right-biased optional-value monoid, not commutative mkForce/mkDefault). Tighten feature gate wording and add T-4.16 TASKS.md owner row for interim *ConfigPatch hand mirrors. Co-authored-by: Cursor <cursoragent@cursor.com>
Codex REQUEST_CHANGES on #3705: TASKS.md still described superseded *_layer(base, outer) full-config replacement while formatter files now use *_layer(base, patch: *ConfigPatch) with v4.std.patch FieldPatch. Co-authored-by: Cursor <cursoragent@cursor.com>
Codex REQUEST_CHANGES #3761: stop flattening PrettierFormattingOptions fields into PrettierConfigPatch. Introduce PrettierFormattingOptionsPatch nested under options; overrides stays FieldPatch<List<...>> — matches PrettierConfig { options, overrides } for P2 / projection contract. Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
marked this pull request as ready for review
May 28, 2026 01:31
5 of 7 tasks
briansrls
commented
May 28, 2026
briansrls
left a comment
Contributor
Author
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
19d9d122· Trigger:schedule - Thinking:
379s wall
Non-blocking — Strengths
src/v4/std/patch.dagFieldPatch is classified, algebraically grounded as a right-biased 1 + T patch monoid, and the formatter record mirrors carry a named config-patch-record-projection dissolution gate.
✅ No blocking concerns.
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.
Auto-opened by session-dashboard for session
bold-gull-35.Pushing to
session/bold-gull-35-rc-fixadvances this PR.Worker attestation
cargo fmt --all --checkpassed locally; CI will run after ready.Closes #Ndirective. (Dashboard work item, no GitHub issue.)Summary
Addresses cursor RC #18679 on PR #3761 by adding the missing
consumer:config-patch-record-projectiongate marker toPrettierOverrideOptions.The underlying T-4.16 formatter ConfigPatch work already tags the other hand-maintained patch mirrors; this keeps the prettier override mirror aligned with
v4.std.patchandsrc/v4/TASKS.mduntil record-field projection lands.Test plan
cargo fmt --all --checkpassed locally.