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