Skip to content

fix(compare): preserve functional union membership during equality routing#2255

Closed
samchon wants to merge 3 commits into
masterfrom
fix/compare-functional-membership
Closed

fix(compare): preserve functional union membership during equality routing#2255
samchon wants to merge 3 commits into
masterfrom
fix/compare-functional-membership

Conversation

@samchon

@samchon samchon commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Closes #2252.

This draft reserves the independently reproduced functional union-membership defect before implementation. Equality must use the same active-option member distinction as authoritative validation and plain routing; two distinct operands rejected by that membership must not acquire a fallback member and become equal. Existing same-reference and post-selection function-property comparison behavior remain explicit controls.

Implementation has not started. The batch will add direct/factory/nested real-transform regressions, both union orders, valid and rejected distinct-reference controls, enumerate every shared classifier caller, inspect emitted JavaScript, and mutation-prove the permanent oracle before prospective and exact-merge integration gates. The #2238 declaration-spelling residual is a cross-batch integration dependency, not a mechanism prescription.

Campaign constraints: no package version, tag, release, publication, or unrelated schema-interface change.

samchon added 3 commits July 20, 2026 16:57
Claim issue #2252 before implementation so one batch owns equality routing, emitted membership evidence, and its cross-axis regression matrix.

Constraint: Campaign pull requests cannot change versions, tags, releases, or publication state.

Rejected: Patch before claim | the campaign requires public ownership before product mutation.

Confidence: high

Scope-risk: moderate

Directive: Preserve the issue invariant while treating any proposed classifier change as a hypothesis until emitted and executed.

Tested: Independent validator/plain/equality reproduction and issue critic review passed on ce88a88.

Not-tested: Product implementation and integration gates are intentionally pending.
@samchon
samchon force-pushed the fix/compare-functional-membership branch from d8cc877 to bdd52cf Compare July 20, 2026 11:29
@samchon

samchon commented Jul 20, 2026

Copy link
Copy Markdown
Owner Author

Self-review opened

The reservation now has an implementation candidate at bdd52cf079d18b58a70ebdffd6bfba0685bcc80a.

Scope is limited to #2252: compare.equals must use the active functional option while routing object-union members, without changing post-selection function-property comparison behavior. The regression fixture covers direct/factory APIs, both declaration orders, nesting, cover, cross-member rejection, partial cover, extra keys, function identity, and declared equals delegation. No package, release, publication, or schema-interface change is in scope.

I will re-read the exact diff and transformed 52-case proof, including the canonical one-line Functional: false mutation. Independent verification has passed, but the prospective and exact-merged integration gates remain pending; this is not a completion or merge recommendation.

@samchon

samchon commented Jul 20, 2026

Copy link
Copy Markdown
Owner Author

Self-review complete

Reviewed bdd52cf079d18b58a70ebdffd6bfba0685bcc80a against the #2252 reservation invariant.

  • Scope remains limited to functional object-union membership in compare.equals plus its transform regression; no package, release, publication, or schema-interface change.
  • go -C packages/typia/native/cmd/ttsc-typia test -run '^TestCompareFunctionalUnionMembershipTransform$' -count=1 . passed with all 52 transformed Node runtime cases.
  • The fixture proves direct/factory is, equals, and cover, nested equality, both union orders, valid cross-member rejection, post-selection compatibility controls, and the default-mode boundary.
  • Canonical mutation evidence: changing only CompareEqualProgrammer.go's Functional: nativehelpers.OptionPredicator.Functional(...) to Functional: false makes the named second-function invalid equal-label direct/factory equality assertions fail with expected false, got true. The mutation worktree was restored cleanly.

Independent verification also passed. The pull request stays draft because #2257 must integrate first; prospective and exact-merged integration gates remain mandatory, so this self-review is not a merge recommendation.

@samchon

samchon commented Jul 20, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #2266.

The maintainer stopped all local building and testing after the machine ran out of resource headroom, and directed that the residual campaign pull requests be consolidated into one with verification delegated to GitHub Actions CI. This unit's net diff is carried into #2266 as its own squashed commit, so its issue keeps a separate acceptance boundary, rollback unit, and failure attribution inside the shared pull request.

Closing this one. The branch is left in place; nothing is deleted.

@samchon samchon closed this Jul 20, 2026
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.

fix(compare): preserve functional union membership during equality routing

1 participant