fix: run the layer validator without resolving packages

Đang mở
#47 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart
Lĩnh vực
tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Dart
Star
7
Fork
2
Merge trung bình
9 giờ 59 phút
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của VeryGoodOpenSource/vgv-ffca-plugin

Tất cả issue của VeryGoodOpenSource/vgv-ffca-plugin

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.