Explorar el Código

Merge remote-tracking branch 'origin/worktree/session-log-upload-default-test-aware' into codex/pr-4183-ci

creatixchu hace 2 semanas
padre
commit
32b9c99560
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      packages/session/session-log-deepseek/src/index.ts

+ 6 - 2
packages/session/session-log-deepseek/src/index.ts

@@ -34,14 +34,18 @@ export const name = 'session-log-deepseek'
 /** Services required to resolve sessions and contribute the provider request field. */
 /** Services required to resolve sessions and contribute the provider request field. */
 export const inject = ['deepseekLlmApiExtensions', 'sessions']
 export const inject = ['deepseekLlmApiExtensions', 'sessions']
 
 
+/** Environment markers that identify a recorded-Session lane. */
+const RECORDED_SESSION_LANE_MARKERS = ['VITEST', 'DSH_SNAPSHOT'] as const
+
 /**
 /**
  * Recorded-Session lanes (`test`, `test:snapshot`, `test:web`, and the ACP, SDK,
  * Recorded-Session lanes (`test`, `test:snapshot`, `test:web`, and the ACP, SDK,
  * and Web snapshot suites) boot shipped profiles and compare persisted request
  * and Web snapshot suites) boot shipped profiles and compare persisted request
  * fields and Session logs against recorded expectations, so they keep this
  * fields and Session logs against recorded expectations, so they keep this
  * contribution off unless a composition sets `enabled: true`. A deployed
  * contribution off unless a composition sets `enabled: true`. A deployed
- * process runs without either variable and contributes the field by default.
+ * process sets neither marker and contributes the field by default.
  */
  */
-const RECORDED_SESSION_LANE = process.env.VITEST !== undefined || process.env.DSH_SNAPSHOT !== undefined
+const RECORDED_SESSION_LANE = RECORDED_SESSION_LANE_MARKERS
+  .some(marker => process.env[marker] !== undefined)
 
 
 /** Session-log request contribution configuration. */
 /** Session-log request contribution configuration. */
 export interface Config {
 export interface Config {