# Native transport failure in the fresh npm installation gate

Status: implemented and verified. Publication remains with the user.

## Observed failure

The user's publisher packed 1.0.844 and passed the 528-file tarball audit. Its
ordinary fresh global install then failed in `node-datachannel@0.27.0`: a
prebuilt download timed out, and the package's fallback `prebuild -r napi`
crashed with an undefined N-API target and `expected first argument to be an
array`. The gate requested `--omit=optional` and retained lifecycle scripts.

## Work orders

1. Establish the actual failing dependency path and compare global installation
   with the successful local-prefix dependency projection. Do not assume that
   a different nested version explains this failure.
2. Repair the dependency/install boundary without suppressing failures from
   required native dependencies or weakening SQLite startup verification.
   Preserve transport behavior or state any actual unavailable optional
   capability accurately.
3. Add a regression for the discovered dependency/install behavior and rerun
   the real fresh-install gate with lifecycle scripts enabled, normal startup
   checks, required SQLite query, library exports and AIWG companion verification.
4. Preserve unrelated package and lockfile edits, retain the inference-route
   repair, and deliver a separate scoped, verified commit to the tracked branch.
5. Coordinate staging with the user's active publisher. Keep diagnosis probes
   in private prefixes and copy the tarball before testing it, so a rebuild
   cannot replace the artifact under verification.

## Scope constraints

No local inference, CUDA workload change, Telegram delivery, global host
installation, daemon activation or npm publication is required. Lifecycle
probes must use the existing gate's daemon/wrapper/bootstrap suppression.

## Anchored diagnosis and repair

- The sole incoming edge to failing `node-datachannel@0.27.0` belongs to
  `omnius-fabric@0.12.9`. Its optional metadata is already correct.
- A local-prefix install omits this dependency; a global tarball install on
  npm 11.9.0 installs it despite `--omit=optional`. This matches
  [npm/cli issue 8284](https://github.com/npm/cli/issues/8284). The global
  `--install-links` folder variant and a root dependency override also failed
  to exclude or replace the physical legacy addon in isolated probes.
- Commit `239dd998` added Fabric as one publish-manifest line, with no code
  integration. Independent source, shipped-bundle, shim and Nexus checks
  found no imports, commands or downstream dependency requiring Fabric.
  Nexus independently uses the newer `node-datachannel@0.33.4` packaging.
- Remove the unused Fabric dependency, normalize old staging manifests at
  build time, and regenerate the ordinary shrinkwrap. Preserve required
  Nexus and SQLite and the exact global tarball install gate.
- Audit both staging and packed dependency graphs against stale Fabric and
  legacy native-build entries. Keep Fabric autostart disabled in smoke-test
  environments, alongside Omnius daemon/wrapper/bootstrap suppression.

## Verification

- Full workspace rebuild and bundling passed. The packed 1.0.845 artifact
  passed the tarball audit with 529 files and no warnings.
- The ordinary isolated `npm install -g <tarball> --omit=optional` passed
  twice with lifecycle scripts enabled and compiler commands blocked. CLI
  version, required in-memory SQLite query, library exports, AIWG companion
  version and postinstall PATH guidance all passed. The second pass also
  disabled the companion transcription package's optional Python/model
  bootstrap, keeping model setup outside this compiler-free core check.
- Physical installation contains no Fabric or legacy `0.27.0` addon; Nexus's
  newer `0.33.4` addon remains installed. No required dependency was made
  optional and the normal global tarball installation was not substituted.
- All 48 publish-related tests passed, including 19 new dependency graph
  regressions. Both audits share the same validation and retain required
  SQLite checks.
- All 12 bundled inference fallback scenarios passed against the actual
  lifecycle-installed artifact with mocked HTTP/DNS, no inference requests
  and no Telegram sends.

Evidence logs: `/tmp/omnius-native-transport-publish-build.log`,
`/tmp/omnius-native-transport-tarball-audit.log`,
`/tmp/omnius-native-transport-fresh-install-final.log`,
`/tmp/omnius-native-transport-policy-tests.log`, and
`/tmp/omnius-native-transport-installed-fallback-verification.json`.
Private prefixes and copied artifacts isolated tests from the user's
publisher and running services. Release version and unrelated lockfile
metadata changes remain owned by the user.
