fix: run the layer validator without resolving packages

Aperta
#47 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Dart
Stelle
7
Fork
2
Merge medio
9h 59m
PR unite (30g)
7

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 VeryGoodOpenSource/vgv-ffca-plugin

Tutte le issue di VeryGoodOpenSource/vgv-ffca-plugin

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.