ci: nothing checks images/og-card.jpg still matches build-og-card.mjs
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 50/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- github-actions, javascript, nodejs
- Ambito
- build-system, ci-cd
Direzione di ricerca
Leggi scripts/build-og-card.mjs, render.yml, css.yml e la discussione correlata a #171; esegui prima npm run og-card e confronta l’immagine generata con images/og-card.jpg. Stabilisci se un confronto byte-exact o percettivo è affidabile su CI, quindi integra il controllo nel workflow. Il lavoro è completato quando CI rileva un JPEG committato non aggiornato senza risultati instabili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Split out of the #168 review.
assets/css/main.css is generated-and-committed, and css.yml runs npm run css:check so the committed output can't go stale. images/og-card.jpg is generated-and-committed the same way by scripts/build-og-card.mjs, and nothing checks it at all — the script's own header says so:
Not part of CI, and nothing checks the committed JPEG still matches this source: run it by hand after changing the headshot or the wording, and commit the result alongside.
So editing NAME, DOMAIN, ROLES or the card's CSS and forgetting npm run og-card leaves the site shipping the old card, and the only signal is someone looking at a LinkedIn preview. The same edit silently desynchronises og:image:alt, which names the roles the card prints.
This is checkable: during the #168 review, npm run og-card reproduced the committed images/og-card.jpg byte for byte (md5 17932ab290c6e059a50d7a79e56ecabe), so a css:check-style hook is viable in principle:
"og-card:check": "npm run og-card && git diff --exit-code -- images/og-card.jpg"
Two things to settle before wiring it up:
- Is byte-exactness reproducible off this machine? It was stable across four local runs, but it depends on the Chrome build's text rasterisation and on libvips/mozjpeg versions. If a CI runner's Chrome differs, a byte comparison will flap. A perceptual comparison (decode both, compare mean absolute difference under a threshold) would be robust where a byte check isn't.
- Where it runs. It needs Chrome and it writes into the repo tree, so it fits
render.yml(which already has Chrome) better than a pre-commit hook.
Related: #171 tracks sharing the headless-Chrome plumbing between check-render.mjs and build-og-card.mjs; doing that first would make this cheaper.
- Lingua principale
- HTML
- Stelle
- 0
- Fork
- 0
- Merge medio
- 8h 17m
- PR unite (30g)
- 58
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di laywill/laywill.github.io
-
design
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
laywill/laywill.github.io#186 ·
-
design
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
laywill/laywill.github.io#183 · 1 commento ·
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 74/100
laywill/laywill.github.io#135 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
laywill/laywill.github.io#106 ·
-
infra needs-william
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
laywill/laywill.github.io#35 · 1 commento ·
Tutte le issue di laywill/laywill.github.io
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
CS0162 "Unreachable code detected" warning from a MSBuildTemp .tmp file in every game project Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
area:engineering priority:p2 type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jejjohnson/pyrox#234 ·
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
ros2/ros2_tracing#266 · 1 commento ·