Nested Proteome layer metadata can leave a stale cached identity
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the Proteome identity, layers, save/load, and composition implementations, then inspect tests covering identity and metadata snapshots. Reproduce the supplied example and check other identity-bearing fields for shared mutable input. Done means nested metadata and supplied dictionaries cannot leave a stale identity, while save/load and composition preserve exact metadata and consistent identities.
索引モデルが issue の本文から書いたものです。
説明
On published ORFdata 0.42.6, nested dictionaries in Proteome.layers remain mutable after Proteome.identity has been cached. Mutating them changes the serialized content, but the identity property continues returning the old hash. This contradicts the documented contract that identity changes whenever content does.
Reproduction (no downloads):
from pathlib import Path
from tempfile import TemporaryDirectory
from orfdata import Proteome, ReferenceContext
context = ReferenceContext(10090, "mus_musculus", "GRCm39", "ensembl", "115")
proteome = Proteome(context, [], [dict(
role="host", kind="extra_orf", source="fixture", reference=context.key,
catalog={"records": 1},
)])
before = proteome.identity
proteome.layers[0]["catalog"]["records"] = 2
with TemporaryDirectory() as directory:
saved = proteome.save(Path(directory) / "host.json.gz")
assert proteome.identity == before
assert saved != before
The top-level layer mapping is read-only, but its nested JSON is not. Source provenance or selection metadata can therefore diverge from an already consumed/cached identity without any sequence change. Please make identity-bearing nested metadata immutable, or otherwise ensure supported mutations invalidate the identity. Preserve deterministic snapshots and the ordinary composition API.
Acceptance: nested catalogue/evidence/selection changes cannot leave a stale identity; supplied input dictionaries cannot mutate a constructed proteome; save/load and composition retain exact source metadata and consistent identities. Check other identity-bearing fields for the same aliasing issue.
Found during review of openvax/vaxrank#761. That PR makes an independent deep copy of its frozen coverage record; it does not change ORFdata's identity model. Vaxrank already rejects a snapshot whose saved identity differs from the identity it validated.
- 主要言語
- Python
- スター
- 1
- フォーク
- 1
- 平均マージ
- 10時間 11分
- マージ済み PR(30日)
- 51
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openvax/orfdata のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
openvax/orfdata#194 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 1 日以内に返信
openvax/orfdata の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pearu/agent-sandbox#451 ·
メンテナーはふだん 1 日以内に返信
-
run_gate loads a custom tasks file from outside the working directory対応中かも @Ru0k3 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MakazhanAlpamys/Soup#3189 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NYCPlanning/data-engineering#2996 ·
メンテナーはふだん 1 日以内に返信