Repository navigation
Conversation
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.
Fixes #1495.
The CLI already refuses an output that is a program input by resolved path. A hard link has a different path but the same file identity, so JS emission truncated the original input and a subsequent run failed to parse it.
Compare existing output
(dev, ino)against all loaded Bend and foreign input identities, using bigint stats to avoid rounding file IDs. Build the identity set lazily only when an independent existing output needs comparison; fresh outputs and already-known path/directory rejections do not stat every input. Keep the existing output error and ordinary independent output overwrite behavior.A permanent installed-CLI assertion in the existing ping gate refuses a hard-linked
sum.bendoutput, then runs the original input and expects5n. The exact assertion fails against the unchanged source CLI and passes against the real rebuilt standalone CLI. It does not pin diagnostic wording or inspect implementation source. README documents file-identity protection; GUIDE/CHANGELOG and gate caps/policy are unchanged.Actual local verification on Linux x64:
-o alias.jsexits 0 and overwrites the input; rerunning that input exits 1 with a parser error.42nand the real host cwd).bun gates/repo.ts: 54/54.The full installer/archive/hub ping flow was not run: its sibling site checkout is absent and the referenced GitHub site repository is not accessible here. Executing the isolated new assertion is not a claim that the full ping gate passed. This checks identity at validation time; it is not a claim of race-proof concurrent filesystem protection.