mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-10-26 16:55:08 +00:00
The concrete-terms gate forbids "provenance": the repository asks for the exact source, field, or identity a value holds. The module records one commit and whether its tree was dirty, so it and its callers say that. The toolchain step also has to stay out of the way of the packaging entry's error-recording test, which fakes the host platform and would otherwise report the absent Windows compilers rather than the failure it exercises. The test mocks the probe, as it already does for the release environment and the signing keychain, and expects the new stage.
33 lines
1.3 KiB
TypeScript
33 lines
1.3 KiB
TypeScript
/** Commit a build came from, and whether its checkout carried uncommitted changes. */
|
|
export interface DesktopBuildCommit {
|
|
readonly commit: string
|
|
readonly dirty: boolean
|
|
}
|
|
|
|
/** Environment variable that carries the packaged commit. */
|
|
export const DESKTOP_BUILD_COMMIT_ENV: 'DSH_DESKTOP_BUILD_COMMIT'
|
|
|
|
/** Environment variable that records whether the packaged checkout had uncommitted changes. */
|
|
export const DESKTOP_BUILD_DIRTY_ENV: 'DSH_DESKTOP_BUILD_DIRTY'
|
|
|
|
/**
|
|
* Read the checkout's current commit and whether it carries uncommitted changes.
|
|
* @param repositoryRoot - Directory to inspect.
|
|
* @returns The commit being packaged and whether its tree was modified.
|
|
*/
|
|
export function readDesktopBuildCommit(repositoryRoot: string): DesktopBuildCommit
|
|
|
|
/**
|
|
* Resolve the commit a parent packaging process recorded.
|
|
* @param env - Packaging environment.
|
|
* @returns The packaged commit, or undefined outside a packaging run.
|
|
*/
|
|
export function resolveDesktopBuildCommit(env: NodeJS.ProcessEnv): DesktopBuildCommit | undefined
|
|
|
|
/**
|
|
* Describe the packaged commit as the environment variables child processes read.
|
|
* @param packaged - Commit and tree state to pass down.
|
|
* @returns Variables to merge into a child environment.
|
|
*/
|
|
export function desktopBuildCommitEnvironment(packaged: DesktopBuildCommit): Record<string, string>
|