audit-formats: derive the disposition shape from the writer so a branch-only member cannot escape the fingerprint

オープン
#342 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
49/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
backend

調査の方向性

Start with CanonicalWith and result.CanonicalDispositionShape, then read the review record on #341 and the audit-formats work in #327. Change how the disposition shape is declared so a writer member cannot exist outside that shape, and mutation-check the B1, B2 and B6 cases. Also inspect the status.json pin check and release checklist; done means the shape cannot drift from the writer and the released value is tied to the pin or the manual step is named.

索引モデルが issue の本文から書いたものです。

説明

Follow-up from the pre-release review of #341 (the v0.39.0 final prep). The review record on #341 has the details.

The gap

audit-formats (#327) fingerprints the persisted disposition through result.CanonicalDispositionShape. The shape is kept by hand and checked against the writer only through three exemplar dispositions run through CanonicalWith. Every member CanonicalWith can emit today is declared, and the exemplars take every current branch. A future member behind a branch no exemplar takes would still pass the check, though:

  • B1: a member whose presence depends on the input, at the disposition's top level. This also passes the audit tests, so nothing in CI sees it.
  • B2: the same kind of member inside a route item.
  • B6: a nested map inside handoff.

No current writer path escapes, so nothing persisted today is unfingerprinted.

Fix

Have CanonicalWith build the shape struct itself, or derive the declared shape from the writer's types, so the shape and the writer cannot drift. Then a member can only be written if it is declared. Mutation-check it with B1, B2 and B6.

Also (LOW)

The released change-record pin in status.json (count plus digest) is a manual release step. The check does not tie it to each format's released value. Tie the two, or make the release checklist name the step.

主要言語
Go
スター
2
フォーク
6
平均マージ
2時間 22分
マージ済み PR(30日)
89

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Judgment-Pack/judgment-pack-runtime のほかの issue

Judgment-Pack/judgment-pack-runtime の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。