tracker
All repositories: gitoria
4.9 KB
// tests/realdata-m026.mjs — mission 026 (tracker#31, duplicate titles), NOT the gate: what the creator sees on a COPY of live storage// (tests/realdata-m026.sh start …), signed in as az5b2 (cookie from $REAL_SID_FILE). Prints one JSON line per check and writes// screenshots (390 + 1280) to $REAL_SHOTS: /my/series (Reacher's last watched episode, Archive 81's row), Reacher's page (season 3// checked or not), /my/unwatched (Reacher S03 rows), Archive 81's page, the search "archive 81", a talk show with many seasons// (The View) and its full load time. Env: REAL_PORT, REAL_CHROME, REAL_SID_FILE, REAL_SHOTS, REAL_LABEL (file name prefix).import { writeFileSync, readFileSync, mkdirSync } from 'node:fs';import { join } from 'node:path';import { launchBrowser } from './cdp.mjs';process.env.HL_CHROME ||= '/opt/google/chrome/chrome';const PORT = Number(process.env.REAL_PORT || 8730), BASE = `http://127.0.0.1:${PORT}`;const SID = readFileSync(process.env.REAL_SID_FILE, 'utf8').trim(), SHOTS = process.env.REAL_SHOTS, LABEL = process.env.REAL_LABEL || 'x';if (SHOTS) mkdirSync(SHOTS, { recursive: true });const browser = await launchBrowser({ debugPortRange: [Number(process.env.REAL_CHROME || 8729), Number(process.env.REAL_CHROME || 8729)] });const page = await browser.newPage();await page.send('Network.setCookie', { name: 'trackersid', value: SID, url: BASE });const ev = (e) => page.evaluate(e);const hydrated = () => page.waitFor('!!window.__hl && window.__hl.socket && window.__hl.socket.readyState === 1 && document.readyState === "complete"', { timeout: 120000, label: 'hydrated' });const open = async (path) => { const t = Date.now(); await page.goto(BASE + path, { timeout: 120000 }); await hydrated(); return Date.now() - t; };const shot = async (name, full) => {if (!SHOTS) return;for (const [w, h, m] of [[390, 844, true], [1280, 900, false]]) {await page.send('Emulation.setDeviceMetricsOverride', { width: w, height: h, deviceScaleFactor: 1, mobile: m });await new Promise(r => setTimeout(r, 300));const opts = { format: 'png' };if (full) { const hh = await ev('document.documentElement.scrollHeight'); opts.clip = { x: 0, y: 0, width: w, height: Math.min(hh, 6000), scale: 1 }; opts.captureBeyondViewport = true; }writeFileSync(join(SHOTS, `${LABEL}-${name}-${w}.png`), Buffer.from((await page.send('Page.captureScreenshot', opts)).data, 'base64'));}await page.send('Emulation.clearDeviceMetricsOverride', {});};const out = {};try {await open('/my/series');out.mySeries = JSON.parse(await ev(`JSON.stringify(Array.from(document.querySelectorAll('my-show-row')).filter(r => /Reacher|Archive 81|Flight Attendant|Raised by Wolves/.test(r.textContent)).map(r => [r.querySelector('a.myshow-title').textContent, r.querySelector('a.myshow-title').getAttribute('href'), (r.querySelector('my-show-episode') || {}).textContent || '']))`));out.mySeriesRows = await ev(`document.querySelectorAll('my-show-row').length`);await shot('my-series');const seasons = () => ev(`JSON.stringify(Array.from(document.querySelectorAll('season-row')).map(r => r.querySelector('season-label').textContent + ': ' + r.querySelector('season-count').textContent + ' ' + ((r.querySelector('button.checkicon') || {}).getAttribute ? r.querySelector('button.checkicon').getAttribute('class') : '')))`);await open('/series/Reacher');out.reacher = JSON.parse(await seasons());await shot('reacher', true);await open('/my/unwatched');out.unwatchedReacher = JSON.parse(await ev(`JSON.stringify(Array.from(document.querySelectorAll('unwatched-row')).filter(r => /Reacher/.test(r.textContent)).map(r => r.querySelector('unwatched-episode').textContent))`));out.unwatchedRows = await ev(`document.querySelectorAll('unwatched-row').length`);await shot('my-unwatched');out.archiveLoad = await open('/series/Archive-81');out.archive = { h1: await ev(`(document.querySelector('show-header h1 type-name') || {}).textContent`), seasons: JSON.parse(await seasons()), path: await ev('location.pathname') };await shot('archive-81', true);await open('/search/archive%2081');out.search = JSON.parse(await ev(`JSON.stringify(Array.from(document.querySelectorAll('a.search-title')).map(a => a.textContent + ' ' + a.getAttribute('href')))`));await shot('search-archive');for (const p of ['/shows/The-View', '/shows/EastEnders', '/series/EastEnders']) {const r = await fetch(BASE + p, { redirect: 'manual' });if (r.status === 200) { out.talkPath = p; break; }if (r.status === 301) { out.talkPath = r.headers.get('location').replace(BASE, ''); break; }}if (out.talkPath) {out.talkLoads = [];for (let i = 0; i < 3; i++) out.talkLoads.push(await open(out.talkPath));out.talkSeasons = await ev(`document.querySelectorAll('season-row').length`);await shot('talk');}} catch (e) { out.error = String(e.stack || e); }console.log(JSON.stringify(out, null, 1));await browser.close();process.exit(out.error ? 1 : 0);
Branches
Latest commits
- 593dab6fmission 043: report, LOGmre
- 1a5a4818boot scans back to iterate (slices measured slower: titles 114 s, episodes 141 s, persons failed); lambda per rowmre
- 03d29893boot scans read primary-key slices (lib/slices.hl from mission 044): iterate is eager too; people view log line back; allShows/allEpisodes stay for toolsmre
- 0d6293ebmission 043: mission filemre
- 55bbd619boot: one streamed pass per table (lib/bootscan.hl) instead of find(null,null) per module; follows/watches/franchises scans streammre
- 1d465d3ere-vendor plugins to Hybriel master f9614007 (mpackdb #202 copy fix, libmpackdb sha 6fb3b9d6)mre
- 6648ba44mission 042: real-browser E2E on ce6f2e0a re-vendor 69/0 at 390 + 1280mre
- 3ed3a0efmission 042: gates old/new equal (browser #41 route-table regex accepts unescaped hl:web output), real-data TTFB, E2E blocked by lisbeth lockmre
- d5b61e90LOG 042mre
- 4acdbaccmission 042: memory comparison old vs ce6f2e0a (stopped: warm VmHWM higher), reportmre
- d0f620d6mission 042: re-vendor Hybriel ce6f2e0a (plugins incl. mpackdb; bin runtime built from the same archive, git-ignored), compact=false keptmre
- 5bd14e12mission 040: theme 76f99f6 gates + E2E green; 44 px fixes (skeleton row, type-word, genre-link/pill); README, reportmre
- 77cfa45cmission 040: partial report (theme/modal/pagination re-copied, tilelist onPage, 44 px taps; gates new + E2E pending)mre
- 4b14822fe2e-theme: menu marker by colourmre
- 09780f4emission 040 WIP: theme, modal, pagination, tokens re-copied from layouts 76f99f6; tilelist uses onPage; tap sizes 44 px for tracker's own small buttons; tests/e2e-theme.mjsmre
- fb80bb8chotfix: open the 5 show stores without compaction (compact = false) — compact-on-open left another handle on stale offsets, every read gave a bare Number (hybriel mpackdb refresh after a shrink); live down 2026-10-20 05:11mre
- e00d3bf7paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
- a8c7f234tracker#36 (mission 039): tools/tmdb-check.hl survives a dropped connection (on Error, asked again, failed lines) and resumes with --from N; tests/tmdbcheck.mjs 6/6 against a fake TMDBmre
- 9c230516mission brief w39mre
- 3609121dmission 038 docs + report (quota stop): README/kinds.md for #43 #42 #36, STATUS, LOG; HEAD browser gate 374/8 in the in-app daily run block (hour-boundary suspected, rerun pending), other gates green; #36 real run needs TMDB_READ_TOKENmre