Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

SCRIP-METRIC-004: validate derived source units before repinning public gallery

Fermée
#286 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@andy-zen-dev y travaille déjà.

Depuis le 22/10/2026.

  • #288 par @andy-zen-dev — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
github-actions, json, python
Domaine
backend, data, testing

Piste de recherche

Read scriptorium/full_work_gallery.py, the current metric schema, and the pinned Beketova source JSON on fresh master; check whether #278 has already implemented and validated this behavior before starting. Add repin-aware negative tests showing that swapped unit values fail even when source bytes and their Git blob hash change, while preserving the ten-row declaration and Grin diagnostic rows. Run the full canonical tests and installed gallery CI; done means those pass and the stated chart, source identity, M2, and translation boundaries remain intact.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Latent contract mismatch in pinned full-work gallery

In the merged scriptorium/full_work_gallery.py (source blob e3d94d8c8290f8954325a28206aeb416a770a13a) the renderer declares display units for ten supported metrics but does not independently verify the unit field in a newly approved Beketova derived JSON. The two current pinned Git blobs are correct: local audit of source units was 10/10. The issue is a future-repin integrity regression: changing source data plus its reviewed hash could leave unit: ratio displayed as %.

Existing staged handoff, not yet published

/mnt/data/Scriptorium-Gallery-Unit-Contract-20261021.zip (local archive provided in chat) includes apply_unit_contract.py and 3 repin-aware negative tests. It was prepared for the old #276 head 61a32b6...; now #276 is merged. Its original GitHub update_file was denied, and the handoff's 3/3 smoke tests do not substitute for canonical CI. Do not replay the denied mutation unchanged or switch endpoints to circumvent it.

Acceptance

  • Revalidate against fresh master, existing source JSON and current metric schema; preserve the same ten-row declaration (no second registry).
  • Match Beketova unit to the canonical declared source unit (percent maps to display %, words to display types for unique forms, occurrences/1000_words to the display rate). Grin's diagnostic rows do not have this field and must not be assigned invented source units.
  • Negative tests with deliberately repinned source JSON detect swapped percentage/rate/count units even when the new Git blob hash matches changed bytes.
  • Keep full-work chart/chart units, pinned source identity, M2 0/5 and translation boundaries. Full canonical tests and installed gallery CI must pass before merge.
  • Scope only a later independently selected unit; no duplicate issue if #278 has already implemented and validated this behavior.
Langage dominant
Python
Étoiles
4
Forks
0
Merge moyen
1 j 8 h
PR mergées (30 j)
36

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de drevendev/Scriptorium

Toutes les issues de drevendev/Scriptorium

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.