eager_eye 1.2.14 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 102d5299d625a885f2916d113d68a966cfb6c261bcebb8e5caf53f7d497c2a97
4
- data.tar.gz: 64e954f730dc260001a80540e6304aeed6c0838e6f003ea6c39dd166b93850ae
3
+ metadata.gz: b938ac5233658e3dcec2b8e6a45a9f33248673e8a0a615d52dbbdbcb8700a9b9
4
+ data.tar.gz: dc0dff8a86a8381236e355bc65b00c589483272e3dbef07f9d8053ed2428f452
5
5
  SHA512:
6
- metadata.gz: 39a182c18271764a2258a2d5f416cd1c44dba5c1d18c11b74fd2ab6025d36569cf28778320cf66cb2c935f501e3310f8fdae7b74e550b6bdf24f9e28e2680c83
7
- data.tar.gz: 85297df8068df3aa88d2a69be379d8139850b82841cb98f90899e418fdff93cd360ea54f5c94a0d6722ab81b315cc3805c13bb66645d7f64a58e9f9dff6e826c
6
+ metadata.gz: 30dbbb1acb97020776653f681407ec30de7391ad186f7d6748e3ad29f902d8370b647897641ea7835d4a0974484addc6da84f0053c945d9743e23ec340ab55d6
7
+ data.tar.gz: 4e20c5b19d82859f8dba12657ebdd8eef8d8ec61b909aedf73a30268d49077bfde6bf1a3252e32393a64c66fb98af69689ad15f62c85d4387bf660764d14c680
data/CHANGELOG.md CHANGED
@@ -7,6 +7,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.0] - 2026-05-20
11
+
12
+ ### Added
13
+
14
+ - **`--baseline FILE` flag** — compare the current scan against a previously
15
+ captured JSON report and surface only issues that are NOT in the baseline.
16
+ Designed for the brownfield CI workflow: accept existing N+1s as the
17
+ baseline, fail builds only on regressions (new issues introduced by a PR).
18
+ Baseline files are produced by the existing `--format json` output (the
19
+ flag accepts either the full report-shaped object or a bare array of
20
+ issues). Malformed/missing baselines exit with a clear error message.
21
+ - **`EagerEye::Issue.from_h(hash)`** — public factory that rebuilds an
22
+ `Issue` from its serialized form (e.g. a parsed JSON entry). Coerces
23
+ `detector`/`severity` strings back to symbols and defaults severity to
24
+ `:warning` when absent. Round-trips through `to_h` and `to_json`.
25
+ - **`EagerEye::Baseline`** — the helper behind `--baseline`. Loads issues
26
+ from a JSON path (`Baseline.load_issues(path)`) and filters a current
27
+ issue list against them (`Baseline.filter(issues, path)`). Useful
28
+ programmatically for projects that wrap EagerEye in their own runner.
29
+
30
+ ## [1.2.15] - 2026-05-01
31
+
32
+ ### Fixed
33
+
34
+ - **Per-method scope for variable preload tracking** — `LoopAssociation` and
35
+ `CustomMethodQuery` now process each `:def`/`:defs` body as an independent
36
+ scope. Previously a later assignment in another method (e.g.
37
+ `invoices = Invoice.includes(:invoice_items).where(...)` inside one action)
38
+ could overwrite the preload set for the same variable name in an earlier
39
+ action, producing false N+1 warnings on associations that were actually
40
+ preloaded. Each scope now inherits a snapshot from the enclosing scope but
41
+ its own writes do not leak back out.
42
+ - **Caller-method preload tracking** — `LoopAssociation` and
43
+ `CustomMethodQuery` now propagate preload/model context across method calls
44
+ within the same class. When `def index` does
45
+ `items = Foo.includes(:bar); prepare_data(items)` and `def prepare_data(items)`
46
+ iterates the parameter, the `:bar` association is now correctly recognized
47
+ as preloaded. Previously every helper method that received a relation by
48
+ parameter produced false positives because the parameter had no preload
49
+ context.
50
+ - Sibling defs in the same scope are processed in two passes: first to capture
51
+ each `self`-call's argument context, then to seed the callee's parameters
52
+ before analyzing its body. Multiple call sites are merged permissively (any
53
+ caller preloading suppresses the warning) to avoid false positives at the
54
+ expense of potentially missing helpers that have BOTH preloaded and
55
+ unpreloaded callers.
56
+
10
57
  ## [1.2.14] - 2026-05-01
11
58
 
12
59
  ### Fixed (false-positive reduction pass)