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