knowledge: 1 insight — a native addon has no .node after bun install: blocked vs failed lifecycle script, bun pm untrusted/trust, rebuild under the launcher's runtime (1 new page, 5 back-links, 7 plan-gaps retired as local-layer) - #227
choiyounggi wants to merge 1 commit into
Conversation
…ode: blocked vs failed lifecycle script)
Wiki agent gate: failPR #227 adds one new wiki page (wiki/platforms/toolchains/native-addon-binary-missing-after-bun-install.md) plus five one-line
|
Knowledge flush — 1 insight (1 new page; 7 plan-gap rows retired as local-layer candidates)
Run id
20260928-103002-67743(auto-flush child; lock inherited viaDEV_LOOP_FLUSH_RUN_ID).Claimed 8 queue rows:
27c34a17ce1d6612(bun native addon) and 7plan-gapsrows for thedaceAndroid repo (30c9b935faa64ba8,639657eea8ef0550,2b1e21589c1987ea,a81012fb435b7e21,79f42a83701cab51,86a1fcda7460b479,3deebdb303656afe).Verified best-practice
1. A native addon has no
.nodebinary afterbun install—confidence: verifiedHarvested claim (row
27c34a17ce1d6612): abun install -gCLI dies with "Could notlocate the bindings file" because bun skips lifecycle scripts for packages not in
trustedDependencies; remedy: runprebuild-install/node-gyp rebuildby hand orreinstall with
--trust.Verification changed the claim. The stated cause is refuted for the harvested case and
the page states the corrected mechanism:
bun pm default-trusted(bun 1.3.11, run in~/.bun/install/global) lists 367 packages andincludes
better-sqlite3(line 117) andsqlite3; the upstreamsrc/install/default-trusted-dependencies.txtconfirms both.bun pm untrustedin thatinstall root lists tree-sitter-* and node-llama-cpp as blocked but not better-sqlite3.
So bun ran its script; it was the
prebuild-install || node-gyp rebuild --releasechain(better-sqlite3's own
package.jsoninstall script) that produced no binary..claude/tmp/, deleted afterwards):a trusted
file:dep whose install script exits 1 →bun installexits 1 witherror: install script from "failing-dep" exited with 1, leavesbuild/Release/obj,writes no lockfile (
bun pm untrusted→error: Lockfile not found). An unlisted dep →exit 0 with
Blocked 1 postinstall. Run \bun pm untrusted` for details.;bun pm trustblocked-dep
ran the script and wrotetrustedDependencies`. The "only obj dirs, no .node"state in the harvested evidence matches the failed branch, not the blocked branch.
/oven-sh/bun+ WebFetch): https://bun.com/docs/pm/lifecycle(default-secure allowlist; default list applies to npm sources only;
--ignore-scripts),https://bun.com/docs/pm/cli/pm (
untrusted/trust/default-trusted/ls --trusted;a set
trustedDependenciesreplaces the default list),https://bun.com/docs/guides/install/trusted (same replace-not-extend note),
https://github.com/nodejs/node-gyp#installation (Xcode CLT + supported Python;
--python,npm_config_python,PYTHON;rebuild= clean+configure+build).better-sqlite3 12.8.0, launcher
#!/bin/sh→ Node 26.7) had no prebuilt for that ABI;node-gyp rebuild --release --python=<3.11>producedbetter_sqlite3.nodeand the serverconnected (originating session transcript
d5eb45d9…,claude mcp listoutput).--trustremedy for adefault-listed package (it would re-run the same failing compile and, by writing
trustedDependencies, drop the rest of the default allowlist — recorded as an Instead ofrow).
2–8. Seven
plan-gapsrows (t6b-calendar-trip-integration, repodace) — not ingestedEach directive names the dace repository's own types and files (
CalendarBarItem,CalendarWeekSegmentLayout,CalendarViewModel/TripApi,MonthGridPanel,CalendarWeekRow,PendingInAppRouteBox,AppContainer,MainTabScaffold,TripTabRoot)and would be wrong in any other codebase. Layer test (wiki-ingest step 3) → local layer; see
## Local-layer candidates. Their general residue is already covered:mobile/navigation/deep-links-and-entry-points(pending-route ownership, cited by the rowsthemselves) and
testing/mocking/what-to-mock.Existing-layer check
Pages read: platforms-toolchains-version-management, platforms-toolchains-compiler-sysroot-on-macos, platforms-environment-path-resolution, security-dependencies-supply-chain, platforms-tools-plugin-mcp-server-registration, qa-deliverables-documented-behavior-of-a-third-party-tool
INDEX.md→wiki/platforms/index.md(toolchains; also read shells/tools rows),wiki/infrastructure/index.md,wiki/backend/node/index.md,wiki/debugging/index.md.bun|native addon|node-gyp|prebuild-install|lifecycle script|postinstall|trustedDependencies|bindings fileacross
wiki/(no truncation): 3 files —frontend/design/design-canvas-workflow.md(bun asa prerequisite only),
security/dependencies/supply-chain.md(one directive: reviewinstall scripts, allowlist them — same principle, no diagnostic/remedy),
qa/deliverables/ documented-behavior-of-a-third-party-tool.md(npm ls -glookup only). No page covers theblocked-vs-failed distinction,
bun pm untrusted/trust, or the ABI/runtime rebuild.wiki_search(k=5) on the trigger sentence: qa-deliverables-documented-behavior-of-a-third-party-tool (0.75),infrastructure-containers-image-builds ×4 (0.72–0.75) — none describes this situation, so
created new:
wiki/platforms/toolchains/native-addon-binary-missing-after-bun-install.md(id
platforms-toolchains-native-addon-binary-missing-after-bun-install, 90 lines total).security-dependencies-supply-chainsays "disable install scripts bydefault and allowlist"; the new page is the downstream diagnostic when that allowlist (or a
failed script) leaves a native addon without its binary — complementary, linked both ways.
platforms-toolchains-compiler-sysroot-on-macos (node-gyp compile on macOS),
platforms-environment-path-resolution (which
nodethe launcher resolves),security-dependencies-supply-chain, platforms-tools-plugin-mcp-server-registration (MCP
server dying at connect).
wiki/platforms/index.mdtoolchains row;INDEX.mdplatforms route lineextended (no open PR rewrites that row — checked knowledge: 15 insights — gitignore re-inclusion, union-merge reassembly, hook input fields, silenced-write redirection, jq unicode escape, EPIPE write ordering, fake-server forward-before-reply, shared-helper invariant (8 new pages, 5 amended, 100 plan-gaps retired) #223/knowledge: 12 insights — fake IntersectionObserver under whileInView, concurrent optimistic PATCHes, buildConfigField as Java source, kotlinx coerceInputValues enum defaults, Kotlin implicit-receiver shadowing, self-hosted model load latency, alias-table contract tests, scrub vs timeScale (7 new pages, 1 amended, 77 plan-gaps retired) #225/knowledge: 2 insights — park a transient async state behind a test-controlled gate, a PASS body that records a surviving mutant is a finding (1 new page, 2 amended, 26 plan-gaps retired) #226 diffs on
INDEX.md);log.mdingest entry.node scripts/wiki-lint-prohibitions.js— no finding on the new page; no bannedqualifiers in directive sentences.
Open-PR check
Open
knowledge/*heads (gh pr list --state open --search "head:knowledge/"):#226
knowledge/choiyounggi-20260928-092831, #225knowledge/choiyounggi-20260928-082803,#223
knowledge/choiyounggi-20260927-220735. Each fetched and diffed againstorigin/mainunder
wiki/with the overlap grep above:27c34a17ce1d6612bun native addonpostinstallin an unrelated Kotlin/Gradle page)bunmention)#223 touches
wiki/platforms/index.md(shells and tools rows) andINDEX.md; my edits are inthe toolchains table and the platforms route line, which none of the three PRs rewrite.
Routing decision
.nodeplatforms/toolchains/native-addon-binary-missing-after-bun-install(new page)compiler-sysroot-on-macos,version-management,environment-resync-removes-undeclared-packages. Notbackend/node(no application code) and notsecurity/dependencies(that page owns the policy, not the diagnosis). No new category.Local-layer candidates
Project
dace(/Users/choeyeong-gi/Desktop/workspace/linkly-calendar/dace, taskt6b-calendar-trip-integration) — run
wiki-ingestinside that project:30c9b935faa64ba8CalendarBarItem sealed union + id prefixeswiki-local/mobile/presentation/calendar-bar-item-union.md639657eea8ef0550shared greedy lane layout over mixed bar itemswiki-local/mobile/presentation/calendar-week-lane-layout.md2b1e21589c1987eaasymmetric error isolation for parallel events/trips fetchwiki-local/mobile/networking/calendar-parallel-fetch-error-isolation.mda81012fb435b7e21trip bar color/icon parity with iOSwiki-local/mobile/presentation/calendar-trip-bar-rendering.md79f42a83701cab51trip-bar tap routing (onTripTap, isCenter-only)wiki-local/mobile/navigation/calendar-trip-bar-tap-routing.md86a1fcda7460b479PendingInAppRouteBox owned by AppContainerwiki-local/mobile/navigation/pending-in-app-route-ownership.md3deebdb303656afe5th tab index/icon + TripTabRoot stub consumptionwiki-local/mobile/navigation/trip-tab-and-pending-route-consumption.mdAll 8 claimed rows are retired in the queue by this run (1 ingested, 7 local-layer).