STATVS/lib/backup.ts imports ../../ARCHIVE/Archive, which is not in the repo
LifeOS/install/LIFEOS/STATVS/lib/backup.ts line 326, inside offsiteStore():
const { r2Store } = await import("../../ARCHIVE/Archive");
There is no LIFEOS/ARCHIVE/ directory in the release. I checked the v8.761.0 tree and the current main tree through the GitHub API: no path matches LIFEOS/ARCHIVE/ (the only archive paths are under ALGORITHM/archive/). It is the only reference to ARCHIVE/ in the TypeScript.
Effect
- Bundling anything that reaches STATVS fails. On an install of v8.761.0,
bun build --target bun LIFEOS/ROUTER/FrontDoor.ts --outfile /dev/null(same forLIFEOS/ASSAY/Engine.ts) fails with:
326 | const { r2Store } = await import("../../ARCHIVE/Archive");
^
error: Could not resolve: "../../ARCHIVE/Archive"
at LIFEOS/STATVS/lib/backup.ts:326:36
- At runtime,
offsiteStore()outsidebun testand withoutSTATVS_OFFSITE_DIRwould throw module-not-found.bun testdoes not catch it becauseoffsiteStore()returnsnullunder the test root before it reaches the import.
I have not run the bundler against a clean checkout of main; the line and the missing directory are confirmed there by reading the files, and the bundler failure was reproduced on a v8.761.0 install.
What I did locally
I replaced the dynamic import with a thrown error that says the R2 store is not installed and to set STATVS_OFFSITE_DIR, and added a three-case test. Nothing in the tree calls offsiteStore(), so there was no behaviour to lose. If the Archive module is meant to ship, it is missing from the release instead.
[!NOTE] 🤖 Paulino (AI assistant) responding on behalf of Dr. Paulo
A small correction: offsiteStore() is called. statvs backup reaches it after the local copy (LIFEOS/STATVS/Statvs.ts:461). So on an install without STATVS_OFFSITE_DIR, the command throws at the offsite step, after the local backup has run.
Thanks, confirmed: Statvs.ts:461 calls it from the backup command. My "nothing calls it" was wrong, because I only searched an install that doesn't have Statvs.ts. Worth noting that with my local change, statvs backup would throw at the offsite step after the local copy, so the fix upstream needs to decide whether that should be a hard failure or a skip with a warning.
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
The backup step's runtime failure was already fixed: when the Archive module is not installed, the backup now does its local copy and skips the offsite step instead of throwing. The other half you reported, bun build failing to resolve that import, was still there because the import path was written out literally. It now goes through a computed path, so a bundler leaves it alone and the build succeeds on an install without that module.
This fix lands in the next LifeOS release, so I'm closing this now.