Skip to main content

aube_codes/
warnings.rs

1//! Warning codes (`WARN_AUBE_*`).
2//!
3//! Same shape as `errors`: each constant value matches its
4//! identifier; `ALL` carries the [`crate::CodeMeta`] entries the
5//! generated docs page and self-tests consume. Warnings never
6//! change exit status, so `exit_code` is always `None` here.
7
8use crate::CodeMeta;
9
10// ── pnpmfile / hooks ────────────────────────────────────────────────
11pub const WARN_AUBE_PNPMFILE_NOT_FOUND: &str = "WARN_AUBE_PNPMFILE_NOT_FOUND";
12pub const WARN_AUBE_PNPMFILE_STDERR_FORWARDER: &str = "WARN_AUBE_PNPMFILE_STDERR_FORWARDER";
13pub const WARN_AUBE_PNPMFILE_CHECKSUM_FAILED: &str = "WARN_AUBE_PNPMFILE_CHECKSUM_FAILED";
14pub const WARN_AUBE_HOOK_IMPORTER_MUTATED: &str = "WARN_AUBE_HOOK_IMPORTER_MUTATED";
15pub const WARN_AUBE_HOOK_IMPORTER_ADDED: &str = "WARN_AUBE_HOOK_IMPORTER_ADDED";
16pub const WARN_AUBE_HOOK_IDENTITY_REWRITTEN: &str = "WARN_AUBE_HOOK_IDENTITY_REWRITTEN";
17pub const WARN_AUBE_HOOK_PACKAGE_ADDED: &str = "WARN_AUBE_HOOK_PACKAGE_ADDED";
18
19// ── install lifecycle ───────────────────────────────────────────────
20pub const WARN_AUBE_IGNORED_BUILD_SCRIPTS: &str = "WARN_AUBE_IGNORED_BUILD_SCRIPTS";
21pub const WARN_AUBE_DEPRECATED_PACKAGE: &str = "WARN_AUBE_DEPRECATED_PACKAGE";
22pub const WARN_AUBE_DEPRECATED_PACKAGE_SUMMARY: &str = "WARN_AUBE_DEPRECATED_PACKAGE_SUMMARY";
23#[rustfmt::skip] pub const WARN_AUBE_SUSPICIOUS_LIFECYCLE_SCRIPT: &str = "WARN_AUBE_SUSPICIOUS_LIFECYCLE_SCRIPT";
24#[rustfmt::skip] pub const WARN_AUBE_WINDOWS_JOB_OBJECT_UNAVAILABLE: &str = "WARN_AUBE_WINDOWS_JOB_OBJECT_UNAVAILABLE";
25pub const WARN_AUBE_MISSING_INTEGRITY: &str = "WARN_AUBE_MISSING_INTEGRITY";
26pub const WARN_AUBE_CACHE_WRITE_FAILED: &str = "WARN_AUBE_CACHE_WRITE_FAILED";
27pub const WARN_AUBE_CLONE_STRATEGY_FALLBACK: &str = "WARN_AUBE_CLONE_STRATEGY_FALLBACK";
28pub const WARN_AUBE_LTHASH_MISMATCH: &str = "WARN_AUBE_LTHASH_MISMATCH";
29pub const WARN_AUBE_DELTA_INVALIDATE_FAILED: &str = "WARN_AUBE_DELTA_INVALIDATE_FAILED";
30pub const WARN_AUBE_GVS_INCOMPATIBLE: &str = "WARN_AUBE_GVS_INCOMPATIBLE";
31pub const WARN_AUBE_GVS_MODE_CHANGED: &str = "WARN_AUBE_GVS_MODE_CHANGED";
32pub const WARN_AUBE_GVS_CROSS_VOLUME: &str = "WARN_AUBE_GVS_CROSS_VOLUME";
33pub const WARN_AUBE_STORE_PRUNE_ENTRY_DISAPPEARED: &str = "WARN_AUBE_STORE_PRUNE_ENTRY_DISAPPEARED";
34
35// ── settings / config validation ────────────────────────────────────
36pub const WARN_AUBE_INVALID_CONCURRENCY: &str = "WARN_AUBE_INVALID_CONCURRENCY";
37pub const WARN_AUBE_INVALID_TRUST_POLICY: &str = "WARN_AUBE_INVALID_TRUST_POLICY";
38pub const WARN_AUBE_INVALID_BUNDLED_PACKAGE_EXTENSION: &str =
39    "WARN_AUBE_INVALID_BUNDLED_PACKAGE_EXTENSION";
40pub const WARN_AUBE_INVALID_MINIMUM_RELEASE_AGE_EXCLUDE: &str =
41    "WARN_AUBE_INVALID_MINIMUM_RELEASE_AGE_EXCLUDE";
42pub const WARN_AUBE_OVERRIDE_MISSING_DEP: &str = "WARN_AUBE_OVERRIDE_MISSING_DEP";
43pub const WARN_AUBE_OVERRIDE_DOLLAR_REF_DEPRECATED: &str =
44    "WARN_AUBE_OVERRIDE_DOLLAR_REF_DEPRECATED";
45pub const WARN_AUBE_INVALID_PEER_PATTERN: &str = "WARN_AUBE_INVALID_PEER_PATTERN";
46pub const WARN_AUBE_INVALID_SAVE_PREFIX: &str = "WARN_AUBE_INVALID_SAVE_PREFIX";
47pub const WARN_AUBE_CONCURRENCY_ENV_INVALID: &str = "WARN_AUBE_CONCURRENCY_ENV_INVALID";
48pub const WARN_AUBE_MANAGED_CONFIG_ENFORCED: &str = "WARN_AUBE_MANAGED_CONFIG_ENFORCED";
49
50// ── update / prerelease ─────────────────────────────────────────────
51pub const WARN_AUBE_PRERELEASE_CHECK_SKIPPED: &str = "WARN_AUBE_PRERELEASE_CHECK_SKIPPED";
52pub const WARN_AUBE_MINIMUM_RELEASE_AGE_BLOCKED_UPDATE: &str =
53    "WARN_AUBE_MINIMUM_RELEASE_AGE_BLOCKED_UPDATE";
54pub const WARN_AUBE_WORKSPACE_PACKAGE_MISSING_NAME: &str =
55    "WARN_AUBE_WORKSPACE_PACKAGE_MISSING_NAME";
56
57// ── audit / npmrc ───────────────────────────────────────────────────
58pub const WARN_AUBE_AUDIT_FETCH_FAILED: &str = "WARN_AUBE_AUDIT_FETCH_FAILED";
59pub const WARN_AUBE_TOKEN_CHMOD_FAILED: &str = "WARN_AUBE_TOKEN_CHMOD_FAILED";
60
61// ── registry config (trust gates + validation) ──────────────────────
62pub const WARN_AUBE_UNTRUSTED_PROXY: &str = "WARN_AUBE_UNTRUSTED_PROXY";
63pub const WARN_AUBE_UNTRUSTED_STRICT_SSL_DISABLE: &str = "WARN_AUBE_UNTRUSTED_STRICT_SSL_DISABLE";
64pub const WARN_AUBE_INVALID_LOCAL_ADDRESS: &str = "WARN_AUBE_INVALID_LOCAL_ADDRESS";
65pub const WARN_AUBE_INVALID_MAXSOCKETS: &str = "WARN_AUBE_INVALID_MAXSOCKETS";
66pub const WARN_AUBE_UNSCOPED_AUTH_RESCOPED: &str = "WARN_AUBE_UNSCOPED_AUTH_RESCOPED";
67pub const WARN_AUBE_UNTRUSTED_AUTH_ENV: &str = "WARN_AUBE_UNTRUSTED_AUTH_ENV";
68pub const WARN_AUBE_UNTRUSTED_TOKEN_HELPER: &str = "WARN_AUBE_UNTRUSTED_TOKEN_HELPER";
69pub const WARN_AUBE_INVALID_TOKEN_HELPER: &str = "WARN_AUBE_INVALID_TOKEN_HELPER";
70pub const WARN_AUBE_TOKEN_HELPER_SPAWN_FAILED: &str = "WARN_AUBE_TOKEN_HELPER_SPAWN_FAILED";
71pub const WARN_AUBE_TOKEN_HELPER_NON_ZERO_EXIT: &str = "WARN_AUBE_TOKEN_HELPER_NON_ZERO_EXIT";
72
73// ── registry HTTP retries ───────────────────────────────────────────
74pub const WARN_AUBE_HTTP_RETRY_TRANSIENT: &str = "WARN_AUBE_HTTP_RETRY_TRANSIENT";
75pub const WARN_AUBE_HTTP_RETRY_TRANSPORT: &str = "WARN_AUBE_HTTP_RETRY_TRANSPORT";
76pub const WARN_AUBE_HTTP_RETRY_BODY_READ: &str = "WARN_AUBE_HTTP_RETRY_BODY_READ";
77pub const WARN_AUBE_HTTP_RETRY_BODY_DECODE: &str = "WARN_AUBE_HTTP_RETRY_BODY_DECODE";
78
79// ── registry caching / perf ─────────────────────────────────────────
80pub const WARN_AUBE_PACKUMENT_CACHE_WRITE: &str = "WARN_AUBE_PACKUMENT_CACHE_WRITE";
81pub const WARN_AUBE_SLOW_METADATA: &str = "WARN_AUBE_SLOW_METADATA";
82pub const WARN_AUBE_SLOW_TARBALL: &str = "WARN_AUBE_SLOW_TARBALL";
83
84// ── registry TLS / proxy config ─────────────────────────────────────
85pub const WARN_AUBE_INVALID_HTTPS_PROXY: &str = "WARN_AUBE_INVALID_HTTPS_PROXY";
86pub const WARN_AUBE_INVALID_HTTP_PROXY: &str = "WARN_AUBE_INVALID_HTTP_PROXY";
87pub const WARN_AUBE_INVALID_CA: &str = "WARN_AUBE_INVALID_CA";
88pub const WARN_AUBE_INVALID_CAFILE: &str = "WARN_AUBE_INVALID_CAFILE";
89pub const WARN_AUBE_UNREADABLE_CAFILE: &str = "WARN_AUBE_UNREADABLE_CAFILE";
90pub const WARN_AUBE_INVALID_CLIENT_CERT: &str = "WARN_AUBE_INVALID_CLIENT_CERT";
91
92// ── resolver ────────────────────────────────────────────────────────
93pub const WARN_AUBE_UNSUPPORTED_PLATFORM_INSTALL: &str = "WARN_AUBE_UNSUPPORTED_PLATFORM_INSTALL";
94pub const WARN_AUBE_EXOTIC_SUBDEP_SKIPPED: &str = "WARN_AUBE_EXOTIC_SUBDEP_SKIPPED";
95pub const WARN_AUBE_PEER_DEDUPE_COLLISION: &str = "WARN_AUBE_PEER_DEDUPE_COLLISION";
96
97// ── lockfile ────────────────────────────────────────────────────────
98pub const WARN_AUBE_LOCKFILE_MERGE_CONFLICT: &str = "WARN_AUBE_LOCKFILE_MERGE_CONFLICT";
99pub const WARN_AUBE_LOCKFILE_MERGE_CLEANUP_FAILED: &str = "WARN_AUBE_LOCKFILE_MERGE_CLEANUP_FAILED";
100pub const WARN_AUBE_LOCKFILE_CONFLICT_MARKERS: &str = "WARN_AUBE_LOCKFILE_CONFLICT_MARKERS";
101pub const WARN_AUBE_YARN_BERRY_UNSUPPORTED: &str = "WARN_AUBE_YARN_BERRY_UNSUPPORTED";
102pub const WARN_AUBE_LOCKFILE_MALFORMED_PEER_SUFFIX: &str =
103    "WARN_AUBE_LOCKFILE_MALFORMED_PEER_SUFFIX";
104pub const WARN_AUBE_GLOBAL_OUTDATED_NO_LOCKFILE: &str = "WARN_AUBE_GLOBAL_OUTDATED_NO_LOCKFILE";
105
106// ── global installs ─────────────────────────────────────────────────
107pub const WARN_AUBE_GLOBAL_DIR_LEGACY_LOCATION: &str = "WARN_AUBE_GLOBAL_DIR_LEGACY_LOCATION";
108pub const WARN_AUBE_GLOBAL_BIN_DIR_NOT_ON_PATH: &str = "WARN_AUBE_GLOBAL_BIN_DIR_NOT_ON_PATH";
109
110// ── progress UI ─────────────────────────────────────────────────────
111pub const WARN_AUBE_PROGRESS_OVERFLOW: &str = "WARN_AUBE_PROGRESS_OVERFLOW";
112
113// ── workspace recursion ─────────────────────────────────────────────
114pub const WARN_AUBE_WORKSPACE_TOPO_CYCLE: &str = "WARN_AUBE_WORKSPACE_TOPO_CYCLE";
115
116// ── supply chain (add-time) ─────────────────────────────────────────
117pub const WARN_AUBE_LOW_DOWNLOAD_PACKAGE: &str = "WARN_AUBE_LOW_DOWNLOAD_PACKAGE";
118pub const WARN_AUBE_SIMILAR_PACKAGE_NAME: &str = "WARN_AUBE_SIMILAR_PACKAGE_NAME";
119pub const WARN_AUBE_NEW_PACKAGE_NAME: &str = "WARN_AUBE_NEW_PACKAGE_NAME";
120pub const WARN_AUBE_ADVISORY_CHECK_FAILED: &str = "WARN_AUBE_ADVISORY_CHECK_FAILED";
121pub const WARN_AUBE_OSV_MIRROR_REFRESH_FAILED: &str = "WARN_AUBE_OSV_MIRROR_REFRESH_FAILED";
122pub const WARN_AUBE_OSV_BLOOM_REFRESH_FAILED: &str = "WARN_AUBE_OSV_BLOOM_REFRESH_FAILED";
123pub const WARN_AUBE_SECURITY_SCANNER_FINDING: &str = "WARN_AUBE_SECURITY_SCANNER_FINDING";
124
125// ── node runtime ────────────────────────────────────────────────────
126#[rustfmt::skip] pub const WARN_AUBE_RUNTIME_VERSION_MISMATCH: &str = "WARN_AUBE_RUNTIME_VERSION_MISMATCH";
127pub const WARN_AUBE_RUNTIME_MISE_FALLBACK: &str = "WARN_AUBE_RUNTIME_MISE_FALLBACK";
128#[rustfmt::skip] pub const WARN_AUBE_RUNTIME_PIN_NOT_RECORDED: &str = "WARN_AUBE_RUNTIME_PIN_NOT_RECORDED";
129
130/// Stable category labels that group codes in the generated docs.
131/// Public so the docs generator can iterate them deterministically.
132pub mod category {
133    pub const PNPMFILE_HOOKS: &str = "pnpmfile / hooks";
134    pub const INSTALL_LIFECYCLE: &str = "Install lifecycle";
135    pub const STORE: &str = "Store maintenance";
136    pub const SETTINGS_CONFIG: &str = "Settings / config validation";
137    pub const UPDATE_PRERELEASE: &str = "Update / prerelease";
138    pub const AUDIT_NPMRC: &str = "Audit / npmrc";
139    pub const REGISTRY_CONFIG: &str = "Registry config (trust gates)";
140    pub const HTTP_RETRIES: &str = "Registry HTTP retries";
141    pub const REGISTRY_PERF: &str = "Registry caching / perf";
142    pub const REGISTRY_TLS: &str = "Registry TLS / proxy";
143    pub const RESOLVER: &str = "Resolver";
144    pub const LOCKFILE: &str = "Lockfile";
145    pub const PROGRESS_UI: &str = "Progress UI";
146    pub const WORKSPACE_RECURSION: &str = "Workspace recursion";
147    pub const SUPPLY_CHAIN: &str = "Supply chain (add-time)";
148    pub const NODE_RUNTIME: &str = "Node runtime";
149    pub const GLOBAL_INSTALLS: &str = "Global installs";
150}
151
152/// Registry of every warning code with its category and description.
153/// Walked by the `generate-error-codes-docs` binary and by the
154/// self-tests in `lib.rs`. New codes must be added here.
155pub const ALL: &[CodeMeta] = &[
156    // pnpmfile / hooks
157    CodeMeta {
158        name: WARN_AUBE_PNPMFILE_NOT_FOUND,
159        category: category::PNPMFILE_HOOKS,
160        description: "A pnpmfile path (CLI arg, workspace setting, global) pointed at a missing file.",
161        exit_code: None,
162    },
163    CodeMeta {
164        name: WARN_AUBE_PNPMFILE_STDERR_FORWARDER,
165        category: category::PNPMFILE_HOOKS,
166        description: "The background task forwarding pnpmfile stderr panicked.",
167        exit_code: None,
168    },
169    CodeMeta {
170        name: WARN_AUBE_PNPMFILE_CHECKSUM_FAILED,
171        category: category::PNPMFILE_HOOKS,
172        description: "Reading the local pnpmfile for checksum computation failed; the lockfile's `pnpmfileChecksum` field is omitted so a later install will re-resolve instead of trusting a stale value.",
173        exit_code: None,
174    },
175    CodeMeta {
176        name: WARN_AUBE_HOOK_IMPORTER_MUTATED,
177        category: category::PNPMFILE_HOOKS,
178        description: "A pnpmfile `afterAllResolved` hook mutated `importers[...]`; aube ignored the edit.",
179        exit_code: None,
180    },
181    CodeMeta {
182        name: WARN_AUBE_HOOK_IMPORTER_ADDED,
183        category: category::PNPMFILE_HOOKS,
184        description: "A pnpmfile `afterAllResolved` hook added a new `importers[...]` entry; aube ignored it.",
185        exit_code: None,
186    },
187    CodeMeta {
188        name: WARN_AUBE_HOOK_IDENTITY_REWRITTEN,
189        category: category::PNPMFILE_HOOKS,
190        description: "A pnpmfile hook rewrote a package's `(name, version)` identity; aube reverted the edit.",
191        exit_code: None,
192    },
193    CodeMeta {
194        name: WARN_AUBE_HOOK_PACKAGE_ADDED,
195        category: category::PNPMFILE_HOOKS,
196        description: "A pnpmfile hook added a wholly-new package entry; aube ignored it.",
197        exit_code: None,
198    },
199    // Install lifecycle
200    CodeMeta {
201        name: WARN_AUBE_IGNORED_BUILD_SCRIPTS,
202        category: category::INSTALL_LIFECYCLE,
203        description: "Dep had `preinstall`/`install`/`postinstall` scripts but isn't on the `allowBuilds` allowlist. Run `aube approve-builds`.",
204        exit_code: None,
205    },
206    CodeMeta {
207        name: WARN_AUBE_DEPRECATED_PACKAGE,
208        category: category::INSTALL_LIFECYCLE,
209        description: "An installed package version is deprecated.",
210        exit_code: None,
211    },
212    CodeMeta {
213        name: WARN_AUBE_DEPRECATED_PACKAGE_SUMMARY,
214        category: category::INSTALL_LIFECYCLE,
215        description: "One or more installed package versions have deprecation warnings.",
216        exit_code: None,
217    },
218    CodeMeta {
219        name: WARN_AUBE_SUSPICIOUS_LIFECYCLE_SCRIPT,
220        category: category::INSTALL_LIFECYCLE,
221        description: "A dependency's lifecycle script matched a dangerous-shape heuristic (curl|sh, eval+atob, credential-file read, secret-env exfil, exfil endpoint, bare-IP HTTP). Advisory only; the `allowBuilds` allowlist still gates execution. Inspect the script before approving the build.",
222        exit_code: None,
223    },
224    CodeMeta {
225        name: WARN_AUBE_WINDOWS_JOB_OBJECT_UNAVAILABLE,
226        category: category::INSTALL_LIFECYCLE,
227        description: "Windows: couldn't create or assign a kill-on-job-close job object for a lifecycle script. The script still runs, but on abort/failure its grandchildren (node-gyp / MSBuild / node) may be orphaned. Usually caused by a restrictive parent job or enterprise policy.",
228        exit_code: None,
229    },
230    CodeMeta {
231        name: WARN_AUBE_MISSING_INTEGRITY,
232        category: category::INSTALL_LIFECYCLE,
233        description: "Lockfile entry / registry response had no `dist.integrity`; importing without verification. Set `strict-store-integrity=true` to refuse.",
234        exit_code: None,
235    },
236    CodeMeta {
237        name: WARN_AUBE_CACHE_WRITE_FAILED,
238        category: category::INSTALL_LIFECYCLE,
239        description: "Couldn't write a package index to the on-disk cache. Non-fatal.",
240        exit_code: None,
241    },
242    CodeMeta {
243        name: WARN_AUBE_CLONE_STRATEGY_FALLBACK,
244        category: category::INSTALL_LIFECYCLE,
245        description: "`package-import-method=clone` will silently fall back to copy if the filesystem doesn't support reflinks.",
246        exit_code: None,
247    },
248    CodeMeta {
249        name: WARN_AUBE_LTHASH_MISMATCH,
250        category: category::INSTALL_LIFECYCLE,
251        description: "aube's incremental install digest disagreed with a full recomputation. This indicates a bug in aube — please report it at https://github.com/aubepkg/aube/discussions.",
252        exit_code: None,
253    },
254    CodeMeta {
255        name: WARN_AUBE_DELTA_INVALIDATE_FAILED,
256        category: category::INSTALL_LIFECYCLE,
257        description: "Delta install couldn't invalidate a package directory during cleanup.",
258        exit_code: None,
259    },
260    CodeMeta {
261        name: WARN_AUBE_GVS_INCOMPATIBLE,
262        category: category::INSTALL_LIFECYCLE,
263        description: "A package isn't compatible with aube's global virtual store; installed per-project instead.",
264        exit_code: None,
265    },
266    CodeMeta {
267        name: WARN_AUBE_GVS_MODE_CHANGED,
268        category: category::INSTALL_LIFECYCLE,
269        description: "The global virtual store was switched on or off since the last install, so aube is removing `node_modules` and reinstalling from scratch.",
270        exit_code: None,
271    },
272    CodeMeta {
273        name: WARN_AUBE_GVS_CROSS_VOLUME,
274        category: category::INSTALL_LIFECYCLE,
275        description: "The global virtual store (`globalVirtualStoreDir`, by default under `cacheDir`) and `storeDir` are on different volumes, so linking falls back to per-file copy.",
276        exit_code: None,
277    },
278    CodeMeta {
279        name: WARN_AUBE_STORE_PRUNE_ENTRY_DISAPPEARED,
280        category: category::STORE,
281        description: "A global virtual-store entry disappeared while a prune plan was being built; the preview skipped it.",
282        exit_code: None,
283    },
284    // Settings / config validation
285    CodeMeta {
286        name: WARN_AUBE_INVALID_CONCURRENCY,
287        category: category::SETTINGS_CONFIG,
288        description: "`network-concurrency` or `link-concurrency` was 0 (must be ≥ 1).",
289        exit_code: None,
290    },
291    CodeMeta {
292        name: WARN_AUBE_INVALID_TRUST_POLICY,
293        category: category::SETTINGS_CONFIG,
294        description: "A `trustPolicyExclude` entry was malformed and skipped.",
295        exit_code: None,
296    },
297    CodeMeta {
298        name: WARN_AUBE_INVALID_BUNDLED_PACKAGE_EXTENSION,
299        category: category::SETTINGS_CONFIG,
300        description: "A bundled package-extension entry was malformed and skipped.",
301        exit_code: None,
302    },
303    CodeMeta {
304        name: WARN_AUBE_INVALID_MINIMUM_RELEASE_AGE_EXCLUDE,
305        category: category::SETTINGS_CONFIG,
306        description: "A `minimumReleaseAgeExclude` entry was malformed and skipped.",
307        exit_code: None,
308    },
309    CodeMeta {
310        name: WARN_AUBE_OVERRIDE_MISSING_DEP,
311        category: category::SETTINGS_CONFIG,
312        description: "An `overrides` `$ref` pointed at a package not in any of the importer's dependency lists.",
313        exit_code: None,
314    },
315    CodeMeta {
316        name: WARN_AUBE_OVERRIDE_DOLLAR_REF_DEPRECATED,
317        category: category::SETTINGS_CONFIG,
318        description: "An `overrides` entry used pnpm's deprecated `$` version reference syntax.",
319        exit_code: None,
320    },
321    CodeMeta {
322        name: WARN_AUBE_INVALID_PEER_PATTERN,
323        category: category::SETTINGS_CONFIG,
324        description: "A `peerDependencyRules` pattern was unparseable and skipped.",
325        exit_code: None,
326    },
327    CodeMeta {
328        name: WARN_AUBE_INVALID_SAVE_PREFIX,
329        category: category::SETTINGS_CONFIG,
330        description: "`save-prefix` was something other than `^`, `~`, or empty. Falling back to `^`.",
331        exit_code: None,
332    },
333    CodeMeta {
334        name: WARN_AUBE_CONCURRENCY_ENV_INVALID,
335        category: category::SETTINGS_CONFIG,
336        description: "The `AUBE_CONCURRENCY` env var was outside the `[floor, ceiling]` range or non-numeric.",
337        exit_code: None,
338    },
339    CodeMeta {
340        name: WARN_AUBE_MANAGED_CONFIG_ENFORCED,
341        category: category::SETTINGS_CONFIG,
342        description: "Managed hardening config enforced a stricter value than local config, env, or CLI requested.",
343        exit_code: None,
344    },
345    // Update / prerelease
346    CodeMeta {
347        name: WARN_AUBE_PRERELEASE_CHECK_SKIPPED,
348        category: category::UPDATE_PRERELEASE,
349        description: "`aube update` couldn't fetch the packument or got a non-semver `latest` tag; preserved-prerelease check skipped for that package.",
350        exit_code: None,
351    },
352    CodeMeta {
353        name: WARN_AUBE_MINIMUM_RELEASE_AGE_BLOCKED_UPDATE,
354        category: category::UPDATE_PRERELEASE,
355        description: "One or more newer package versions were hidden because they have not satisfied `minimumReleaseAge` yet.",
356        exit_code: None,
357    },
358    CodeMeta {
359        name: WARN_AUBE_WORKSPACE_PACKAGE_MISSING_NAME,
360        category: category::UPDATE_PRERELEASE,
361        description: "A discovered workspace package had no `name` field, so update skipped local workspace version registration for it.",
362        exit_code: None,
363    },
364    // Audit / npmrc
365    CodeMeta {
366        name: WARN_AUBE_AUDIT_FETCH_FAILED,
367        category: category::AUDIT_NPMRC,
368        description: "`aube audit --ignore-unfixable` couldn't fetch a packument; advisories for that package are kept verbatim.",
369        exit_code: None,
370    },
371    CodeMeta {
372        name: WARN_AUBE_TOKEN_CHMOD_FAILED,
373        category: category::AUDIT_NPMRC,
374        description: "`chmod 0600` on the auth token file failed; the file may be world-readable.",
375        exit_code: None,
376    },
377    // Registry config (trust gates)
378    CodeMeta {
379        name: WARN_AUBE_UNTRUSTED_PROXY,
380        category: category::REGISTRY_CONFIG,
381        description: "A `*-proxy` setting came from a source aube doesn't trust (committed `.npmrc` can't set proxies).",
382        exit_code: None,
383    },
384    CodeMeta {
385        name: WARN_AUBE_UNTRUSTED_STRICT_SSL_DISABLE,
386        category: category::REGISTRY_CONFIG,
387        description: "`strict-ssl=false` came from a source aube doesn't trust. TLS validation stays on.",
388        exit_code: None,
389    },
390    CodeMeta {
391        name: WARN_AUBE_INVALID_LOCAL_ADDRESS,
392        category: category::REGISTRY_CONFIG,
393        description: "`local-address` setting wasn't a valid IP.",
394        exit_code: None,
395    },
396    CodeMeta {
397        name: WARN_AUBE_INVALID_MAXSOCKETS,
398        category: category::REGISTRY_CONFIG,
399        description: "`maxsockets` was 0 or non-numeric.",
400        exit_code: None,
401    },
402    CodeMeta {
403        name: WARN_AUBE_UNSCOPED_AUTH_RESCOPED,
404        category: category::REGISTRY_CONFIG,
405        description: "An unscoped registry credential was pinned to the registry declared by the same config source.",
406        exit_code: None,
407    },
408    CodeMeta {
409        name: WARN_AUBE_UNTRUSTED_AUTH_ENV,
410        category: category::REGISTRY_CONFIG,
411        description: "An auth setting from project-controlled `.npmrc` contained an environment variable reference and was ignored.",
412        exit_code: None,
413    },
414    CodeMeta {
415        name: WARN_AUBE_UNTRUSTED_TOKEN_HELPER,
416        category: category::REGISTRY_CONFIG,
417        description: "`tokenHelper` came from an untrusted source (CVE-2025-69262 class).",
418        exit_code: None,
419    },
420    CodeMeta {
421        name: WARN_AUBE_INVALID_TOKEN_HELPER,
422        category: category::REGISTRY_CONFIG,
423        description: "`tokenHelper` value wasn't a sanitized absolute path.",
424        exit_code: None,
425    },
426    CodeMeta {
427        name: WARN_AUBE_TOKEN_HELPER_SPAWN_FAILED,
428        category: category::REGISTRY_CONFIG,
429        description: "`tokenHelper` couldn't be spawned.",
430        exit_code: None,
431    },
432    CodeMeta {
433        name: WARN_AUBE_TOKEN_HELPER_NON_ZERO_EXIT,
434        category: category::REGISTRY_CONFIG,
435        description: "`tokenHelper` exited non-zero.",
436        exit_code: None,
437    },
438    // Registry HTTP retries
439    CodeMeta {
440        name: WARN_AUBE_HTTP_RETRY_TRANSIENT,
441        category: category::HTTP_RETRIES,
442        description: "Retrying after a transient HTTP status (429, 5xx).",
443        exit_code: None,
444    },
445    CodeMeta {
446        name: WARN_AUBE_HTTP_RETRY_TRANSPORT,
447        category: category::HTTP_RETRIES,
448        description: "Retrying after a transport / connection error.",
449        exit_code: None,
450    },
451    CodeMeta {
452        name: WARN_AUBE_HTTP_RETRY_BODY_READ,
453        category: category::HTTP_RETRIES,
454        description: "Retrying after a response-body read error (timeout, partial body).",
455        exit_code: None,
456    },
457    CodeMeta {
458        name: WARN_AUBE_HTTP_RETRY_BODY_DECODE,
459        category: category::HTTP_RETRIES,
460        description: "Retrying after a JSON decode error on the response body.",
461        exit_code: None,
462    },
463    // Registry caching / perf
464    CodeMeta {
465        name: WARN_AUBE_PACKUMENT_CACHE_WRITE,
466        category: category::REGISTRY_PERF,
467        description: "Couldn't write a packument to the on-disk cache after a successful fetch. Non-fatal; next install will refetch.",
468        exit_code: None,
469    },
470    CodeMeta {
471        name: WARN_AUBE_SLOW_METADATA,
472        category: category::REGISTRY_PERF,
473        description: "One or more packument fetches exceeded `fetchWarnTimeoutMs`. Emitted as a grouped summary so a burst of slow fetches produces one warning, not one per fetch.",
474        exit_code: None,
475    },
476    CodeMeta {
477        name: WARN_AUBE_SLOW_TARBALL,
478        category: category::REGISTRY_PERF,
479        description: "A tarball download fell below `fetchMinSpeedKiBps`.",
480        exit_code: None,
481    },
482    // Registry TLS / proxy
483    CodeMeta {
484        name: WARN_AUBE_INVALID_HTTPS_PROXY,
485        category: category::REGISTRY_TLS,
486        description: "`https-proxy` URL didn't parse.",
487        exit_code: None,
488    },
489    CodeMeta {
490        name: WARN_AUBE_INVALID_HTTP_PROXY,
491        category: category::REGISTRY_TLS,
492        description: "`http-proxy` URL didn't parse.",
493        exit_code: None,
494    },
495    CodeMeta {
496        name: WARN_AUBE_INVALID_CA,
497        category: category::REGISTRY_TLS,
498        description: "Per-registry CA PEM didn't parse.",
499        exit_code: None,
500    },
501    CodeMeta {
502        name: WARN_AUBE_INVALID_CAFILE,
503        category: category::REGISTRY_TLS,
504        description: "`cafile` couldn't be parsed as a PEM bundle.",
505        exit_code: None,
506    },
507    CodeMeta {
508        name: WARN_AUBE_UNREADABLE_CAFILE,
509        category: category::REGISTRY_TLS,
510        description: "`cafile` couldn't be read from disk.",
511        exit_code: None,
512    },
513    CodeMeta {
514        name: WARN_AUBE_INVALID_CLIENT_CERT,
515        category: category::REGISTRY_TLS,
516        description: "Per-registry client `cert`/`key` PEM pair didn't parse.",
517        exit_code: None,
518    },
519    // Resolver
520    CodeMeta {
521        name: WARN_AUBE_UNSUPPORTED_PLATFORM_INSTALL,
522        category: category::RESOLVER,
523        description: "A required (non-optional) dep declared a platform aube doesn't satisfy; installing anyway.",
524        exit_code: None,
525    },
526    CodeMeta {
527        name: WARN_AUBE_EXOTIC_SUBDEP_SKIPPED,
528        category: category::RESOLVER,
529        description: "An optional or peer dep used an exotic specifier and was skipped under `blockExoticSubdeps=true`.",
530        exit_code: None,
531    },
532    CodeMeta {
533        name: WARN_AUBE_PEER_DEDUPE_COLLISION,
534        category: category::RESOLVER,
535        description: "`dedupe-peers=true` would have collapsed a distinct peer-variant; preserved the longer form to avoid dropping it.",
536        exit_code: None,
537    },
538    // Lockfile
539    CodeMeta {
540        name: WARN_AUBE_LOCKFILE_MERGE_CONFLICT,
541        category: category::LOCKFILE,
542        description: "Branch-lockfile merge had conflicting entries for the same dep_path; one was chosen.",
543        exit_code: None,
544    },
545    CodeMeta {
546        name: WARN_AUBE_LOCKFILE_MERGE_CLEANUP_FAILED,
547        category: category::LOCKFILE,
548        description: "After a successful merge, removing one of the merged branch lockfiles failed.",
549        exit_code: None,
550    },
551    CodeMeta {
552        name: WARN_AUBE_LOCKFILE_CONFLICT_MARKERS,
553        category: category::LOCKFILE,
554        description: "The active lockfile contains Git conflict markers; aube is regenerating it from package.json.",
555        exit_code: None,
556    },
557    CodeMeta {
558        name: WARN_AUBE_YARN_BERRY_UNSUPPORTED,
559        category: category::LOCKFILE,
560        description: "A Yarn Berry `patch:` / `portal:` / `exec:` protocol — or any unrecognized protocol — was found in `yarn.lock`. Entry was skipped.",
561        exit_code: None,
562    },
563    CodeMeta {
564        name: WARN_AUBE_LOCKFILE_MALFORMED_PEER_SUFFIX,
565        category: category::LOCKFILE,
566        description: "A pnpm dep_path peer suffix had unbalanced parentheses (a truncated or hand-corrupted lockfile entry). The key is preserved verbatim instead of silently dropping everything after the `(`, so a later install surfaces the bad entry rather than mis-resolving it.",
567        exit_code: None,
568    },
569    CodeMeta {
570        name: WARN_AUBE_GLOBAL_OUTDATED_NO_LOCKFILE,
571        category: category::LOCKFILE,
572        description: "`aube outdated -g` found a global install without a lockfile and skipped that install.",
573        exit_code: None,
574    },
575    // Global installs
576    CodeMeta {
577        name: WARN_AUBE_GLOBAL_DIR_LEGACY_LOCATION,
578        category: category::GLOBAL_INSTALLS,
579        description: "Global packages were found under the pnpm-named directory aube used before it owned its own global layout (`$PNPM_HOME`, `$XDG_DATA_HOME/pnpm`, `~/Library/pnpm`, `%LOCALAPPDATA%\\pnpm`), while the current global directory holds none. Those installs are no longer visible to `aube list -g` / `remove -g`; reinstall them with `aube add -g`, or point `AUBE_HOME` at the old directory.",
580        exit_code: None,
581    },
582    CodeMeta {
583        name: WARN_AUBE_GLOBAL_BIN_DIR_NOT_ON_PATH,
584        category: category::GLOBAL_INSTALLS,
585        description: "`aube add -g` linked a bin into a directory that is not on `$PATH`, so the command it installed won't be found. Add the directory to `PATH`, or point `globalBinDir` / `AUBE_HOME` at one that already is.",
586        exit_code: None,
587    },
588    // Progress UI
589    CodeMeta {
590        name: WARN_AUBE_PROGRESS_OVERFLOW,
591        category: category::PROGRESS_UI,
592        description: "Install progress numerator exceeded the resolved-package denominator. Display clamps to total; the warning surfaces the bookkeeping mismatch so the underlying race can be diagnosed.",
593        exit_code: None,
594    },
595    // Workspace recursion
596    CodeMeta {
597        name: WARN_AUBE_WORKSPACE_TOPO_CYCLE,
598        category: category::WORKSPACE_RECURSION,
599        description: "Topological sort of `aube run -r` / `aube exec -r` selected packages found a dependency cycle. Cycle members run in workspace-listing order after the rest of the topo-sorted set.",
600        exit_code: None,
601    },
602    // Supply chain (add-time)
603    CodeMeta {
604        name: WARN_AUBE_SIMILAR_PACKAGE_NAME,
605        category: category::SUPPLY_CHAIN,
606        description: "`aube add` flagged a package whose name closely resembles a top-100,000 npm package. Interactive sessions prompt for confirmation; non-interactive contexts fail with `ERR_AUBE_SIMILAR_PACKAGE_NAME` unless explicitly allowed.",
607        exit_code: None,
608    },
609    CodeMeta {
610        name: WARN_AUBE_LOW_DOWNLOAD_PACKAGE,
611        category: category::SUPPLY_CHAIN,
612        description: "`aube add` flagged a package whose weekly downloads fall below `lowDownloadThreshold`. Interactive sessions prompt for confirmation; non-interactive contexts fail with `ERR_AUBE_LOW_DOWNLOAD_PACKAGE` unless `--allow-low-downloads` is passed.",
613        exit_code: None,
614    },
615    CodeMeta {
616        name: WARN_AUBE_NEW_PACKAGE_NAME,
617        category: category::SUPPLY_CHAIN,
618        description: "`aube add` flagged a package name first published within `minimumPackageAge`. Interactive sessions prompt for confirmation; non-interactive contexts fail with `ERR_AUBE_NEW_PACKAGE_NAME` unless explicitly allowed.",
619        exit_code: None,
620    },
621    CodeMeta {
622        name: WARN_AUBE_ADVISORY_CHECK_FAILED,
623        category: category::SUPPLY_CHAIN,
624        description: "OSV `MAL-*` advisory check couldn't reach the API. With `advisoryCheck=on` (default) install continues; with `advisoryCheck=required` install fails closed.",
625        exit_code: None,
626    },
627    CodeMeta {
628        name: WARN_AUBE_OSV_MIRROR_REFRESH_FAILED,
629        category: category::SUPPLY_CHAIN,
630        description: "OSV advisory mirror used by `advisoryCheckOnInstall` failed to refresh (download, ETag, or zip parse error). With `advisoryCheckOnInstall=on` install proceeds against the previously cached index if any; with `advisoryCheckOnInstall=required` install fails closed with `ERR_AUBE_ADVISORY_CHECK_FAILED`.",
631        exit_code: None,
632    },
633    CodeMeta {
634        name: WARN_AUBE_OSV_BLOOM_REFRESH_FAILED,
635        category: category::SUPPLY_CHAIN,
636        description: "OSV bloom-filter prefilter used by `advisoryBloomCheck` failed to refresh (download or format-decode error). With `advisoryBloomCheck=on` install proceeds against the previously cached filter if any; with `advisoryBloomCheck=required` install fails closed with `ERR_AUBE_ADVISORY_CHECK_FAILED`.",
637        exit_code: None,
638    },
639    CodeMeta {
640        name: WARN_AUBE_SECURITY_SCANNER_FINDING,
641        category: category::SUPPLY_CHAIN,
642        description: "User-configured `securityScanner` returned a `warn`-level advisory. Install continues — only `fatal`-level advisories block.",
643        exit_code: None,
644    },
645    // Node runtime
646    CodeMeta {
647        name: WARN_AUBE_RUNTIME_VERSION_MISMATCH,
648        category: category::NODE_RUNTIME,
649        description: "The active Node.js doesn't satisfy the project's runtime requirement and `onFail: \"warn\"` keeps execution on the unsatisfying version.",
650        exit_code: None,
651    },
652    CodeMeta {
653        name: WARN_AUBE_RUNTIME_MISE_FALLBACK,
654        category: category::NODE_RUNTIME,
655        description: "`runtimeInstaller=auto` tried delegating a Node.js install to mise but mise failed; aube fell back to its own nodejs.org download.",
656        exit_code: None,
657    },
658    CodeMeta {
659        name: WARN_AUBE_RUNTIME_PIN_NOT_RECORDED,
660        category: category::NODE_RUNTIME,
661        description: "`devEngines.runtime` resolved to an exact Node.js version but the project's lockfile format (npm/yarn/bun) has no runtime entry shape, so the pin wasn't recorded. Subsequent runs re-resolve the range.",
662        exit_code: None,
663    },
664];