This repository was archived by the owner on Jul 21, 2026. It is now read-only.
lsof: package the upstream open-file inspector - #43
Closed
brandonpayton wants to merge 1 commit into
Closed
Conversation
brandonpayton
force-pushed
the
migrate/lsof
branch
from
July 11, 2026 22:13
2a02dc5 to
29bc5b4
Compare
Member
Author
|
Superseded by #80, which is restacked on current tap main, uses the official 4.99.7 release asset, eliminates embedded builder paths, and has fresh ABI 18 build/test evidence. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
The old registry
lsofis an in-tree 0.1.0 mini/procreader, explicitly not upstream lsof. That is not a first-class Homebrew package and must not become the tap implementation.This change builds the official lsof 4.99.7 source archive through the Kandelo SDK and exercises the real process/open-file path.
Implementation
lsofformula from the official 4.99.7 tagreadlink/statoperationsMerge gates
Do not merge or publish this formula yet. The source build and runtime enumeration work, but the final type assertion intentionally exposes a kernel procfs defect:
stat("/proc/<pid>/cwd")andstat("/proc/<pid>/fd/<n>")return syntheticS_IFREGmetadata instead of following the procfs symlink and statting the authoritative target.crates/kernel/src/procfs.rs::procfs_stathandles only the no-follow symlink case;follow_symlinks=truefalls through to its regular-file branch.sys_statandsys_fstatatroute procfs entries directly to that branch.A standalone main-repo root-cause fix is required before this PR can pass
brew testand merge. Automattic/kandelo#867 has landed; ABI-18 publication remains gated on Automattic/kandelo#842, #873, #874, #882, and #885.Validation
On exact tap commit
2a02dc5c63e4f09c01726dc16d60aa2285d30d03with the local ABI-18 integration stack:brew install --formula --build-bottle automattic/kandelo-homebrew/lsofpassesbrew stylepasses for the formula and support changesbrew audit --strict --formula automattic/kandelo-homebrew/lsofpassesbrew readall --aliases automattic/kandelo-homebrewpassesbrew test --verbosereaches the meaningful runtime assertion and fails only oncwdbeingtREGinstead oftDIR; PID 100 and cwd/fd paths are correcttREGclassification, establishing Node/browser parity of the kernel defectInstalled Wasm evidence:
33eb67ad1ce5d1a5d50c74b76338610771571f52a0454a7fcaddfc1b6ae6b4a7__abi_versionreturns 18)kernel.kernel_forkwpk_fork_*setA local, non-published bottle from the exact commit is 276,503 bytes with SHA-256
ea76b1513830f3ea998bd905346662c854682def3eadf434bd3e7d998d485d9d. No bottle block is committed; trusted ABI-18 publication must generate authoritative metadata after the gates land.Rebase note
Rebased onto tap main at
a4c52a1338190543e33623ab335618605c21a029. The formula blob remains byte-for-byte identical (dc179ed64bd1c6ee447eb223f51891ea6ff9b9f8); the old branch's shared-helper delta was dropped because current tap main already contains that helper and stronger coverage. Current formula-support validation passes with 21 runs / 186 assertions, and current formula syntax, style, andgit diff --checkpass. Head:29bc5b49d7ade40e30edd1e339f1e6d6f9ec5093.