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