Coverage for src/romfarmer/planner/passes/__init__.py: 100%

12 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-09-05 02:19 -0700

1"""romfarmer.planner.passes — pure planner passes. 

2 

3Each pass has the signature:: 

4 

5 run( 

6 catalog: Catalog, 

7 manifest: BuildManifest, 

8 kb: KnowledgeBase, 

9 cost_model: CostModel, 

10 ) -> PassResult 

11 

12All passes are **pure**: no filesystem access, no symlinks, no database writes. 

13They receive all inputs as arguments and return a new ``Catalog`` + a 

14``PassTrace`` (the audit log that powers ``romfarmer plan --explain``). 

15""" 

16 

17from .arcade import run as arcade 

18from .budget import run as budget 

19from .curated_lists import run as curated_lists 

20from .dat_dedup import run as dat_dedup 

21from .dat_filter import run as dat_filter 

22from .generation import run as generation 

23from .one_g_one_r import run as one_g_one_r 

24from .rating import run as rating 

25from .region import run as region 

26from .sample import run as sample 

27 

28# Canonical order for a single-platform build. The orchestrator and the 

29# `plan` CLI both use this so `plan --explain` predicts exactly what `build` 

30# does. `generation` is cross-platform and is run by the driver separately. 

31DEFAULT_PASSES = [ 

32 region, 

33 dat_filter, 

34 dat_dedup, 

35 one_g_one_r, 

36 arcade, 

37 rating, 

38 curated_lists, 

39 budget, 

40 sample, 

41] 

42 

43__all__ = [ 

44 "DEFAULT_PASSES", 

45 "region", 

46 "dat_filter", 

47 "dat_dedup", 

48 "one_g_one_r", 

49 "arcade", 

50 "rating", 

51 "curated_lists", 

52 "generation", 

53 "budget", 

54 "sample", 

55]