Repository navigation
fix: exclude .claude/artifacts exact entry from permission-profile fixture copytree - #2103
Conversation
…xture copytree (#2078) `_fixture_repo()` in test_codex_permission_profile_config.py excluded a top-level "artifacts" entry, which does not match the nested `.claude/artifacts/` tree. Since `.claude/artifacts/issue-refinement-loop/<issue>/` is continuously rewritten by run_refinement_preflight.py during CI's parallel test execution, copying it via shutil.copytree() could intermittently raise shutil.Error for a file that vanished mid-copy. Add an exact entry ".claude/artifacts" to exclude_relpaths (no prefix matching introduced), update the _fixture_repo() docstring to clarify this is a fixture-local measure and not a repository-wide disposable-policy statement (since .claude/artifacts also holds committed historical/evidence assets), and add a new regression test file tests/codex/test_fixture_repo_artifact_exclusion.py verifying the exclusion behaviorally. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2103/ The preview will be removed when this PR is closed. |
CI の node-backed-hook-tests job にある uncovered_changed_test_files gate (G1) が、PR #2103 で追加した新規テストファイル tests/codex/test_fixture_repo_artifact_exclusion.py を検出できず FAIL していた。.github/ci/python-test-plan.json の targets 配列に 1行追加のみで登録する(dedicated_lanes / secondary_coverage / スケジューラ等は変更しない)。Issue #2078 iteration 3 Scope Delta (人間 OWNER 承認済み)に基づく修正。
結論判定: PR #2103 の実装修正そのもの、つまり P2 — regression test が「他の
|
PR #2103 への OWNER レビュー (REQUEST_CHANGES) 対応。 test_fixture_repo_excludes_claude_artifacts は `.claude/artifacts` が コピー先に存在しないことのみ検証しており、`.claude` ディレクトリが 存在すること (`is_dir()`) しか確認していなかった。これでは `.claude` 配下を丸ごと空にして残す壊れた実装でも PASS してしまう。 実在する安定した `.claude` 配下ファイル (`.claude/skills/issue-refinement-loop/scripts/run_refinement_preflight.py`) がコピー先に実ファイルとして存在することを検証する assertion を追加し、 「`.claude/artifacts` は除外される」「他の `.claude` 配下は引き続き コピーされる」の両方を behavioral に検証するようにした。
|
OWNER レビュー(P2×1, REQUEST_CHANGES)に対応しました。 修正内容
これにより、以下の両方を behavioral に検証します。
修正前は 検証結果commit: b60598e |
概要
test_codex_permission_profile_config.pyの_fixture_repo()が使うexclude_relpathsは、トップレベル"artifacts"エントリのみを含んでおり、ネストされた.claude/artifacts/パスにはマッチしなかった。.claude/artifacts/issue-refinement-loop/<issue>/は CI 並列実行下でrun_refinement_preflight.pyが継続的に書き込む volatile な writer subtree であり、shutil.copytree()によるコピー中に稀にshutil.Errorを引き起こしうる。本 PR は
exclude_relpathsに exact entry.claude/artifactsを追加し(prefix matching は導入しない)、_fixture_repo()docstring を更新して、この除外が fixture-local な措置であり.claude/artifactsを repository-wide に disposable と定義するものではないことを明記する。あわせて除外挙動を検証する新規テストファイルtests/codex/test_fixture_repo_artifact_exclusion.pyを追加した。本 Issue をクローズする: Closes #2078
変更内容
tests/codex/test_codex_permission_profile_config.py:_fixture_repo()のexclude_relpathsに exact entry.claude/artifactsを追加し、docstring を更新(fixture-local な措置であることを明記)tests/codex/test_fixture_repo_artifact_exclusion.py(新規):test_fixture_repo_excludes_claude_artifactsを追加し、.claude/artifactsがコピー先に存在しないこと、他の.claude配下は引き続きコピーされることを検証検証コマンド結果
Allowed Paths 遵守
変更ファイルは Issue #2078 の Allowed Paths と完全一致:
tests/codex/test_codex_permission_profile_config.pytests/codex/test_fixture_repo_artifact_exclusion.py(新規ファイル).github/ci/python-test-plan.json(Scope Delta、iteration 3、人間 OWNER 承認済み。CI のuncovered_changed_test_filesgate(G1)が新規テストファイルtests/codex/test_fixture_repo_artifact_exclusion.pyを検出できず FAIL していたため、targets配列への1行追加のみを行った。dedicated_lanes/secondary_coverage/ スケジューラ等は変更していない)Runtime Verification Applicability