tickets
All repositories: gitoria
2.2 KB
// Cross-compat phase B step 2: the REAL JS mpackdb opens a db WRITTEN BY the// Zig port (compat_driver.zig write_b: @uuid pk + city/*score indexes),// asserts contents, then mutates it (insert + delete) for the Zig side to// re-verify (compat_driver.zig verify_b2).//// Default compact:true — JS compacts and rebuilds indexes from the// Zig-written data file on open (exercises the full JS init path on Zig files).//// Run: MPACKDB=/tmp/mpackdb-run node verify_b.mjs /tmp/compat/places_bimport { pathToFileURL } from 'url';const MOD = process.env.MPACKDB || '/tmp/mpackdb-run';const { default: MPackDB } = await import(pathToFileURL(MOD + '/src/MPackDB.js'));const dbfile = process.argv[2];if (!dbfile) throw new Error('usage: verify_b.mjs <dbfile>');let failures = 0;const check = (label, cond) => {console.log(`${cond ? 'PASS' : 'FAIL'}: ${label}`);if (!cond) failures++;};const db = new MPackDB(dbfile, { primaryKey: '@uuid', indexes: ['city', '*score'] });const all = await db.find();check('three Zig-written records', all.length === 3);const [bob] = await db.find(r => r.city === 'Helsinki', { index: { field: 'city', value: 'Helsinki' } });check('city index lookup (Helsinki)', !!bob);check('unicode name Böb', bob?.name === 'Böb');check('negative score', bob?.score === -3);check('nested meta.active true', bob?.meta?.active === true);check('nested meta.note null', bob?.meta?.note === null);const [chidi] = await db.find(null, { index: { field: 'score', from: 4294967296 } });check('score range finds 2^32 value', chidi?.score === 4294967296);const ada = all.find(r => r.name === 'Ada');check('Zig uuid is 12 base36 chars', /^[0-9a-z]{12}$/.test(ada?.uuid ?? ''));const [adaByPk] = await db.find(ada.uuid);check('uuid pk lookup', adaByPk?.city === 'Klagenfurt');const woergl = all.find(r => r.city === 'Wörgl');check('unicode city Wörgl intact', !!woergl);// mutate for the Zig sideconst newUuid = await db.insert({ name: 'Remote', city: 'Byrodin', score: 7 });check('JS insert on Zig db returns uuid', /^[0-9a-z]{12}$/.test(newUuid));const deleted = await db.delete(ada.uuid);check('JS delete by uuid pk', deleted.length === 1);await db.close();console.log(failures === 0 ? 'JS verify_b: ALL PASS' : `JS verify_b: ${failures} FAILURES`);process.exit(failures === 0 ? 0 : 1);
Branches
Latest commits
- 20f7c33async components.hybriel 214c318: MdEditor on a phone, two even toolbar rows of 44 px targets, label 15 px, table head 16 px (E2)mre
- d74a5482sync components.hybriel 134b4e3: MdEditor builds an editor put into the page at once, redraws a surface put in anew (F5, hybriel#211)mre
- 9d02c540sync components.hybriel 6b0936a: the 'edited' foldable drops the theme's border and marginmre
- 22751914sync components.hybriel 8d79ff7: bubble hugs its content, quiet 'edited' label; gate checksmre
- c8452453sync components 9a: shared Icon (icons/icons.hl), md-editor toolbar icons + single focus ring (components f4-icons ba96735)mre
- 52ba11e8sync-components: copy icons/icons.hl + README (F4); testsmre
- 138d198dmd-editor.hl: verbatim copy of components f3-mdvalue (an older text handed back is kept)mre
- 18d2df60md-editor.hl: verbatim copy of components f3-mdvalue (an outside value change is shown by the editor)mre
- f6764bedreports/H1-hydrate.mdmre
- 1bbbf0edtests/browser.mjs: wait for hydration before clicking the login button on / (device B)mre
- 6f503cfctests/cdp.mjs: HL_CPU_THROTTLE=<rate> optional CPU throttling for gate runsmre
- e17e2855re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
- a6ddccd2re-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
- 81e036b7docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
- 5d8d2cf6deploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- 58e8c02cmission 024: report, LOG, STATUS, e2e fixmre
- 50778073tests/e2e-route-marker.mjs: first paint marker, comments post/edit redrawmre
- c5203298mission 024: MainMenu marks the page from the route (layouts 0bcc629 main-menu.hl); browser-side marker removed; gate: marker in the server HTMLmre
- b1a4c270re-vendor Hybriel master f9614007: bin/ (git-ignored) and plugins wholemre
- 866397a0mission 023: theme from layouts 76f99f6 (current marker, menu count badge), components from 3794c59 (MdEditor keys); Inbox count as badge, current by address; gates and E2E; reportmre