Skip to content

fix(generate): track canonical directory identities - #2262

Closed
samchon wants to merge 1 commit into
masterfrom
fix/generate-junction-identity
Closed

fix(generate): track canonical directory identities#2262
samchon wants to merge 1 commit into
masterfrom
fix/generate-junction-identity

Conversation

@samchon

@samchon samchon commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Fixes #2082

Follow-up to the merged #2093 implementation. On Windows, a junction can expose the same physical directory with a different stat.dev, so the former inode-only traversal key accepted a parent junction cycle and emitted output. This candidate records both the inode identity and canonical realpath, and uses UTF-8 byte ordering for deterministic alias diagnostics.

Verification completed locally before this claim:

  • Filesystem suite: 9 passed; source-file symlink case skipped only because Windows Developer Mode is unavailable.
  • Parent/self/mutual junctions, external links, physical output aliases, and ordinary nested directories covered.
  • Removing canonical identity makes the parent-cycle regression fail; restoring locale comparison makes the byte-order alias regression fail.

Campaign gate: this draft is not merge-ready until its current-base prospective gate and the exact merged-SHA gate both pass under the frozen manifest. Actions for this exact branch SHA are cancelled and recorded under the campaign policy.

@samchon

samchon commented Jul 20, 2026

Copy link
Copy Markdown
Owner Author

#2262 self-review round 1

Candidate: aab192adc6ae42d045bdc6bc3e20d1394232b528 against origin/master 5320b230ffec1c12e58b87dfadb0826dc1ea8b09.

Review plan before acting: inspect the complete source and regression diff, then trace directory identity handling through ordinary directories, symlinks and Windows junctions, output exclusion, link diagnostics, file identity, and deterministic entry ordering. Reproduce the mutation-sensitive checks already recorded without changing the candidate. Any sound finding will be remediated in a new committed snapshot and invalidates the ongoing prospective gate; no finding permits the same candidate to proceed to its frozen 15-command gate.

@samchon

samchon commented Jul 20, 2026

Copy link
Copy Markdown
Owner Author

#2262 self-review round 1

Candidate: aab192adc6ae42d045bdc6bc3e20d1394232b528 against origin/master 5320b230ffec1c12e58b87dfadb0826dc1ea8b09.

Review plan before acting: inspect the complete source and regression diff, then trace directory identity handling through ordinary directories, symlinks and Windows junctions, output exclusion, link diagnostics, file identity, and deterministic entry ordering. Reproduce the mutation-sensitive checks already recorded without changing the candidate. Any sound finding will be remediated in a new committed snapshot and invalidates the ongoing prospective gate; no finding permits the same candidate to proceed to its frozen 15-command gate.

Result: PASS. The whole two-file diff is clean under git diff --check. gather() has one caller and initializes its directory identity set once per traversal. Directories now retain both the existing dev:ino key and canonical realpath key; zero-inode platforms retain the old canonical-path behavior. This detects a junction revisit even when Windows reports a different device while preserving the distinct symlink diagnostic and ordinary repeated-directory termination. File deduplication, physical containment, and output exclusion remain on their previous paths. Buffer.compare(Buffer.from(x.name), Buffer.from(y.name)) supplies a deterministic byte ordering after the existing link ordering without changing lexical paths. The filesystem suite contains the parent, self, mutual, external, output, and repeated-alias cases; the ongoing canonical manifest has already reached the relevant changed suite successfully. No remediation is needed. The frozen prospective and later exact-merged gates remain mandatory.

@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
@samchon
samchon deleted the fix/generate-junction-identity branch July 28, 2026 06:39
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.

typia generate follows directory symlinks without physical traversal guards

1 participant