tracker
All repositories: gitoria
2.5 KB
// tools/check-public-slugs.hl — mission 056, the REAL-DATA check (not the gate). ONLY on a COPY or a stopped app (one process// per storage, hybriel#21). Reads SLUGS (a file: the /shows/<slug> slugs that tests/realdata-056.mjs collected from the// public pages, separated by single spaces — hl strings have no newline escape) and prints how many are adult true / false// / unknown / missing; then the adult titles a user follows (USER_ID, optional) and the poster files of adult vs other titles.// TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb SLUGS=/tmp/w056/real/slugs.txt USER_ID=0mujqspn0aqb ./bin/hybriel tools/check-public-slugs.hlimport { MPackDB } from 'hl:mpackdb'import { env } from 'hl:proc'import { readFile, exists } from 'hl:fs'dir = env('TRACKER_STORAGE')shows = new MPackDB(file = dir + '/shows.db', primaryKey = '@id', indexes = ['!oldId'])follows = new MPackDB(file = dir + '/follows.db', primaryKey = '@id', indexes = ['!oldId'])bySlug = {}byId = {}adultPosters = 0adultNoPoster = 0otherPosters = 0for (s of shows.find(null, null)) {bySlug[s.urlSegment] = sbyId[s.id] = slet file = s.oldId != null && s.image != null && s.image != '' ? dir + '/posters/' + s.oldId + '.' + s.image : nulllet has = file != null && exists(file)if (s.adult == true) { if (has) { adultPosters = adultPosters + 1 } else { adultNoPoster = adultNoPoster + 1 } } else if (has) { otherPosters = otherPosters + 1 }}slugFile = env('SLUGS')if (slugFile != null && slugFile != '') {counts = { notAdult = 0 adult = 0 unknown = 0 missing = 0 }bad = []let n = 0for (line of readFile(slugFile).split(' ')) {let slug = line.trim()if (slug != '') {n = n + 1let s = bySlug[slug]if (s == null) { counts.missing = counts.missing + 1 bad.push('missing ' + slug) }else if (s.adult == false) { counts.notAdult = counts.notAdult + 1 }else if (s.adult == true) { counts.adult = counts.adult + 1 bad.push('ADULT ' + slug) }else { counts.unknown = counts.unknown + 1 bad.push('unknown ' + slug) }}}print('slugs=' + n + ' notAdult=' + counts.notAdult + ' adult=' + counts.adult + ' unknown=' + counts.unknown + ' missing=' + counts.missing)for (b of bad) { print(' ' + b) }}uid = env('USER_ID')if (uid != null && uid != '') {for (f of follows.find(null, null)) {let s = byId[f.show]if (f.user == uid && s != null && s.adult == true) { print('followed adult: ' + s.urlSegment + ' (' + s.title + ')') }}}print('posters: adult titles with a file=' + adultPosters + ' without=' + adultNoPoster + '; other titles with a file=' + otherPosters)
Branches
Latest commits
- 8d3b0f20widget: the franchise link's 44 px tap area no longer overlaps the Prequel/Sequel rowmre
- 1d98dcfdbrowser gate: the badges' size check reads the padding box (the 44 px tap area is transparent border)mre
- 2f9e29ffreports/MK-mobile.md, deploy.sh GATES: tests/mobile.mjs, theme check markermre
- 7cfc8ab5a season of more than 150 episodes starts closed on its title page; the phone gate checks itmre
- 59095c59tests/mobile.mjs: the phone gate (390 px touch, tap targets, /franchises paging)mre
- 105309detap targets: every row link, the TMDB/IMDb badges, the widget links, the franchise names and the login-failed link are 44 px high on a phonemre
- f0b86c8efranchises: 40 loose timelines per page (/franchises/page/N) and a merge sort for the names (1,546 timelines: 20 s and 54,000 px before)mre
- b9e841a7Merge branch 'sy-sync'mre
- d1ae2701sync components.hybriel 4922f9c: modal and pagination 44 px targets (vendored copies, verbatim) (SY)mre
- 043624b2theme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
- 05d89fd0deploy: security gate (tests/security.mjs)mre
- 2ae8a47bMerge branch 'sk-sec'mre
- 8fee5d52sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
- 944ad51eSK: report reports/SK-sec.md, LOGsk
- 415487c1SK: import budget per user + id type check, gate checkssk
- 7b8a4f74security audit SK: nosniff + image sandbox headers, face id checks, adult follow, login budget + new session at login, guest-link budget, tests/security.mjssk
- f0f26c5areports: T18 section (gates, boot-gate, 3x3 table, search + short-id compare)mre
- 2a8682a1deploy.sh GATES: tests/warmstart.mjsmre
- 3761338breports/T17-boot.md: handoff (phase table, fix, numbers so far, open proof)mre
- 52e09eb2boot: sync window 1000 ms (the gates ask for a complete start), README boot-time sectionmre