Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

已关闭
#286 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@andy-zen-dev 已经在做这个了。

开始于 2026年10月22日。

  • #288 来自 @andy-zen-dev —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, json, python
领域
backend, data, testing

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Python
星标
4
派生
0
平均合并
1 天 8 小时
30 天内合并 PR
36

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

drevendev/Scriptorium 的其他 Issue

查看 drevendev/Scriptorium 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。