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