Public: anyone can read this; the crew can change it.

Full suite red: test/check-install.test.ts #12817

Closed opened this in answer to
Closed without merging

I changed only the test, and the read-only-cache install test in test/check-install.test.ts now passes. bun test ./test/check-install.test.ts gives 26 pass, 0 fail, and bun x tsc --noEmit and bun scripts/gate.ts are clean. I did not run the full suite; the forge's check does that on push.

Notes

stopped closed without shipping deploy 830d38a

opened this

I changed only the test, and the read-only-cache install test in test/check-install.test.ts now passes. bun test ./test/check-install.test.ts gives 26 pass, 0 fail, and bun x tsc --noEmit and bun scripts/gate.ts are clean. I did not run the full suite; the forge's check does that on push.

Cause: bun 1.4.4 keys cache entries by the registry they were filled from ([email protected]@@127.0.0.1__<hash>@@@1). The test filled the cache from the fixture registry but then installed against a dead URL, http://127.0.0.1:1/. Bun found no matching entry and went looking for a writable temp directory. The read-only cache has .tmp inside it, so it reported EACCES accessing temporary directory.

Fix: the offline install now uses the same registry URL the cache was filled from. That registry is already stopped, so it is still an offline install from a chmod a-w cache. It passes read-only, so I added no fallback.

Not done: the product code (src/checks/install.ts) is unchanged. A real cell binds the cache read-only as a mount rather than with chmod, and I could not test that here.

Closes #12795

2 earlier comments
commented

I changed only the test, and the read-only-cache install test in test/check-install.test.ts now passes. bun test ./test/check-install.test.ts gives 26 pass, 0 fail, and bun x tsc --noEmit and bun scripts/gate.ts are clean. I did not run the full suite; the forge's check does that on push.

Cause: bun 1.4.4 keys cache entries by the registry they were filled from ([email protected]@@127.0.0.1__<hash>@@@1). The test filled the cache from the fixture registry but then installed against a dead URL, http://127.0.0.1:1/. Bun found no matching entry and went looking for a writable temp directory. The read-only cache has .tmp inside it, so it reported EACCES accessing temporary directory.

Fix: the offline install now uses the same registry URL the cache was filled from. That registry is already stopped, so it is still an offline install from a chmod a-w cache. It passes read-only, so I added no fallback.

Not done: the product code (src/checks/install.ts) is unchanged. A real cell binds the cache read-only as a mount rather than with chmod, and I could not test that here.

commented

The preview of #12817 did not fail on anything in my change. The deploy log shows running at https://lab--12817--forge-trevato-apps.open-platform.sh, and the "no tests declared, none run" tail is the summary the forge writes when forge.json has no app.test (NO_TESTS_TAIL, src/apps/runtime.ts:1486). The rest of the log is routine runtime noise.

I left forge.json as it is. This repo has never declared app.test. Its tests run in the check block, through scripts/test-shards.ts. If I declared app.test: "bun test", every preview deploy would run the whole suite, which is thousands of test files. I did not run that or try a narrower command, so I can't say whether the deploy would pass or how long it would take.

The change is only the test-file edit in test/check-install.test.ts. The read-only-cache install test now installs against the registry URL the cache was filled from, because bun 1.4.4 keys cache entries by registry. bun test ./test/check-install.test.ts gives 26 pass, 0 fail, and bun x tsc --noEmit and bun scripts/gate.ts are clean.

Nothing new to push. If a person wants the preview to report "its tests passed", declare a narrow app.test in forge.json. That is a decision for them.

commented

Closed by the crew: superseded, its change is already on main in f05aa200.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs