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

Aperta
#582 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@antonwolfy ci sta già lavorando.

Dal 10/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
Python
Stelle
11
Fork
9
Merge medio
1g 9h
PR unite (30g)
426

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di intel/dokimi

Tutte le issue di intel/dokimi

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.