fallow 2.81.0 → 2.83.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.
@@ -1531,8 +1531,8 @@ introduced?: (AuditIntroduced | null)
1531
1531
  /**
1532
1532
  * Wire-shape envelope for an [`UnresolvedImport`] finding. Mirrors
1533
1533
  * [`UnusedFileFinding`]: flattens the bare finding and carries a typed
1534
- * `actions` array (`resolve-import` primary plus `suppress-line`
1535
- * secondary).
1534
+ * `actions` array (`resolve-import` primary plus config and inline
1535
+ * suppression actions).
1536
1536
  */
1537
1537
  export interface UnresolvedImportFinding {
1538
1538
  /**
@@ -2533,8 +2533,8 @@ vital_signs?: (VitalSigns | null)
2533
2533
  health_score?: (HealthScore | null)
2534
2534
  /**
2535
2535
  * Per-file health scores. Only present when --file-scores is used. Sorted
2536
- * by maintainability_index ascending (worst first). Zero-function files
2537
- * (barrels) are excluded by default.
2536
+ * by risk-aware triage concern, combining low maintainability and high
2537
+ * CRAP risk. Zero-function files (barrels) are excluded by default.
2538
2538
  */
2539
2539
  file_scores?: FileHealthScore[]
2540
2540
  /**
@@ -3740,10 +3740,33 @@ untracked_ratio_percent: number
3740
3740
  }
3741
3741
  export interface RuntimeCoverageFinding {
3742
3742
  /**
3743
- * Stable content-hash ID of the form `fallow:prod:<hash>`, where `<hash>`
3744
- * is the first 8 hex characters of SHA-256(file + function + line + 'prod').
3743
+ * Per-finding suppression key of the form `fallow:prod:<hash>` (first 8 hex
3744
+ * of SHA-256(file + function + line + 'prod')). Hashes the current line, so
3745
+ * it changes when the function moves. Use this to suppress one finding.
3745
3746
  */
3746
3747
  id: string
3748
+ /**
3749
+ * Cross-surface join key of the form `fallow:fn:<hash>`
3750
+ * (`fallow_cov_protocol::function_identity_id`, hashes file + name +
3751
+ * start_line). The same function shares ONE value across findings, hot
3752
+ * paths, blast-radius, and importance entries (the per-finding `id` uses a
3753
+ * per-surface salt, so it differs by surface), and across V8, Istanbul,
3754
+ * and oxc producers (columns are excluded from the hash). Like `id`, it
3755
+ * changes when the function's file, name, or start line changes; it is a
3756
+ * cross-surface / cross-producer join key, not a line-move-immune one.
3757
+ * `null` when the producing surface (or an un-migrated cloud) supplied no
3758
+ * `FunctionIdentity`.
3759
+ */
3760
+ stable_id?: (string | null)
3761
+ /**
3762
+ * Content digest of the function's full-span source slice
3763
+ * (`fallow_cov_protocol::source_hash_for`: first 8 bytes of SHA-256 as 16
3764
+ * lowercase hex). Unlike `stable_id`, this is stable across line moves: a
3765
+ * moved-but-unedited function keeps the same value, so baselines can
3766
+ * suppress it after a pure line shift. `null` when the producing surface
3767
+ * supplied no `source_hash`.
3768
+ */
3769
+ source_hash?: (string | null)
3747
3770
  /**
3748
3771
  * File path relative to the project root.
3749
3772
  */
@@ -3825,6 +3848,12 @@ export interface RuntimeCoverageHotPath {
3825
3848
  * Stable content-hash ID of the form `fallow:hot:<hash>`.
3826
3849
  */
3827
3850
  id: string
3851
+ /**
3852
+ * Cross-surface join key (`fallow:fn:<hash>`) for the hot function. Stable
3853
+ * across line moves; shared with the same function's findings / blast /
3854
+ * importance entries. `null` when no `FunctionIdentity` was supplied.
3855
+ */
3856
+ stable_id?: (string | null)
3828
3857
  /**
3829
3858
  * File path relative to the project root.
3830
3859
  */
@@ -3865,6 +3894,12 @@ export interface RuntimeCoverageBlastRadiusEntry {
3865
3894
  * Stable content-hash ID of the form `fallow:blast:<hash>`.
3866
3895
  */
3867
3896
  id: string
3897
+ /**
3898
+ * Cross-surface join key (`fallow:fn:<hash>`) for the function. Stable
3899
+ * across line moves; shared with the same function's findings / hot-path /
3900
+ * importance entries. `null` when no `FunctionIdentity` was supplied.
3901
+ */
3902
+ stable_id?: (string | null)
3868
3903
  /**
3869
3904
  * File path relative to the project root.
3870
3905
  */
@@ -3897,6 +3932,12 @@ export interface RuntimeCoverageImportanceEntry {
3897
3932
  * Stable content-hash ID of the form `fallow:importance:<hash>`.
3898
3933
  */
3899
3934
  id: string
3935
+ /**
3936
+ * Cross-surface join key (`fallow:fn:<hash>`) for the function. Stable
3937
+ * across line moves; shared with the same function's findings / hot-path /
3938
+ * blast-radius entries. `null` when no `FunctionIdentity` was supplied.
3939
+ */
3940
+ stable_id?: (string | null)
3900
3941
  /**
3901
3942
  * File path relative to the project root.
3902
3943
  */
@@ -4939,8 +4980,8 @@ vital_signs?: (VitalSigns | null)
4939
4980
  health_score?: (HealthScore | null)
4940
4981
  /**
4941
4982
  * Per-file health scores. Only present when --file-scores is used. Sorted
4942
- * by maintainability_index ascending (worst first). Zero-function files
4943
- * (barrels) are excluded by default.
4983
+ * by risk-aware triage concern, combining low maintainability and high
4984
+ * CRAP risk. Zero-function files (barrels) are excluded by default.
4944
4985
  */
4945
4986
  file_scores?: FileHealthScore[]
4946
4987
  /**
@@ -1,63 +0,0 @@
1
- const { getPlatformPackage } = require('./platform-package');
2
- const { verifyInstalled, SKIP_ENV } = require('./verify-binary');
3
-
4
- const pkg = (() => {
5
- if (process.platform !== 'linux') {
6
- return getPlatformPackage(process.platform, process.arch);
7
- }
8
-
9
- try {
10
- const { familySync } = require('detect-libc');
11
- return getPlatformPackage(process.platform, process.arch, familySync());
12
- } catch {
13
- return getPlatformPackage(process.platform, process.arch);
14
- }
15
- })();
16
-
17
- if (!pkg) {
18
- console.warn(
19
- `fallow: No prebuilt binary for ${process.platform}-${process.arch}. ` +
20
- `You can build from source: https://github.com/fallow-rs/fallow`
21
- );
22
- process.exit(0);
23
- }
24
-
25
- try {
26
- require.resolve(`${pkg}/package.json`);
27
- } catch {
28
- console.warn(
29
- `fallow: Platform package ${pkg} not installed. ` +
30
- `This may happen if you used --no-optional. ` +
31
- `Run 'npm install' to fix.`
32
- );
33
- // Without the platform package there is nothing to verify; keep the existing
34
- // soft-fail behavior for --no-optional installs.
35
- process.exit(0);
36
- }
37
-
38
- async function main() {
39
- const result = await verifyInstalled();
40
- if (result.skipped) {
41
- console.warn(
42
- `fallow: binary verification skipped (${SKIP_ENV}=${process.env[SKIP_ENV]}). ` +
43
- `Only set this when you are deliberately replacing the published binary. ` +
44
- `See https://github.com/fallow-rs/fallow/blob/main/SECURITY.md for details.`
45
- );
46
- process.exit(0);
47
- }
48
- if (!result.ok) {
49
- const where = result.binary ? ` ${result.binary}` : '';
50
- console.error(
51
- `fallow: binary verification failed${where} (${result.code}): ${result.message}. ` +
52
- `This usually means the published platform package was tampered with. ` +
53
- `See https://github.com/fallow-rs/fallow/blob/main/SECURITY.md for details. ` +
54
- `Set ${SKIP_ENV}=1 only if you are deliberately replacing the binary.`
55
- );
56
- process.exit(1);
57
- }
58
- }
59
-
60
- main().catch((err) => {
61
- console.error(`fallow: binary verification failed (internal-error): ${err.message}`);
62
- process.exit(1);
63
- });