trace: safely snapshot tracked paths below ignored directories

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

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

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

評価

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

調査の方向性

Start by reading issue #3625 and PR #3631 to understand the existing worktree snapshot behavior, then locate the walker and its race enabled tests. Trace how it applies .gitignore and identifies tracked paths; add coverage for the listed ignored directory, intent-to-add, symlink, path confinement, and special file cases. Done means all acceptance criteria pass without scanning unrelated ignored content or opening non-regular files.

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

説明

bug chainloop component/CLI trace-provider

Context

Follow-up to #3625 and PR #3631. The PR is restoring the existing worktree snapshot behavior from main while narrowing its same-call fix, following maintainer review.

The existing walker prunes directories matched by .gitignore. A force-added tracked file below such a directory can therefore be absent from the snapshot.

Scope

  • include tracked regular files below ignored directories without scanning unrelated ignored content;
  • keep untracked ignored paths excluded;
  • define the interaction with intent-to-add entries tracked in #3698;
  • reject symlinked path components and final symlinks;
  • avoid opening FIFOs, devices, sockets, and other non-regular files;
  • keep every read confined to the checkout root.

Expected behavior

Tracked regular files receive correct before/after snapshots even below ignored directories. Expanding coverage must not allow path traversal outside the checkout or block on special files.

Acceptance criteria

  • A force-added tracked file below an ignored directory is snapshotted and compared.
  • An untracked ignored sibling is not snapshotted.
  • Intent-to-add paths follow the semantics decided in #3698.
  • Escaping and in-repository symlink ancestors are not followed.
  • FIFOs and other non-regular files are checked before open and skipped.
  • Race-enabled tests cover ignored-directory and path-safety behavior.
主要言語
Go
スター
582
フォーク
61
平均マージ
12時間 47分
マージ済み PR(30日)
137

環境構築

はじめの一歩

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

chainloop-dev/chainloop のほかの issue

chainloop-dev/chainloop の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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