OverviewFilesCommitsIssuesDocsReleasesPeers

favela-surface-android commits / a036255

0.0.15: the stack filter skipped the wrong frames
0.0.14's instrument reported `bare-fs/index.js` three times — which is bare-fs's RECURSIVE mkdir calling itself, not the caller. `slice(1, 4)` named the failing primitive, which the message already said, and hid the only thing it did not. ⛔ A FIXED DEPTH IS ALWAYS WRONG when the failing call is recursive: the helper can produce arbitrarily many internal frames before the caller appears. Filter by ORIGIN — drop bare-fs, bare-module, bare-path and `bare:` frames — and take the first four that remain. Proved before shipping rather than after: a deliberate recursive mkdir failure now yields the calling file and line, with every bare-fs frame gone. ⚠ Still no fix for the ENOENT itself. The three homedir defaults I already overrode are all verified present in the shipped bundle, so the fourth caller is somewhere my greps do not reach — which is exactly what this is for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
a036255b875a359b972d20376d701338f36acfe0
by plankatron <fleeky@gmail.com> · 2026-09-10T18:29:18.000Z

Changed files (3) +11 -5

lib/host/ota.js +8 -2
……@@ -56,8 +56,14 @@ const BUNDLE_NAME = 'worklet.bundle'
5656// with no log anyone can read has to carry the frame itself.
5757const frame = (err) => {
5858 const st = (err && err.stack) || ''
59 const lines = String(st).split('\n').slice(1, 4).map((l) => l.trim().replace(/^at\s+/, ''))
60 return lines.length ? ' @ ' + lines.join(' < ') : ''
59 // ⛔ SKIP THE RUNTIME'S OWN FRAMES. `slice(1, 4)` reported three frames of bare-fs's RECURSIVE
60 // mkdir and never reached the caller — the instrument named the failing primitive, which was
61 // already in the message, and hid the only thing that was not. A recursive helper can produce
62 // arbitrarily many internal frames, so a fixed depth is always wrong; filter by origin instead.
63 const ours = String(st).split('\n').slice(1)
64 .map((l) => l.trim().replace(/^at\s+/, ''))
65 .filter((l) => l && !/bare-fs|bare-module|bare-path|^bare:|node_modules\/bare-/.test(l))
66 return ours.length ? ' @ ' + ours.slice(0, 4).join(' < ') : ' @ ' + String(st).split('\n').slice(1, 3).join(' < ')
6167}
6268
6369const hashOf = (bytes) => crypto.data(Buffer.from(bytes)).toString('hex')
lib/version.js +2 -2
……@@ -1,4 +1,4 @@
11// GENERATED by scripts/gen-version.mjs — do not edit.
2export const VERSION = "0.0.14"
3export const BUILT_AT = 1789063540261
2export const VERSION = "0.0.15"
3export const BUILT_AT = 1789064949030
44export default { VERSION, BUILT_AT }
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "favela-surface-android",
3 "version": "0.0.14",
3 "version": "0.0.15",
44 "description": "favela-surface-android \u2014 a React Native shell over a bare-kit worklet running a full favela-peer node (markdown records, no atproto) with favela-surface rendering its pages in a WebView.",
55 "type": "module",
66 "private": true,