fix: restore main type surfaces

This commit is contained in:
Peter Steinberger
2026-04-04 08:36:20 +01:00
parent 04b539e98c
commit cbc6a1ddb8
2 changed files with 18 additions and 5 deletions

View File

@@ -108,8 +108,7 @@ export const ACP_SPAWN_ERROR_CODES = [
] as const;
export type SpawnAcpErrorCode = (typeof ACP_SPAWN_ERROR_CODES)[number];
type SpawnAcpAcceptedResult = {
status: "accepted";
type SpawnAcpResultFields = {
childSessionKey?: string;
runId?: string;
mode?: SpawnAcpMode;
@@ -117,9 +116,15 @@ type SpawnAcpAcceptedResult = {
note?: string;
};
type SpawnAcpFailedResult = {
type SpawnAcpAcceptedResult = SpawnAcpResultFields & {
status: "accepted";
childSessionKey: string;
runId: string;
mode: SpawnAcpMode;
};
type SpawnAcpFailedResult = SpawnAcpResultFields & {
status: "forbidden" | "error";
childSessionKey?: string;
error: string;
errorCode: SpawnAcpErrorCode;
};

View File

@@ -33,6 +33,7 @@ type CacheUsage = {
cacheRead?: number;
cacheWrite?: number;
};
type BaselineLane = CacheLane | "disabled";
type CacheRun = {
hitRate: number;
suffix: string;
@@ -348,8 +349,15 @@ function formatUsage(usage: CacheUsage | undefined) {
return `cacheRead=${usage?.cacheRead ?? 0} cacheWrite=${usage?.cacheWrite ?? 0} input=${usage?.input ?? 0}`;
}
function resolveBaselineFloor(
provider: ProviderKey,
lane: BaselineLane,
): LiveCacheFloor | undefined {
return (LIVE_CACHE_REGRESSION_BASELINE[provider] as Record<string, LiveCacheFloor>)[lane];
}
function assertAgainstBaseline(params: {
lane: string;
lane: BaselineLane;
provider: ProviderKey;
result: LaneResult;
regressions: string[];