Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

getconf: report Kandelo's real POSIX configuration - #119

Open
brandonpayton wants to merge 1 commit into
mainfrom
migrate/getconf-posix
Open

getconf: report Kandelo's real POSIX configuration#119
brandonpayton wants to merge 1 commit into
mainfrom
migrate/getconf-posix

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 13, 2026

Copy link
Copy Markdown
Member

Why

Kandelo needs the standard POSIX getconf command as a real Homebrew package. Build systems use getconf to discover limits and supported programming environments. This Formula asks Kandelo's libc and kernel for the real sysconf, pathconf, and confstr values; it does not wrap the old package-registry command or print hard-coded answers.

What changed

  • Pin OpenBSD getconf revision 1.23 and its matching manual page.
  • Build with Kandelo's wasm32 SDK and reject the wrong ABI, legacy Asyncify state, fork support, or leaked host paths.
  • Add only the OpenBSD portability boundary needed for __dead, pledge, and unveil. Reported configuration values still come from Kandelo's target APIs.
  • Make the Chromium Formula runner preserve the exact nonzero guest status and return stdout and stderr in callback order.
  • Check representative system values, live file and directory limits, exact failure output, POSIX V7 environments, and a compile/link/run using flags returned by getconf.
  • Exercise the same behavior in Node and Chromium, including alternating stdout/stderr output.

Merge and publication status

This source PR has no bottle metadata and does not publish an artifact.

The old prerequisites are satisfied:

The source can be reviewed independently. Before a bottle is published, the Formula still needs a fresh source build and its complete Node and real-Chromium Formula test on the exact ABI 41 publisher platform, followed by a publisher dry run. The scheduled package activator also needs the unrelated historical-release fix in Automattic/kandelo#972 before activation evidence can be relied on.

Exact refreshed candidate

  • Head: 9845b9edc2bfa6476d8d68d35408527414ac2d16
  • Tree: 800c429ecf90d4db186f1c2b9d50b44e41899cbc
  • Tap base: 857cbb1ef95573c886b48b8ebaad83362b47020c
  • Kandelo platform checked during refresh: 2ce59cfce35f65c4b415203b4ff7d78bbd8cfc9d (ABI 41)

The refreshed commit has the same stable patch ID as the previously reviewed head c0fe8f794511923741c8a40651216dc0ae4bdd9f; the restack did not change Formula behavior.

Current refresh evidence

Run against the refreshed candidate:

  • Ruby syntax: passed for the Formula, shared Formula helper, and helper test.
  • Tap workflow trust contract: passed.
  • Formula support suite: 52 runs, 410 assertions, 0 failures, 0 errors, 0 skips.
  • Current-main source-closure validation: passed.
  • Runtime-closure parsing: getconf has no target runtime dependencies; binaryen and wabt are host build tools only.
  • git range-diff: old and refreshed commits are patch-equivalent.
  • git show --check, git diff --check, authorship checks, and clean-worktree check: passed.

A current ABI 41 Formula source build, Node runtime test, Chromium runtime test, and publisher dry run were not run during this refresh. This PR does not claim that current runtime evidence.

Historical ABI 39 evidence

The previous candidate was built and tested on Kandelo head 53c1997afc4a3973c06d0284a947e75bbf34a18e, which was ABI 39:

  • An isolated Homebrew prefix built the Formula from source with built_as_bottle: false.
  • The full Formula test passed in Node and real Chromium.
  • Homebrew style, brew readall --aliases, and brew audit --strict passed.
  • The test covered documented values, live NAME_MAX and PATH_MAX, exact status-1 diagnostics, V7 flags, compile/link/run, and stdout/stderr ordering.

This is historical evidence only. It does not replace the required ABI 41 publication validation.

Provenance

  • OpenBSD source commit: d7259957e8a5d4370d76bfccd4a30d5d1fe80f38
  • Source SHA-256: e1c8be153cc3cfefa1a24bcaf62fe74d4d78eeadba660f320b09931e29d95c65
  • Manpage SHA-256: 0acea5eed79da7b0dd04ad39a4e7b811a92da5311a8f321e8bb04339ed8ad328
  • License: BSD-4-Clause

Remaining test gap

The Chromium ordering regression uses ASCII. It does not yet split one multibyte UTF-8 character across callback chunks. The implementation collects raw chunks in callback order and decodes after collection, so this is a future-refactor coverage gap, not a known defect.

The Formula is intentionally wasm32-only. This PR changes no Kandelo ABI, bottle bytes, package index, VFS image, or performance behavior.

@brandonpayton

Copy link
Copy Markdown
Member Author

Devil's-advocate exact-head review: ACCEPT

Reviewed exact head
b814ddd27bfe5f27d54dfdda79588f839ef640d5 (tree
dd118544f025ef830c2a6b02497b3e9760cd154a). No blockers remain.

The review specifically checked the likely failure modes:

  • This is maintained OpenBSD source with verified source/manpage hashes and the
    correct four-clause BSD license, not a wrapper around Kandelo registry tools.
  • The compatibility header is limited to OpenBSD-only sandbox/noreturn APIs;
    it does not replace, precompute, or special-case any configuration result.
  • System and pathname values come from libc sysconf, confstr, and
    pathconf. Real file/directory and ENOENT behavior are therefore correctly
    gated on Kandelo #907/#752 rather than hidden in Formula code.
  • wasm32 truthfully advertises only POSIX_V7_ILP32_OFFBIG; the Formula uses
    its returned flags to build and run a program and rejects LP64 as unsupported.
  • Browser negative paths now require the exact guest exit status. Merged stderr
    is opt-in, and a deliberate status mismatch proved the runner fails closed.
  • The installed artifact passed ABI 39, no-Asyncify, fork-forbidden, and
    forbidden-host-path guards.
  • Exact Homebrew source install and the full Formula test passed across Node and
    Chromium; strict audit, readall, Ruby style, and 47-run/346-assertion helper
    coverage also passed.

Residual gates are intentional and visible: do not merge or publish until #907
lands ABI 39 (including live-object pathconf), #913 lands afterward for the
final SDK ordering baseline, and the Formula is rebuilt/retested from that
merged platform. This PR contains no bottle metadata and makes no wasm64 or
performance claim.

@brandonpayton
brandonpayton force-pushed the migrate/getconf-posix branch from b814ddd to c0fe8f7 Compare July 14, 2026 06:17
@brandonpayton brandonpayton changed the title getconf: query real POSIX configuration getconf: report Kandelo's real POSIX configuration Jul 14, 2026
@brandonpayton

Copy link
Copy Markdown
Member Author

Independent devil's-advocate review completed for exact head
c0fe8f794511923741c8a40651216dc0ae4bdd9f (tree
0a6756e5d52feab133fb23b4b8f475f015a60493) on tap base
0bbb34feedcfb9cd74ebdeda264611fa36cba822.

No code findings.

I specifically checked that the restack preserves #120's authoritative
exec_programs manifest, validation, sizing, and executable modes, and #130's
guest-only output isolation. The browser helper copies callback bytes, retains
stdout/stderr callback order, and decodes the combined byte sequence only after
collection, so host diagnostics remain excluded and UTF-8 sequences split
across callback chunks remain valid.

Independent reruns/checks:

  • Formula support: 50 runs, 391 assertions, no failures or errors.
  • Full Getconf Formula test against Kandelo #941 head 53c1997a: passed in
    Node and real Chromium, including exact nonzero diagnostics, live path
    limits, V7 flag compile/link/run, and alternating stdout/stderr output.
  • Homebrew style, readall, strict audit, Ruby syntax, and Git whitespace checks:
    passed.
  • The isolated-prefix installed Formula matches this head and records a source
    build rather than a poured bottle.

The source Formula should merge only after #941. Final bottle work remains
separately gated on #913, #936, tap #22/settings, and a rebuild on the exact
merged platform. The PR intentionally contains no bottle metadata.

Residual coverage note: the Chromium ordering program is ASCII and does not
artificially split a multibyte UTF-8 character between callbacks. The current
byte-concatenation design handles that case correctly, but a dedicated split
fixture would protect a future refactor.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant