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