docs/vendor-optimization-loop.md
This is the practical loop for aggressively optimizing dependencies in flow
while keeping Cargo correctness and upstream sync reliability.
f update-deps --dry-run
f vendor-trims
f vendor-rough-audit
f vendor-offenders
f vendor-bench-iter -- --mode incremental --samples 3
One-command loop:
f vendor-optimize-loop
Strict mode (warnings fail):
f vendor-optimize-loop -- --strict
vendor-rough-audit (scripts/vendor/rough_edges_audit.py) checks:
vendor.lock.toml,Cargo.lock (no registry source),history_head, upstream_repository),.vendor/typesense/sources.json freshness),lib/vendor/* or patch entries not in lock).vendor-offenders (scripts/vendor/offenders.sh) shows:
cargo tree -d),vendor-bench-iter (scripts/vendor/bench_iteration.py) provides:
cargo check -q),out/vendor/iteration_bench.jsonl,out/vendor/rough_edges_audit.txtout/vendor/offenders_latest.txtout/vendor/iteration_bench.jsonlThese files make optimization work reviewable and repeatable across sessions.
f vendor-optimize-loop -- --strict --samples 2scripts/vendor/sync-all.sh --important --dry-run).