* fix(#142): canonicalize runtime aliases across cjs and sdk * fix(#142): satisfy hand-sync and inventory parity gates * test(#1974): remove record-session lock contention in context monitor spec * test(config): retry transient config-ensure-section failures * docs(context): capture PR #143 CI reliability findings * fix(#142): bump CLI Modules inventory headline to 76 (runtime-name-policy + runtime-slash) docs/INVENTORY.md had the two new .cjs rows listed but the headline count stayed at 75; fs count is 76. inventory-counts.test.cjs caught the drift. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
* for non-Claude runtimes.
|
||||
*/
|
||||
import { detectRuntime, SUPPORTED_RUNTIMES, type Runtime } from './query/helpers.js';
|
||||
import { canonicalizeRuntimeName } from './runtime-name-policy.js';
|
||||
|
||||
/**
|
||||
* Throw a clear error when the active runtime is not Claude.
|
||||
@@ -33,8 +34,9 @@ export function assertRuntimeSupportsAutoMode(config?: Record<string, unknown> |
|
||||
// a `GSD_RUNTIME` value that isn't in SUPPORTED_RUNTIMES falls through to
|
||||
// the config tier, so reporting it as the source would be misleading.
|
||||
const env = process.env.GSD_RUNTIME;
|
||||
const envCanonical = canonicalizeRuntimeName(env);
|
||||
const envIsSupported =
|
||||
typeof env === 'string' && (SUPPORTED_RUNTIMES as readonly string[]).includes(env);
|
||||
typeof envCanonical === 'string' && (SUPPORTED_RUNTIMES as readonly string[]).includes(envCanonical);
|
||||
const source = envIsSupported
|
||||
? `GSD_RUNTIME=${env}`
|
||||
: `config.runtime="${String(cfg.runtime ?? '')}"`;
|
||||
|
||||
Reference in New Issue
Block a user