fix: run the layer validator without resolving packages

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
dart
領域
tooling

調査の方向性

Start with scripts/validate_layers.dart, scripts/pubspec.yaml, and the command references in agents/ffca-layer-auditor.md and skills/ffca-audit/SKILL.md; then inspect the Layer Validator CI job and hooks/validate_layers_test.sh. Run the hook from a clean temporary directory and check whether it resolves packages or writes files. Done means the validator runs without those side effects, its tests still run in CI, and the hook and CLAUDE.md describe the behavior.

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

説明

bug

Description

The validator is written to need only the Dart SDK: it imports only dart:io, and the README says "no dart pub get required". But scripts/pubspec.yaml, which exists only so the tests can use package:test, sits next to validate_layers.dart. dart run resolves the closest pubspec, so on its first run the hook resolves package:test and its dependencies. It fetches them from pub.dev when they aren't cached, and it writes .dart_tool/ and pubspec.lock into the installed plugin's scripts/ folder.

The directory's security scan flags network calls and file writes the README doesn't describe. Removing the resolution step keeps the hook offline and leaves the plugin folder unchanged, so the README can keep its current claim.

The same command runs from agents/ffca-layer-auditor.md and skills/ffca-audit/SKILL.md with --all.

Steps To Reproduce

  1. Copy scripts/validate_layers.dart and scripts/pubspec.yaml into an empty folder.
  2. From another folder, run dart run <folder>/validate_layers.dart --all.
  3. <folder> now holds .dart_tool/ and a pubspec.lock that lists package:test and its dependencies.

Expected Behavior

  • Running the validator from the hook, the skill or the agent resolves no packages, makes no network calls and writes no files
  • The validator tests still run in CI under the Layer Validator job
  • hooks/validate_layers_test.sh and the ## Hooks section of CLAUDE.md match the new behavior
  • All CI/CD checks are passing

Additional Context

  • Pre-submission checklist: "Describe in the README everything the plugin runs, sends, or fetches."
  • Found on Dart 3.13.5. dart run has no option to skip the resolution step.
主要言語
Dart
スター
7
フォーク
2
平均マージ
9時間 59分
マージ済み PR(30日)
7

環境構築

はじめの一歩

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

VeryGoodOpenSource/vgv-ffca-plugin のほかの issue

VeryGoodOpenSource/vgv-ffca-plugin の issue をすべて見る

似ている issue

Dart の issue をもっと見る

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

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