GitTree.is_file accepts a path that leaves the tree, so a pinned source and an unpinned one disagree on --manifest ../x

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

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

@antonwolfy がすでに取り組んでいます。

2026年11月10日 から。

評価

この issue はまだ評価されていません。

説明

WorkTree raises SourceArgumentError("path escapes the repository: ../outside.yaml") (dokimi/repos/source.py:124) but GitTree.is_file (source.py:217) only tests membership in the commit's file list, so it returns false.

Repro: dokimi eval check <repo> --manifest ../outside.yaml --out out exits 2 with Error: path escapes the repository: ../outside.yaml; dokimi eval check <repo>@<sha> --manifest ../outside.yaml --out out exits 1 with ✗ ../outside.yaml: invalid repo_manifest.v1: and manifest not found. The same holds for repo run, --from replay and --from prs.

Fix options: make GitTree.is_file/is_dir raise SourceArgumentError for a normalised path starting with .. or absolute, as WorkTree does, then update the contract §4.3, §4.6, §4.8 and quickstart.md; or keep the difference and leave the documented wording.

Follow-up from the review of #575: https://github.com/intel/dokimi/pull/575#discussion_r4529643274

主要言語
Python
スター
11
フォーク
9
平均マージ
1日 9時間
マージ済み PR(30日)
426

環境構築

はじめの一歩

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

intel/dokimi のほかの issue

intel/dokimi の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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