Skip to content

Fix PR #3761 RC: tag PrettierOverrideOptions projection gate - #3780

Merged
briansrls merged 28 commits into
mainfrom
session/bold-gull-35-rc-fix
May 28, 2026
Merged

briansrls merged 28 commits into
mainfrom
session/bold-gull-35-rc-fix

Conversation

@briansrls

@briansrls briansrls commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session bold-gull-35.
Pushing to session/bold-gull-35-rc-fix advances this PR.

Worker attestation

  • Title describes the change.
  • PR body summarises what and why.
  • Tests run: cargo fmt --all --check passed locally; CI will run after ready.
  • If this closes a work item, the body contains a Closes #N directive. (Dashboard work item, no GitHub issue.)
  • No commits on this branch are surprises.
  • No secrets / credentials / large binaries staged.

Summary

Addresses cursor RC #18679 on PR #3761 by adding the missing consumer:config-patch-record-projection gate marker to PrettierOverrideOptions.

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.patch and src/v4/TASKS.md until record-field projection lands.

Test plan

  • cargo fmt --all --check passed locally.
  • CI and dashboard auto-reviews after marking ready.

briansrls and others added 28 commits May 26, 2026 18:44
…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 briansrls changed the title PR #3761 cursor RC fix: T-4.16 formatter ConfigPatch monoid + right-bias TestClaims — cursor RC #18679 on HEAD 0f2f896c22ab of branch session/cool-newt-327. Cursor approved prior SHA 69dd5d8e (ConfigPatch/black/clang_format/etc); RC fired on the prettier.dag structural refactor commit (PrettierForma Fix PR #3761 RC: tag PrettierOverrideOptions projection gate May 28, 2026
@briansrls
briansrls marked this pull request as ready for review May 28, 2026 01:31

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 19d9d122 · Trigger: schedule
  • Thinking: 379s wall

Non-blocking — Strengths

  • src/v4/std/patch.dag FieldPatch 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.

@briansrls
briansrls merged commit 576bf43 into main May 28, 2026
14 checks passed
@briansrls
briansrls deleted the session/bold-gull-35-rc-fix branch June 1, 2026 18:41
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.

1 participant