Skip to content
Sarj Workspace Sync

execution/workspace-schedule-health-repository

@sarj-ai/workspace-sync/execution/workspace-schedule-health-repository ยท Source

import type { D1PreparedStatement } from "@cloudflare/workers-types";
import { z } from "zod";
import { type GithubZeroDispatchProof } from "../identity-provisioning/github-organization-api-port.ts";
import { type WorkspaceBranchAttempt, type WorkspaceBranchAttemptClaim, type WorkspaceBranchAttemptPins, type WorkspaceBranchAttemptVerification } from "./branch-attempt-contracts.ts";
import { type CanaryResolutionPins } from "./canary-branch-resolution-store.ts";
import type { WorkspaceDirectoryWorkflowResult } from "./contracts.ts";
import type { ReviewedSlackLifecycleIntent } from "./reviewed-slack-lifecycle-intent.ts";
import { type WorkspaceScheduleBlockedReason, type WorkspaceScheduleExecution, type WorkspaceScheduleExecutionManifest, type WorkspaceScheduleExecutionReceipts, type WorkspaceScheduleOutcome, type WorkspaceSchedulePlan, type WorkspaceScheduleReceipt, type WorkspaceScheduleStart, type WorkspaceScheduleTick } from "./schedule-health-contracts.ts";
import type { WorkspaceDatabase, WorkspaceStatement } from "./workspace-database.ts";
declare const HealthInputSchema: z.ZodObject<{
maxAgeMs: z.ZodNumber;
nowMs: z.ZodNumber;
}, z.core.$strict>;
export interface WorkspaceScheduleHealth {
healthy: boolean;
latest: null | WorkspaceScheduleTick;
mutationSafetyClear: boolean;
pendingTicks: number;
scheduleHealthy: boolean;
unresolvedMutations: number;
}
export declare class WorkspaceScheduleDeploymentFencedError extends Error {
constructor();
}
export declare class WorkspaceScheduleMutationSafetyError extends Error {
constructor();
}
export declare const WorkspaceScheduleExecutionIdentitySchema: z.ZodObject<{
tickId: z.core.$ZodBranded<z.ZodString, "WorkspaceScheduleTickId", "out">;
workflowId: z.core.$ZodBranded<z.ZodString, "WorkspaceWorkflowId", "out">;
}, z.core.$strict>;
export type WorkspaceScheduleExecutionIdentity = z.output<typeof WorkspaceScheduleExecutionIdentitySchema>;
export interface IWorkspaceScheduleHealthRepository {
attachExecutionReceipts(tickId: string, receipts: WorkspaceScheduleExecutionReceipts): Promise<WorkspaceScheduleTick>;
attachVerifiedReceipt(receipt: WorkspaceScheduleReceipt): Promise<WorkspaceScheduleTick>;
beginExecution(tickId: string, manifest: WorkspaceScheduleExecutionManifest): Promise<WorkspaceScheduleTick>;
claimBranchAttempt(tickId: string, input: WorkspaceBranchAttemptClaim): Promise<WorkspaceBranchAttempt>;
complete(tickId: string, outcome: WorkspaceScheduleOutcome, blockedReason?: WorkspaceScheduleBlockedReason): Promise<WorkspaceScheduleTick>;
completeApplied(tickId: string, result: WorkspaceDirectoryWorkflowResult): Promise<WorkspaceScheduleTick>;
completeFailedBeforePlan(tickId: string): Promise<WorkspaceScheduleTick>;
completeFailedNoDispatch(identity: WorkspaceScheduleExecutionIdentity): Promise<WorkspaceScheduleTick>;
health(input: z.input<typeof HealthInputSchema>): Promise<WorkspaceScheduleHealth>;
launch(identity: WorkspaceScheduleExecutionIdentity): Promise<WorkspaceScheduleTick>;
listStaleNoDispatchRecoveryCandidates(beforeMs: number): Promise<readonly WorkspaceScheduleTick[]>;
read(tickId: string): Promise<WorkspaceScheduleTick>;
readBranchAttempt(tickId: string, branchId: WorkspaceBranchAttempt["branchId"]): Promise<null | WorkspaceBranchAttempt>;
readExecution(tickId: string): Promise<null | WorkspaceScheduleExecution>;
recordGithubNoDispatch(tickId: string, pins: WorkspaceBranchAttemptPins, proof: GithubZeroDispatchProof): Promise<WorkspaceBranchAttempt>;
recordPlan(tickId: string, plan: WorkspaceSchedulePlan): Promise<WorkspaceScheduleTick>;
recoverAppliedFromVerifiedAttempts(tickId: string): Promise<WorkspaceScheduleTick>;
resolveAppliedReviewedIntent(intent: ReviewedSlackLifecycleIntent): Promise<null | WorkspaceScheduleTick>;
start(input: WorkspaceScheduleStart): Promise<WorkspaceScheduleTick>;
verifyBranchAttempt(tickId: string, input: WorkspaceBranchAttemptVerification): Promise<WorkspaceBranchAttempt>;
}
/** Persists observation, not provider authorization. No method sends a message or mutates a provider. */
export declare class WorkspaceScheduleHealthRepository<Statement extends WorkspaceStatement<Statement> = D1PreparedStatement> implements IWorkspaceScheduleHealthRepository {
#private;
constructor(database: WorkspaceDatabase<Statement>, now?: () => number, resolutionPins?: CanaryResolutionPins);
claimBranchAttempt(tickId: string, raw: WorkspaceBranchAttemptClaim): Promise<WorkspaceBranchAttempt>;
recordGithubNoDispatch(tickId: string, raw: WorkspaceBranchAttemptPins, proof: GithubZeroDispatchProof): Promise<WorkspaceBranchAttempt>;
verifyBranchAttempt(tickId: string, raw: WorkspaceBranchAttemptVerification): Promise<WorkspaceBranchAttempt>;
readBranchAttempt(tickId: string, branchId: WorkspaceBranchAttempt["branchId"]): Promise<null | WorkspaceBranchAttempt>;
start(raw: WorkspaceScheduleStart): Promise<WorkspaceScheduleTick>;
recordPlan(tickId: string, raw: WorkspaceSchedulePlan): Promise<WorkspaceScheduleTick>;
launch(identity: WorkspaceScheduleExecutionIdentity): Promise<WorkspaceScheduleTick>;
complete(tickId: string, outcome: WorkspaceScheduleOutcome, blockedReason?: WorkspaceScheduleBlockedReason): Promise<WorkspaceScheduleTick>;
beginExecution(tickId: string, raw: WorkspaceScheduleExecutionManifest): Promise<WorkspaceScheduleTick>;
completeApplied(tickId: string, raw: WorkspaceDirectoryWorkflowResult): Promise<WorkspaceScheduleTick>;
recoverAppliedFromVerifiedAttempts(tickId: string): Promise<WorkspaceScheduleTick>;
readExecution(tickId: string): Promise<null | WorkspaceScheduleExecution>;
completeFailedBeforePlan(tickId: string): Promise<WorkspaceScheduleTick>;
completeFailedNoDispatch(identity: WorkspaceScheduleExecutionIdentity): Promise<WorkspaceScheduleTick>;
listStaleNoDispatchRecoveryCandidates(beforeMs: number): Promise<readonly WorkspaceScheduleTick[]>;
resolveAppliedReviewedIntent(intent: ReviewedSlackLifecycleIntent): Promise<null | WorkspaceScheduleTick>;
attachVerifiedReceipt(raw: WorkspaceScheduleReceipt): Promise<WorkspaceScheduleTick>;
attachExecutionReceipts(tickId: string, raw: WorkspaceScheduleExecutionReceipts): Promise<WorkspaceScheduleTick>;
read(tickId: string): Promise<WorkspaceScheduleTick>;
health(raw: z.input<typeof HealthInputSchema>): Promise<{
healthy: boolean;
latest: {
deployment: {
id: string;
revision: string;
timestamp: string;
};
scheduledAtMs: number;
startedAtMs: number;
tickId: string;
execution?: {
params: {
reviewedSlackLifecycleIntent?: {
claimedAtMs: number;
claimedTickId: string;
intentId: string;
proof: {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
reviewed: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
};
sourceHash: string;
};
state: "claimed";
} | undefined;
reviewedProviderIntent?: {
claimedAtMs: number;
claimedTickId: string;
intentId: string;
state: "claimed";
proof: {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
reviewed: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
};
sourceHash: string;
} | {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
sourceHash: string;
provider: "linear";
reviewed: {
accountId: string;
email: string;
googleUserId: string & z.$brand<"GoogleUserId">;
organizationId: string;
organizationUrlKey: string;
};
beforeHash: string;
afterHash: string;
} | {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
sourceHash: string;
provider: "google-group-cleanup";
reviewed: {
expectedPlanHash: string;
action: {
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
type: "remove-inactive-google-group-member";
authorityEmail: string;
} | {
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
type: "remove-inactive-google-group-member";
authorityEmail: string;
role: "MANAGER" | "OWNER";
};
};
beforeHash: string;
afterHash: string;
};
} | undefined;
authorizedActionIds: ("workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people")[];
requestedBy: string;
scheduledTickId?: string | undefined;
planGeneratedAt: string;
plan: {
authorityFingerprint: string;
branches: [{
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: {
after: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
before: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
changedFields: ("linkedin" | "manages" | "reportsTo" | "team" | "title")[];
googleUserId: string | null;
identity: string;
reason: "matched" | "not_org_participant" | "slack_orphan" | "suspended";
slackUserId: string;
}[];
execution: "managed";
killSwitchEngaged: false;
planHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: {
after: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
before: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
changedFields: ("linkedin" | "manages" | "reportsTo" | "team" | "title")[];
googleUserId: string | null;
identity: string;
reason: "matched" | "not_org_participant" | "slack_orphan" | "suspended";
slackUserId: string;
}[];
execution: "audit-only";
killSwitchEngaged: true;
planHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: [];
execution: "disabled";
killSwitchEngaged: true;
planHash: null;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "drive-org-chart";
bytes: number;
people: number;
photos: number;
currentSha256: string;
desiredSha256: string;
fileId?: string | undefined;
execution: "managed";
killSwitchEngaged: false;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "drive-org-chart";
bytes: number;
people: number;
photos: number;
currentSha256: null;
desiredSha256: null;
execution: "disabled";
killSwitchEngaged: true;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "managed";
killSwitchEngaged: false;
planHash: string;
selectedChannelAdditions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
selectedChannelRename: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
} | null;
selectedProvenanceChannelRemovals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
selectedRemovalCount: number;
selectedUserGroupHandles: string[];
selectedUserGroups: {
automationOwnership: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
};
authority: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
};
channelAdditions: {
id: string;
isArchived: boolean;
isPrivate: boolean;
name: string;
}[];
channelAdditionIds: string[];
channelRemovals: {
id: string;
isArchived: boolean;
isPrivate: boolean;
name: string;
}[];
channelRemovalIds: string[];
currentHandle: string | null;
currentName: string | null;
desiredName: string;
effectiveAccessAdditions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
expectedSlackUserGroupId: string | null;
handle: string;
memberAdditions: {
identity: string;
slackUserId: string;
}[];
memberRemovalAuthority: "contractor_group_authoritative" | "explicit_google_lifecycle" | "google_group_authoritative";
memberRemovals: {
identity: string;
slackUserId: string;
}[];
requiredChannelIds: string[];
slackUserGroupId: string | null;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserId: string;
} | undefined;
reviewedLifecycleRemoval?: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
} | undefined;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "audit-only";
killSwitchEngaged: true;
planHash: string;
selectedChannelAdditions: [];
selectedChannelRename: null;
selectedProvenanceChannelRemovals: [];
selectedRemovalCount: 0;
selectedUserGroupHandles: [];
selectedUserGroups: [];
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "disabled";
killSwitchEngaged: true;
planHash: null;
selectedChannelAdditions: [];
selectedChannelRename: null;
selectedProvenanceChannelRemovals: [];
selectedRemovalCount: 0;
selectedUserGroupHandles: [];
selectedUserGroups: [];
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
accountPlans: {
googleUserId: string;
plan: {
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
kind: "executable";
operations: readonly (Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "invite-organization-member";
role: "member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
invitationId: number & z.$brand<"GitHubInvitationId">;
kind: "cancel-invitation";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-organization-member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "add-team-member";
role: "member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-team-member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}>)[];
} | {
blockers: [Readonly<{
code: "direct-repository-grants" | "identity-mismatch" | "inherited-team-membership" | "outside-collaborator" | "owner-protected" | "pending-invitation" | "pending-team-membership" | "privileged-invitation" | "protected-google-identity" | "repository-inventory-incomplete" | "saml-unlinked" | "team-maintainer";
detail: string;
}>, ...Readonly<{
code: "direct-repository-grants" | "identity-mismatch" | "inherited-team-membership" | "outside-collaborator" | "owner-protected" | "pending-invitation" | "pending-team-membership" | "privileged-invitation" | "protected-google-identity" | "repository-inventory-incomplete" | "saml-unlinked" | "team-maintainer";
detail: string;
}>[]];
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
kind: "blocked";
};
}[];
authorityHash: string;
contentHash: string;
execution: "managed";
killSwitchEngaged: false;
managedTeamSlugs: readonly string[];
organizationId: string;
organizationLogin: string;
selectedOperation: {
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
googleUserId: string;
operation: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "invite-organization-member";
role: "member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
invitationId: number & z.$brand<"GitHubInvitationId">;
kind: "cancel-invitation";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-organization-member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "add-team-member";
role: "member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-team-member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}>;
} | null;
teamAccessHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
contentHash: string;
execution: "audit-only";
killSwitchEngaged: true;
proposedChanges: {
authorityPath: string[];
blockers: string[];
current: "absent" | "present" | null;
desired: "blocked" | "member" | "none" | null;
grace: "age_unknown" | "conflicted" | "grace_elapsed" | "immediate_authoritative" | "not_applicable" | "pending_grace";
id: string;
kind: "org_add" | "org_remove" | "policy_exception" | "team_add" | "team_remove";
privilege: "admin" | "blocked" | "maintain" | "maintainer" | "member" | "none" | "pull" | "push" | "repository_specific" | "triage" | "unknown";
reason: string;
safelyActionable: boolean;
subject: {
email?: string | undefined;
githubId?: number | undefined;
googleId?: string | undefined;
login?: string | undefined;
};
target: string;
}[];
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
contentHash: null;
execution: "disabled";
killSwitchEngaged: true;
proposedChanges: [];
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "access-guard";
execution: "managed";
killSwitchEngaged: false;
plan: {
actions: {
accountId: string;
email: string;
googleUserId: string;
provider: "linear";
type: "suspend";
}[];
diagnostics: ({
code: "ambiguous_github_identity" | "ambiguous_google_email" | "ambiguous_provider_email" | "conflicting_github_identity" | "invalid_google_github_identity" | "invalid_google_org_shape" | "pending_provider_invitation" | "protected_linear_account" | "provider_error" | "unmatched_provider_account";
context: Record<string, string | number | boolean>;
level: "error" | "warning";
message: string;
provider?: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack" | undefined;
} | {
code: "provider_readiness";
context: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
};
level: "error";
message: string;
provider: "linear";
})[];
issues: {
details: Record<string, string>;
googleUserId?: string | undefined;
id: string;
kind: "active_downstream_for_inactive_google" | "active_downstream_without_google" | "coverage_failure" | "missing_google_org_metadata";
provider?: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack" | undefined;
summary: string;
}[];
stats: {
activeGooglePeople: number;
googleUsers: number;
providerAccounts: Partial<Record<"ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack", number>>;
inactiveGoogleUsers: number;
};
};
reviewedLinearSuspension?: {
accountId: string;
email: string;
googleUserId: string & z.$brand<"GoogleUserId">;
organizationId: string;
organizationUrlKey: string;
} | undefined;
scheduledLinearSuspension?: true | undefined;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "access-guard";
execution: "disabled";
killSwitchEngaged: true;
plan: null;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "identity-provisioning";
execution: "managed";
githubIdentitySeed: {
kind: "disabled";
reason: string;
} | {
issues: string[];
kind: "blocked";
} | {
artifact: Readonly<{
entries: readonly (Readonly<{
evidence: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
source: "github-enterprise-saml" | "identity-admin";
verifiedAt: string;
}>;
kind: "exact-match";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}> | Readonly<{
candidates: readonly Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[];
kind: "unresolved";
reason: "github-member-not-found" | "missing-verified-evidence" | "unverified-heuristic";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-heuristic" | "evidence-id-login-mismatch";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
}>)[];
schemaVersion: "github-identity-seed-plan/v1";
sourceRevision: string;
summary: Readonly<{
conflicts: number;
exactMatches: number;
unresolved: number;
}>;
contentHash: string & z.$brand<"GitHubIdentitySeedContentHash">;
}>;
githubSourceFingerprint: string;
kind: "managed";
maxChanges: number;
maxProviderReads: number;
userPlans: ({
kind: "blocked";
reason: "deleted" | "inactive" | "not-found";
userId: string & z.$brand<"GoogleUserId">;
} | {
current: {
githubLogin?: (string & z.$brand<"GitHubLogin">) | undefined;
githubUserId?: (string & z.$brand<"GitHubUserId">) | undefined;
} | null;
desired: {
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
};
kind: "update";
user: {
etag: string;
id: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
};
} | {
identity: {
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
};
kind: "unchanged";
user: {
etag: string;
id: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
};
})[];
};
killSwitchEngaged: false;
providerExecution: "audit-only";
schemaPlan: {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "STRING";
indexed: true;
multiValued: false;
readAccessType: "ADMINS_AND_SELF";
}[];
kind: "add-fields";
schemaId: string;
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
issues: string[];
kind: "blocked";
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "STRING";
indexed: true;
multiValued: false;
readAccessType: "ADMINS_AND_SELF";
}[];
kind: "create";
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
kind: "unchanged";
schemaId: string;
} | {
kind: "not-selected";
};
subjects: {
authorityRevision: string;
githubLinked: boolean;
googleUserId: string;
lifecycle: "active" | "archived" | "deleted" | "suspended";
}[];
}, ...({
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "managed";
killSwitchEngaged: false;
reviewedPlan: {
plan: {
errors: string[];
planHash: string;
stats: {
activeGoogleEmployees: number;
contractorGoogleUsers: number;
trycompMembers: number;
};
warnings: string[];
actions: ({
deactivationAuthority?: "contractor_group" | "inactive_google" | undefined;
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "deactivate";
} | {
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "reactivate";
} | {
email: string;
type: "invite";
})[];
};
schemaVersion: "trycomp-reviewed/v1";
deactivationMode?: "device-free-membership-revocation" | "membership-revocation" | undefined;
sourceFingerprint: string;
targetBefore: {
fleetDmLabelId?: number | null | undefined;
platformRole?: string | null | undefined;
deactivated: boolean;
email: string;
id: string;
isActive: boolean;
role: string;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
provider: {
kind: "member";
memberId: string;
email: string;
} | {
kind: "pending-invitation";
email: string;
};
} | undefined;
};
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "audit-only";
killSwitchEngaged: true;
reviewedPlan: {
plan: {
errors: string[];
planHash: string;
stats: {
activeGoogleEmployees: number;
contractorGoogleUsers: number;
trycompMembers: number;
};
warnings: string[];
actions: ({
deactivationAuthority?: "contractor_group" | "inactive_google" | undefined;
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "deactivate";
} | {
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "reactivate";
} | {
email: string;
type: "invite";
})[];
};
schemaVersion: "trycomp-reviewed/v1";
deactivationMode?: "device-free-membership-revocation" | "membership-revocation" | undefined;
sourceFingerprint: string;
targetBefore: {
fleetDmLabelId?: number | null | undefined;
platformRole?: string | null | undefined;
deactivated: boolean;
email: string;
id: string;
isActive: boolean;
role: string;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
provider: {
kind: "member";
memberId: string;
email: string;
} | {
kind: "pending-invitation";
email: string;
};
} | undefined;
};
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "disabled";
killSwitchEngaged: true;
reviewedPlan: null;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-names";
execution: "managed";
killSwitchEngaged: false;
reviewed: {
expectedPlanHash: string;
sourceFingerprint: string;
action: {
beforeRealName: string;
desiredName: string;
email: string;
type: "repair-default-name";
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserId: string;
};
branchId: "slack-names";
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "linear-profiles";
execution: "managed";
killSwitchEngaged: false;
reviewed: {
expectedPlanHash: string;
sourceFingerprint: string;
action: {
beforeFullName: string;
desiredFullName: string;
email: string;
linearUserId: string;
type: "repair-default-full-name";
googleUserId: string & z.$brand<"GoogleUserId">;
};
branchId: "linear-profiles";
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "google-group-cleanup";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
authorityEmail?: string | undefined;
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
role?: "MANAGER" | "OWNER" | undefined;
type: "remove-inactive-google-group-member";
};
expectedPlanHash: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "pagerduty-teams";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: Readonly<{
email: string;
pagerDutyTeamId: string;
pagerDutyUserId: string;
googleGroupId: string;
googleUserId: string;
desiredPagerDutyRole: "manager" | "observer" | "responder";
type: "add";
}> | Readonly<{
email: string;
pagerDutyTeamId: string;
pagerDutyUserId: string;
googleGroupId: string;
googleUserId: string;
currentPagerDutyRole: "manager" | "observer" | "responder";
desiredPagerDutyRole: "manager" | "observer" | "responder";
type: "set-role";
}>;
expectedPlanHash: string;
reviewId: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "sentry-memberships";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
email: string;
memberId: string;
type: "remove-organization-member";
} | {
email: string;
memberId: string;
type: "add-team-member";
} | {
email: string;
type: "invite";
} | {
email: string;
memberId: string;
type: "repair-pending-invite";
} | {
email: string;
memberId: string;
type: "reinvite-expired";
};
authorityPins: {
actor: {
id: string;
orgRole: "admin" | "billing" | "manager" | "member" | "owner";
role: "admin" | "billing" | "manager" | "member" | "owner";
scopes: string[];
teamRole: "admin" | "contributor" | null;
};
organization: {
id: string;
slug: string;
};
project: {
id: string;
slug: string;
};
team: {
id: string;
slug: string;
};
};
expectedPlanHash: string;
googleUserId: string & z.$brand<"GoogleUserId">;
sourceAuthorityFingerprint: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "posthog-memberships";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "invite";
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "cancel-invite";
inviteId: string;
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "remove-member";
userUuid: string;
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "retire-grant";
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "bind-member";
userUuid: string;
};
expectedPlanHash: string;
sourceAuthorityFingerprint: string;
organizationId: string;
} | null;
sourceFingerprint: string;
})[]];
googleUsers: number;
policyVersion: "workspace-directory-v10" | "workspace-directory-v11" | "workspace-directory-v12";
};
planHash: string;
};
summaryHandle: {
announcementDigest: string;
changeKey: string;
channelId: string;
state: "announced" | "completed";
timestamp: string;
};
branchHandles: {
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
change: {
changeKey: string;
text: string;
};
handle: {
announcementDigest: string;
changeKey: string;
channelId: string;
state: "announced" | "completed";
timestamp: string;
};
}[];
version: "workspace-receipt-recovery/v1";
paramsDigest: string;
startedAtMs: number;
result: {
authorizedActionIds: ("workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people")[];
branches: ({
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "managed";
state: "applied" | "skipped";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "audit-only";
state: "audited";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "disabled";
state: "disabled";
})[];
executionId: string;
planHash: string;
} | null;
} | undefined;
executionReceipts?: {
branchReceipts: {
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
changeKey: string;
channelId: string;
timestamp: string;
contentHash: string;
verifiedAtMs: number;
}[];
summaryReceipt: {
channelId: string;
contentHash: string;
outcome: "applied" | "audit-only" | "blocked" | "failed" | "no-op";
planHash: string | null;
slackTimestamp: string;
tickId: string;
verifiedAtMs: number;
workflowId: string | null;
};
} | undefined;
branchAttempts?: ({
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
state: "attempted";
githubDispatchClaim?: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
} | undefined;
attemptedAtMs: number;
} | {
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
state: "not-dispatched";
githubDispatchClaim: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
};
attemptedAtMs: number;
refusal: {
category: "credentials" | "final-authority" | "provider-observation" | "scope";
operationHash: string;
recordedAtMs: number;
};
} | {
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
githubDispatchClaim?: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
} | undefined;
observedAfterFingerprint: string;
result: {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "managed";
state: "applied" | "skipped";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "audit-only";
state: "audited";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "disabled";
state: "disabled";
};
state: "verified";
attemptedAtMs: number;
verifiedAtMs: number;
})[] | undefined;
phase: "started";
} | {
deployment: {
id: string;
revision: string;
timestamp: string;
};
scheduledAtMs: number;
mode: "audit" | "live";
notificationRequired: boolean;
planHash: string;
startedAtMs: number;
tickId: string;
execution?: {
params: {
reviewedSlackLifecycleIntent?: {
claimedAtMs: number;
claimedTickId: string;
intentId: string;
proof: {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
reviewed: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
};
sourceHash: string;
};
state: "claimed";
} | undefined;
reviewedProviderIntent?: {
claimedAtMs: number;
claimedTickId: string;
intentId: string;
state: "claimed";
proof: {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
reviewed: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
};
sourceHash: string;
} | {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
sourceHash: string;
provider: "linear";
reviewed: {
accountId: string;
email: string;
googleUserId: string & z.$brand<"GoogleUserId">;
organizationId: string;
organizationUrlKey: string;
};
beforeHash: string;
afterHash: string;
} | {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
sourceHash: string;
provider: "google-group-cleanup";
reviewed: {
expectedPlanHash: string;
action: {
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
type: "remove-inactive-google-group-member";
authorityEmail: string;
} | {
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
type: "remove-inactive-google-group-member";
authorityEmail: string;
role: "MANAGER" | "OWNER";
};
};
beforeHash: string;
afterHash: string;
};
} | undefined;
authorizedActionIds: ("workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people")[];
requestedBy: string;
scheduledTickId?: string | undefined;
planGeneratedAt: string;
plan: {
authorityFingerprint: string;
branches: [{
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: {
after: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
before: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
changedFields: ("linkedin" | "manages" | "reportsTo" | "team" | "title")[];
googleUserId: string | null;
identity: string;
reason: "matched" | "not_org_participant" | "slack_orphan" | "suspended";
slackUserId: string;
}[];
execution: "managed";
killSwitchEngaged: false;
planHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: {
after: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
before: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
changedFields: ("linkedin" | "manages" | "reportsTo" | "team" | "title")[];
googleUserId: string | null;
identity: string;
reason: "matched" | "not_org_participant" | "slack_orphan" | "suspended";
slackUserId: string;
}[];
execution: "audit-only";
killSwitchEngaged: true;
planHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: [];
execution: "disabled";
killSwitchEngaged: true;
planHash: null;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "drive-org-chart";
bytes: number;
people: number;
photos: number;
currentSha256: string;
desiredSha256: string;
fileId?: string | undefined;
execution: "managed";
killSwitchEngaged: false;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "drive-org-chart";
bytes: number;
people: number;
photos: number;
currentSha256: null;
desiredSha256: null;
execution: "disabled";
killSwitchEngaged: true;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "managed";
killSwitchEngaged: false;
planHash: string;
selectedChannelAdditions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
selectedChannelRename: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
} | null;
selectedProvenanceChannelRemovals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
selectedRemovalCount: number;
selectedUserGroupHandles: string[];
selectedUserGroups: {
automationOwnership: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
};
authority: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
};
channelAdditions: {
id: string;
isArchived: boolean;
isPrivate: boolean;
name: string;
}[];
channelAdditionIds: string[];
channelRemovals: {
id: string;
isArchived: boolean;
isPrivate: boolean;
name: string;
}[];
channelRemovalIds: string[];
currentHandle: string | null;
currentName: string | null;
desiredName: string;
effectiveAccessAdditions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
expectedSlackUserGroupId: string | null;
handle: string;
memberAdditions: {
identity: string;
slackUserId: string;
}[];
memberRemovalAuthority: "contractor_group_authoritative" | "explicit_google_lifecycle" | "google_group_authoritative";
memberRemovals: {
identity: string;
slackUserId: string;
}[];
requiredChannelIds: string[];
slackUserGroupId: string | null;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserId: string;
} | undefined;
reviewedLifecycleRemoval?: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
} | undefined;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "audit-only";
killSwitchEngaged: true;
planHash: string;
selectedChannelAdditions: [];
selectedChannelRename: null;
selectedProvenanceChannelRemovals: [];
selectedRemovalCount: 0;
selectedUserGroupHandles: [];
selectedUserGroups: [];
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "disabled";
killSwitchEngaged: true;
planHash: null;
selectedChannelAdditions: [];
selectedChannelRename: null;
selectedProvenanceChannelRemovals: [];
selectedRemovalCount: 0;
selectedUserGroupHandles: [];
selectedUserGroups: [];
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
accountPlans: {
googleUserId: string;
plan: {
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
kind: "executable";
operations: readonly (Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "invite-organization-member";
role: "member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
invitationId: number & z.$brand<"GitHubInvitationId">;
kind: "cancel-invitation";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-organization-member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "add-team-member";
role: "member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-team-member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}>)[];
} | {
blockers: [Readonly<{
code: "direct-repository-grants" | "identity-mismatch" | "inherited-team-membership" | "outside-collaborator" | "owner-protected" | "pending-invitation" | "pending-team-membership" | "privileged-invitation" | "protected-google-identity" | "repository-inventory-incomplete" | "saml-unlinked" | "team-maintainer";
detail: string;
}>, ...Readonly<{
code: "direct-repository-grants" | "identity-mismatch" | "inherited-team-membership" | "outside-collaborator" | "owner-protected" | "pending-invitation" | "pending-team-membership" | "privileged-invitation" | "protected-google-identity" | "repository-inventory-incomplete" | "saml-unlinked" | "team-maintainer";
detail: string;
}>[]];
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
kind: "blocked";
};
}[];
authorityHash: string;
contentHash: string;
execution: "managed";
killSwitchEngaged: false;
managedTeamSlugs: readonly string[];
organizationId: string;
organizationLogin: string;
selectedOperation: {
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
googleUserId: string;
operation: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "invite-organization-member";
role: "member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
invitationId: number & z.$brand<"GitHubInvitationId">;
kind: "cancel-invitation";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-organization-member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "add-team-member";
role: "member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-team-member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}>;
} | null;
teamAccessHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
contentHash: string;
execution: "audit-only";
killSwitchEngaged: true;
proposedChanges: {
authorityPath: string[];
blockers: string[];
current: "absent" | "present" | null;
desired: "blocked" | "member" | "none" | null;
grace: "age_unknown" | "conflicted" | "grace_elapsed" | "immediate_authoritative" | "not_applicable" | "pending_grace";
id: string;
kind: "org_add" | "org_remove" | "policy_exception" | "team_add" | "team_remove";
privilege: "admin" | "blocked" | "maintain" | "maintainer" | "member" | "none" | "pull" | "push" | "repository_specific" | "triage" | "unknown";
reason: string;
safelyActionable: boolean;
subject: {
email?: string | undefined;
githubId?: number | undefined;
googleId?: string | undefined;
login?: string | undefined;
};
target: string;
}[];
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
contentHash: null;
execution: "disabled";
killSwitchEngaged: true;
proposedChanges: [];
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "access-guard";
execution: "managed";
killSwitchEngaged: false;
plan: {
actions: {
accountId: string;
email: string;
googleUserId: string;
provider: "linear";
type: "suspend";
}[];
diagnostics: ({
code: "ambiguous_github_identity" | "ambiguous_google_email" | "ambiguous_provider_email" | "conflicting_github_identity" | "invalid_google_github_identity" | "invalid_google_org_shape" | "pending_provider_invitation" | "protected_linear_account" | "provider_error" | "unmatched_provider_account";
context: Record<string, string | number | boolean>;
level: "error" | "warning";
message: string;
provider?: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack" | undefined;
} | {
code: "provider_readiness";
context: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
};
level: "error";
message: string;
provider: "linear";
})[];
issues: {
details: Record<string, string>;
googleUserId?: string | undefined;
id: string;
kind: "active_downstream_for_inactive_google" | "active_downstream_without_google" | "coverage_failure" | "missing_google_org_metadata";
provider?: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack" | undefined;
summary: string;
}[];
stats: {
activeGooglePeople: number;
googleUsers: number;
providerAccounts: Partial<Record<"ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack", number>>;
inactiveGoogleUsers: number;
};
};
reviewedLinearSuspension?: {
accountId: string;
email: string;
googleUserId: string & z.$brand<"GoogleUserId">;
organizationId: string;
organizationUrlKey: string;
} | undefined;
scheduledLinearSuspension?: true | undefined;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "access-guard";
execution: "disabled";
killSwitchEngaged: true;
plan: null;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "identity-provisioning";
execution: "managed";
githubIdentitySeed: {
kind: "disabled";
reason: string;
} | {
issues: string[];
kind: "blocked";
} | {
artifact: Readonly<{
entries: readonly (Readonly<{
evidence: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
source: "github-enterprise-saml" | "identity-admin";
verifiedAt: string;
}>;
kind: "exact-match";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}> | Readonly<{
candidates: readonly Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[];
kind: "unresolved";
reason: "github-member-not-found" | "missing-verified-evidence" | "unverified-heuristic";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-heuristic" | "evidence-id-login-mismatch";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
}>)[];
schemaVersion: "github-identity-seed-plan/v1";
sourceRevision: string;
summary: Readonly<{
conflicts: number;
exactMatches: number;
unresolved: number;
}>;
contentHash: string & z.$brand<"GitHubIdentitySeedContentHash">;
}>;
githubSourceFingerprint: string;
kind: "managed";
maxChanges: number;
maxProviderReads: number;
userPlans: ({
kind: "blocked";
reason: "deleted" | "inactive" | "not-found";
userId: string & z.$brand<"GoogleUserId">;
} | {
current: {
githubLogin?: (string & z.$brand<"GitHubLogin">) | undefined;
githubUserId?: (string & z.$brand<"GitHubUserId">) | undefined;
} | null;
desired: {
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
};
kind: "update";
user: {
etag: string;
id: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
};
} | {
identity: {
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
};
kind: "unchanged";
user: {
etag: string;
id: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
};
})[];
};
killSwitchEngaged: false;
providerExecution: "audit-only";
schemaPlan: {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "STRING";
indexed: true;
multiValued: false;
readAccessType: "ADMINS_AND_SELF";
}[];
kind: "add-fields";
schemaId: string;
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
issues: string[];
kind: "blocked";
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "STRING";
indexed: true;
multiValued: false;
readAccessType: "ADMINS_AND_SELF";
}[];
kind: "create";
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
kind: "unchanged";
schemaId: string;
} | {
kind: "not-selected";
};
subjects: {
authorityRevision: string;
githubLinked: boolean;
googleUserId: string;
lifecycle: "active" | "archived" | "deleted" | "suspended";
}[];
}, ...({
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "managed";
killSwitchEngaged: false;
reviewedPlan: {
plan: {
errors: string[];
planHash: string;
stats: {
activeGoogleEmployees: number;
contractorGoogleUsers: number;
trycompMembers: number;
};
warnings: string[];
actions: ({
deactivationAuthority?: "contractor_group" | "inactive_google" | undefined;
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "deactivate";
} | {
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "reactivate";
} | {
email: string;
type: "invite";
})[];
};
schemaVersion: "trycomp-reviewed/v1";
deactivationMode?: "device-free-membership-revocation" | "membership-revocation" | undefined;
sourceFingerprint: string;
targetBefore: {
fleetDmLabelId?: number | null | undefined;
platformRole?: string | null | undefined;
deactivated: boolean;
email: string;
id: string;
isActive: boolean;
role: string;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
provider: {
kind: "member";
memberId: string;
email: string;
} | {
kind: "pending-invitation";
email: string;
};
} | undefined;
};
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "audit-only";
killSwitchEngaged: true;
reviewedPlan: {
plan: {
errors: string[];
planHash: string;
stats: {
activeGoogleEmployees: number;
contractorGoogleUsers: number;
trycompMembers: number;
};
warnings: string[];
actions: ({
deactivationAuthority?: "contractor_group" | "inactive_google" | undefined;
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "deactivate";
} | {
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "reactivate";
} | {
email: string;
type: "invite";
})[];
};
schemaVersion: "trycomp-reviewed/v1";
deactivationMode?: "device-free-membership-revocation" | "membership-revocation" | undefined;
sourceFingerprint: string;
targetBefore: {
fleetDmLabelId?: number | null | undefined;
platformRole?: string | null | undefined;
deactivated: boolean;
email: string;
id: string;
isActive: boolean;
role: string;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
provider: {
kind: "member";
memberId: string;
email: string;
} | {
kind: "pending-invitation";
email: string;
};
} | undefined;
};
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "disabled";
killSwitchEngaged: true;
reviewedPlan: null;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-names";
execution: "managed";
killSwitchEngaged: false;
reviewed: {
expectedPlanHash: string;
sourceFingerprint: string;
action: {
beforeRealName: string;
desiredName: string;
email: string;
type: "repair-default-name";
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserId: string;
};
branchId: "slack-names";
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "linear-profiles";
execution: "managed";
killSwitchEngaged: false;
reviewed: {
expectedPlanHash: string;
sourceFingerprint: string;
action: {
beforeFullName: string;
desiredFullName: string;
email: string;
linearUserId: string;
type: "repair-default-full-name";
googleUserId: string & z.$brand<"GoogleUserId">;
};
branchId: "linear-profiles";
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "google-group-cleanup";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
authorityEmail?: string | undefined;
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
role?: "MANAGER" | "OWNER" | undefined;
type: "remove-inactive-google-group-member";
};
expectedPlanHash: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "pagerduty-teams";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: Readonly<{
email: string;
pagerDutyTeamId: string;
pagerDutyUserId: string;
googleGroupId: string;
googleUserId: string;
desiredPagerDutyRole: "manager" | "observer" | "responder";
type: "add";
}> | Readonly<{
email: string;
pagerDutyTeamId: string;
pagerDutyUserId: string;
googleGroupId: string;
googleUserId: string;
currentPagerDutyRole: "manager" | "observer" | "responder";
desiredPagerDutyRole: "manager" | "observer" | "responder";
type: "set-role";
}>;
expectedPlanHash: string;
reviewId: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "sentry-memberships";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
email: string;
memberId: string;
type: "remove-organization-member";
} | {
email: string;
memberId: string;
type: "add-team-member";
} | {
email: string;
type: "invite";
} | {
email: string;
memberId: string;
type: "repair-pending-invite";
} | {
email: string;
memberId: string;
type: "reinvite-expired";
};
authorityPins: {
actor: {
id: string;
orgRole: "admin" | "billing" | "manager" | "member" | "owner";
role: "admin" | "billing" | "manager" | "member" | "owner";
scopes: string[];
teamRole: "admin" | "contributor" | null;
};
organization: {
id: string;
slug: string;
};
project: {
id: string;
slug: string;
};
team: {
id: string;
slug: string;
};
};
expectedPlanHash: string;
googleUserId: string & z.$brand<"GoogleUserId">;
sourceAuthorityFingerprint: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "posthog-memberships";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "invite";
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "cancel-invite";
inviteId: string;
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "remove-member";
userUuid: string;
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "retire-grant";
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "bind-member";
userUuid: string;
};
expectedPlanHash: string;
sourceAuthorityFingerprint: string;
organizationId: string;
} | null;
sourceFingerprint: string;
})[]];
googleUsers: number;
policyVersion: "workspace-directory-v10" | "workspace-directory-v11" | "workspace-directory-v12";
};
planHash: string;
};
summaryHandle: {
announcementDigest: string;
changeKey: string;
channelId: string;
state: "announced" | "completed";
timestamp: string;
};
branchHandles: {
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
change: {
changeKey: string;
text: string;
};
handle: {
announcementDigest: string;
changeKey: string;
channelId: string;
state: "announced" | "completed";
timestamp: string;
};
}[];
version: "workspace-receipt-recovery/v1";
paramsDigest: string;
startedAtMs: number;
result: {
authorizedActionIds: ("workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people")[];
branches: ({
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "managed";
state: "applied" | "skipped";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "audit-only";
state: "audited";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "disabled";
state: "disabled";
})[];
executionId: string;
planHash: string;
} | null;
} | undefined;
executionReceipts?: {
branchReceipts: {
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
changeKey: string;
channelId: string;
timestamp: string;
contentHash: string;
verifiedAtMs: number;
}[];
summaryReceipt: {
channelId: string;
contentHash: string;
outcome: "applied" | "audit-only" | "blocked" | "failed" | "no-op";
planHash: string | null;
slackTimestamp: string;
tickId: string;
verifiedAtMs: number;
workflowId: string | null;
};
} | undefined;
branchAttempts?: ({
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
state: "attempted";
githubDispatchClaim?: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
} | undefined;
attemptedAtMs: number;
} | {
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
state: "not-dispatched";
githubDispatchClaim: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
};
attemptedAtMs: number;
refusal: {
category: "credentials" | "final-authority" | "provider-observation" | "scope";
operationHash: string;
recordedAtMs: number;
};
} | {
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
githubDispatchClaim?: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
} | undefined;
observedAfterFingerprint: string;
result: {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "managed";
state: "applied" | "skipped";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "audit-only";
state: "audited";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "disabled";
state: "disabled";
};
state: "verified";
attemptedAtMs: number;
verifiedAtMs: number;
})[] | undefined;
phase: "planned";
} | {
deployment: {
id: string;
revision: string;
timestamp: string;
};
scheduledAtMs: number;
notificationRequired: boolean;
planHash: string;
startedAtMs: number;
tickId: string;
execution?: {
params: {
reviewedSlackLifecycleIntent?: {
claimedAtMs: number;
claimedTickId: string;
intentId: string;
proof: {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
reviewed: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
};
sourceHash: string;
};
state: "claimed";
} | undefined;
reviewedProviderIntent?: {
claimedAtMs: number;
claimedTickId: string;
intentId: string;
state: "claimed";
proof: {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
reviewed: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
};
sourceHash: string;
} | {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
sourceHash: string;
provider: "linear";
reviewed: {
accountId: string;
email: string;
googleUserId: string & z.$brand<"GoogleUserId">;
organizationId: string;
organizationUrlKey: string;
};
beforeHash: string;
afterHash: string;
} | {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
sourceHash: string;
provider: "google-group-cleanup";
reviewed: {
expectedPlanHash: string;
action: {
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
type: "remove-inactive-google-group-member";
authorityEmail: string;
} | {
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
type: "remove-inactive-google-group-member";
authorityEmail: string;
role: "MANAGER" | "OWNER";
};
};
beforeHash: string;
afterHash: string;
};
} | undefined;
authorizedActionIds: ("workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people")[];
requestedBy: string;
scheduledTickId?: string | undefined;
planGeneratedAt: string;
plan: {
authorityFingerprint: string;
branches: [{
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: {
after: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
before: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
changedFields: ("linkedin" | "manages" | "reportsTo" | "team" | "title")[];
googleUserId: string | null;
identity: string;
reason: "matched" | "not_org_participant" | "slack_orphan" | "suspended";
slackUserId: string;
}[];
execution: "managed";
killSwitchEngaged: false;
planHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: {
after: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
before: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
changedFields: ("linkedin" | "manages" | "reportsTo" | "team" | "title")[];
googleUserId: string | null;
identity: string;
reason: "matched" | "not_org_participant" | "slack_orphan" | "suspended";
slackUserId: string;
}[];
execution: "audit-only";
killSwitchEngaged: true;
planHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: [];
execution: "disabled";
killSwitchEngaged: true;
planHash: null;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "drive-org-chart";
bytes: number;
people: number;
photos: number;
currentSha256: string;
desiredSha256: string;
fileId?: string | undefined;
execution: "managed";
killSwitchEngaged: false;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "drive-org-chart";
bytes: number;
people: number;
photos: number;
currentSha256: null;
desiredSha256: null;
execution: "disabled";
killSwitchEngaged: true;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "managed";
killSwitchEngaged: false;
planHash: string;
selectedChannelAdditions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
selectedChannelRename: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
} | null;
selectedProvenanceChannelRemovals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
selectedRemovalCount: number;
selectedUserGroupHandles: string[];
selectedUserGroups: {
automationOwnership: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
};
authority: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
};
channelAdditions: {
id: string;
isArchived: boolean;
isPrivate: boolean;
name: string;
}[];
channelAdditionIds: string[];
channelRemovals: {
id: string;
isArchived: boolean;
isPrivate: boolean;
name: string;
}[];
channelRemovalIds: string[];
currentHandle: string | null;
currentName: string | null;
desiredName: string;
effectiveAccessAdditions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
expectedSlackUserGroupId: string | null;
handle: string;
memberAdditions: {
identity: string;
slackUserId: string;
}[];
memberRemovalAuthority: "contractor_group_authoritative" | "explicit_google_lifecycle" | "google_group_authoritative";
memberRemovals: {
identity: string;
slackUserId: string;
}[];
requiredChannelIds: string[];
slackUserGroupId: string | null;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserId: string;
} | undefined;
reviewedLifecycleRemoval?: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
} | undefined;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "audit-only";
killSwitchEngaged: true;
planHash: string;
selectedChannelAdditions: [];
selectedChannelRename: null;
selectedProvenanceChannelRemovals: [];
selectedRemovalCount: 0;
selectedUserGroupHandles: [];
selectedUserGroups: [];
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "disabled";
killSwitchEngaged: true;
planHash: null;
selectedChannelAdditions: [];
selectedChannelRename: null;
selectedProvenanceChannelRemovals: [];
selectedRemovalCount: 0;
selectedUserGroupHandles: [];
selectedUserGroups: [];
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
accountPlans: {
googleUserId: string;
plan: {
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
kind: "executable";
operations: readonly (Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "invite-organization-member";
role: "member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
invitationId: number & z.$brand<"GitHubInvitationId">;
kind: "cancel-invitation";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-organization-member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "add-team-member";
role: "member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-team-member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}>)[];
} | {
blockers: [Readonly<{
code: "direct-repository-grants" | "identity-mismatch" | "inherited-team-membership" | "outside-collaborator" | "owner-protected" | "pending-invitation" | "pending-team-membership" | "privileged-invitation" | "protected-google-identity" | "repository-inventory-incomplete" | "saml-unlinked" | "team-maintainer";
detail: string;
}>, ...Readonly<{
code: "direct-repository-grants" | "identity-mismatch" | "inherited-team-membership" | "outside-collaborator" | "owner-protected" | "pending-invitation" | "pending-team-membership" | "privileged-invitation" | "protected-google-identity" | "repository-inventory-incomplete" | "saml-unlinked" | "team-maintainer";
detail: string;
}>[]];
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
kind: "blocked";
};
}[];
authorityHash: string;
contentHash: string;
execution: "managed";
killSwitchEngaged: false;
managedTeamSlugs: readonly string[];
organizationId: string;
organizationLogin: string;
selectedOperation: {
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
googleUserId: string;
operation: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "invite-organization-member";
role: "member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
invitationId: number & z.$brand<"GitHubInvitationId">;
kind: "cancel-invitation";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-organization-member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "add-team-member";
role: "member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-team-member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}>;
} | null;
teamAccessHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
contentHash: string;
execution: "audit-only";
killSwitchEngaged: true;
proposedChanges: {
authorityPath: string[];
blockers: string[];
current: "absent" | "present" | null;
desired: "blocked" | "member" | "none" | null;
grace: "age_unknown" | "conflicted" | "grace_elapsed" | "immediate_authoritative" | "not_applicable" | "pending_grace";
id: string;
kind: "org_add" | "org_remove" | "policy_exception" | "team_add" | "team_remove";
privilege: "admin" | "blocked" | "maintain" | "maintainer" | "member" | "none" | "pull" | "push" | "repository_specific" | "triage" | "unknown";
reason: string;
safelyActionable: boolean;
subject: {
email?: string | undefined;
githubId?: number | undefined;
googleId?: string | undefined;
login?: string | undefined;
};
target: string;
}[];
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
contentHash: null;
execution: "disabled";
killSwitchEngaged: true;
proposedChanges: [];
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "access-guard";
execution: "managed";
killSwitchEngaged: false;
plan: {
actions: {
accountId: string;
email: string;
googleUserId: string;
provider: "linear";
type: "suspend";
}[];
diagnostics: ({
code: "ambiguous_github_identity" | "ambiguous_google_email" | "ambiguous_provider_email" | "conflicting_github_identity" | "invalid_google_github_identity" | "invalid_google_org_shape" | "pending_provider_invitation" | "protected_linear_account" | "provider_error" | "unmatched_provider_account";
context: Record<string, string | number | boolean>;
level: "error" | "warning";
message: string;
provider?: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack" | undefined;
} | {
code: "provider_readiness";
context: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
};
level: "error";
message: string;
provider: "linear";
})[];
issues: {
details: Record<string, string>;
googleUserId?: string | undefined;
id: string;
kind: "active_downstream_for_inactive_google" | "active_downstream_without_google" | "coverage_failure" | "missing_google_org_metadata";
provider?: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack" | undefined;
summary: string;
}[];
stats: {
activeGooglePeople: number;
googleUsers: number;
providerAccounts: Partial<Record<"ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack", number>>;
inactiveGoogleUsers: number;
};
};
reviewedLinearSuspension?: {
accountId: string;
email: string;
googleUserId: string & z.$brand<"GoogleUserId">;
organizationId: string;
organizationUrlKey: string;
} | undefined;
scheduledLinearSuspension?: true | undefined;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "access-guard";
execution: "disabled";
killSwitchEngaged: true;
plan: null;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "identity-provisioning";
execution: "managed";
githubIdentitySeed: {
kind: "disabled";
reason: string;
} | {
issues: string[];
kind: "blocked";
} | {
artifact: Readonly<{
entries: readonly (Readonly<{
evidence: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
source: "github-enterprise-saml" | "identity-admin";
verifiedAt: string;
}>;
kind: "exact-match";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}> | Readonly<{
candidates: readonly Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[];
kind: "unresolved";
reason: "github-member-not-found" | "missing-verified-evidence" | "unverified-heuristic";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-heuristic" | "evidence-id-login-mismatch";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
}>)[];
schemaVersion: "github-identity-seed-plan/v1";
sourceRevision: string;
summary: Readonly<{
conflicts: number;
exactMatches: number;
unresolved: number;
}>;
contentHash: string & z.$brand<"GitHubIdentitySeedContentHash">;
}>;
githubSourceFingerprint: string;
kind: "managed";
maxChanges: number;
maxProviderReads: number;
userPlans: ({
kind: "blocked";
reason: "deleted" | "inactive" | "not-found";
userId: string & z.$brand<"GoogleUserId">;
} | {
current: {
githubLogin?: (string & z.$brand<"GitHubLogin">) | undefined;
githubUserId?: (string & z.$brand<"GitHubUserId">) | undefined;
} | null;
desired: {
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
};
kind: "update";
user: {
etag: string;
id: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
};
} | {
identity: {
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
};
kind: "unchanged";
user: {
etag: string;
id: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
};
})[];
};
killSwitchEngaged: false;
providerExecution: "audit-only";
schemaPlan: {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "STRING";
indexed: true;
multiValued: false;
readAccessType: "ADMINS_AND_SELF";
}[];
kind: "add-fields";
schemaId: string;
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
issues: string[];
kind: "blocked";
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "STRING";
indexed: true;
multiValued: false;
readAccessType: "ADMINS_AND_SELF";
}[];
kind: "create";
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
kind: "unchanged";
schemaId: string;
} | {
kind: "not-selected";
};
subjects: {
authorityRevision: string;
githubLinked: boolean;
googleUserId: string;
lifecycle: "active" | "archived" | "deleted" | "suspended";
}[];
}, ...({
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "managed";
killSwitchEngaged: false;
reviewedPlan: {
plan: {
errors: string[];
planHash: string;
stats: {
activeGoogleEmployees: number;
contractorGoogleUsers: number;
trycompMembers: number;
};
warnings: string[];
actions: ({
deactivationAuthority?: "contractor_group" | "inactive_google" | undefined;
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "deactivate";
} | {
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "reactivate";
} | {
email: string;
type: "invite";
})[];
};
schemaVersion: "trycomp-reviewed/v1";
deactivationMode?: "device-free-membership-revocation" | "membership-revocation" | undefined;
sourceFingerprint: string;
targetBefore: {
fleetDmLabelId?: number | null | undefined;
platformRole?: string | null | undefined;
deactivated: boolean;
email: string;
id: string;
isActive: boolean;
role: string;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
provider: {
kind: "member";
memberId: string;
email: string;
} | {
kind: "pending-invitation";
email: string;
};
} | undefined;
};
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "audit-only";
killSwitchEngaged: true;
reviewedPlan: {
plan: {
errors: string[];
planHash: string;
stats: {
activeGoogleEmployees: number;
contractorGoogleUsers: number;
trycompMembers: number;
};
warnings: string[];
actions: ({
deactivationAuthority?: "contractor_group" | "inactive_google" | undefined;
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "deactivate";
} | {
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "reactivate";
} | {
email: string;
type: "invite";
})[];
};
schemaVersion: "trycomp-reviewed/v1";
deactivationMode?: "device-free-membership-revocation" | "membership-revocation" | undefined;
sourceFingerprint: string;
targetBefore: {
fleetDmLabelId?: number | null | undefined;
platformRole?: string | null | undefined;
deactivated: boolean;
email: string;
id: string;
isActive: boolean;
role: string;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
provider: {
kind: "member";
memberId: string;
email: string;
} | {
kind: "pending-invitation";
email: string;
};
} | undefined;
};
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "disabled";
killSwitchEngaged: true;
reviewedPlan: null;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-names";
execution: "managed";
killSwitchEngaged: false;
reviewed: {
expectedPlanHash: string;
sourceFingerprint: string;
action: {
beforeRealName: string;
desiredName: string;
email: string;
type: "repair-default-name";
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserId: string;
};
branchId: "slack-names";
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "linear-profiles";
execution: "managed";
killSwitchEngaged: false;
reviewed: {
expectedPlanHash: string;
sourceFingerprint: string;
action: {
beforeFullName: string;
desiredFullName: string;
email: string;
linearUserId: string;
type: "repair-default-full-name";
googleUserId: string & z.$brand<"GoogleUserId">;
};
branchId: "linear-profiles";
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "google-group-cleanup";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
authorityEmail?: string | undefined;
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
role?: "MANAGER" | "OWNER" | undefined;
type: "remove-inactive-google-group-member";
};
expectedPlanHash: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "pagerduty-teams";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: Readonly<{
email: string;
pagerDutyTeamId: string;
pagerDutyUserId: string;
googleGroupId: string;
googleUserId: string;
desiredPagerDutyRole: "manager" | "observer" | "responder";
type: "add";
}> | Readonly<{
email: string;
pagerDutyTeamId: string;
pagerDutyUserId: string;
googleGroupId: string;
googleUserId: string;
currentPagerDutyRole: "manager" | "observer" | "responder";
desiredPagerDutyRole: "manager" | "observer" | "responder";
type: "set-role";
}>;
expectedPlanHash: string;
reviewId: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "sentry-memberships";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
email: string;
memberId: string;
type: "remove-organization-member";
} | {
email: string;
memberId: string;
type: "add-team-member";
} | {
email: string;
type: "invite";
} | {
email: string;
memberId: string;
type: "repair-pending-invite";
} | {
email: string;
memberId: string;
type: "reinvite-expired";
};
authorityPins: {
actor: {
id: string;
orgRole: "admin" | "billing" | "manager" | "member" | "owner";
role: "admin" | "billing" | "manager" | "member" | "owner";
scopes: string[];
teamRole: "admin" | "contributor" | null;
};
organization: {
id: string;
slug: string;
};
project: {
id: string;
slug: string;
};
team: {
id: string;
slug: string;
};
};
expectedPlanHash: string;
googleUserId: string & z.$brand<"GoogleUserId">;
sourceAuthorityFingerprint: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "posthog-memberships";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "invite";
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "cancel-invite";
inviteId: string;
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "remove-member";
userUuid: string;
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "retire-grant";
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "bind-member";
userUuid: string;
};
expectedPlanHash: string;
sourceAuthorityFingerprint: string;
organizationId: string;
} | null;
sourceFingerprint: string;
})[]];
googleUsers: number;
policyVersion: "workspace-directory-v10" | "workspace-directory-v11" | "workspace-directory-v12";
};
planHash: string;
};
summaryHandle: {
announcementDigest: string;
changeKey: string;
channelId: string;
state: "announced" | "completed";
timestamp: string;
};
branchHandles: {
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
change: {
changeKey: string;
text: string;
};
handle: {
announcementDigest: string;
changeKey: string;
channelId: string;
state: "announced" | "completed";
timestamp: string;
};
}[];
version: "workspace-receipt-recovery/v1";
paramsDigest: string;
startedAtMs: number;
result: {
authorizedActionIds: ("workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people")[];
branches: ({
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "managed";
state: "applied" | "skipped";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "audit-only";
state: "audited";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "disabled";
state: "disabled";
})[];
executionId: string;
planHash: string;
} | null;
} | undefined;
executionReceipts?: {
branchReceipts: {
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
changeKey: string;
channelId: string;
timestamp: string;
contentHash: string;
verifiedAtMs: number;
}[];
summaryReceipt: {
channelId: string;
contentHash: string;
outcome: "applied" | "audit-only" | "blocked" | "failed" | "no-op";
planHash: string | null;
slackTimestamp: string;
tickId: string;
verifiedAtMs: number;
workflowId: string | null;
};
} | undefined;
branchAttempts?: ({
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
state: "attempted";
githubDispatchClaim?: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
} | undefined;
attemptedAtMs: number;
} | {
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
state: "not-dispatched";
githubDispatchClaim: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
};
attemptedAtMs: number;
refusal: {
category: "credentials" | "final-authority" | "provider-observation" | "scope";
operationHash: string;
recordedAtMs: number;
};
} | {
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
githubDispatchClaim?: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
} | undefined;
observedAfterFingerprint: string;
result: {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "managed";
state: "applied" | "skipped";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "audit-only";
state: "audited";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "disabled";
state: "disabled";
};
state: "verified";
attemptedAtMs: number;
verifiedAtMs: number;
})[] | undefined;
mode: "live";
phase: "launched";
workflowId: string;
} | {
deployment: {
id: string;
revision: string;
timestamp: string;
};
scheduledAtMs: number;
startedAtMs: number;
tickId: string;
execution?: {
params: {
reviewedSlackLifecycleIntent?: {
claimedAtMs: number;
claimedTickId: string;
intentId: string;
proof: {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
reviewed: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
};
sourceHash: string;
};
state: "claimed";
} | undefined;
reviewedProviderIntent?: {
claimedAtMs: number;
claimedTickId: string;
intentId: string;
state: "claimed";
proof: {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
reviewed: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
};
sourceHash: string;
} | {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
sourceHash: string;
provider: "linear";
reviewed: {
accountId: string;
email: string;
googleUserId: string & z.$brand<"GoogleUserId">;
organizationId: string;
organizationUrlKey: string;
};
beforeHash: string;
afterHash: string;
} | {
actorHash: string;
branchHash: string;
expiresAtMs: number;
generatedAtMs: number;
leafPlanHash: string;
originalPlanHash: string;
sourceHash: string;
provider: "google-group-cleanup";
reviewed: {
expectedPlanHash: string;
action: {
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
type: "remove-inactive-google-group-member";
authorityEmail: string;
} | {
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
type: "remove-inactive-google-group-member";
authorityEmail: string;
role: "MANAGER" | "OWNER";
};
};
beforeHash: string;
afterHash: string;
};
} | undefined;
authorizedActionIds: ("workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people")[];
requestedBy: string;
scheduledTickId?: string | undefined;
planGeneratedAt: string;
plan: {
authorityFingerprint: string;
branches: [{
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: {
after: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
before: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
changedFields: ("linkedin" | "manages" | "reportsTo" | "team" | "title")[];
googleUserId: string | null;
identity: string;
reason: "matched" | "not_org_participant" | "slack_orphan" | "suspended";
slackUserId: string;
}[];
execution: "managed";
killSwitchEngaged: false;
planHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: {
after: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
before: {
linkedin: string;
manages: string;
reportsTo: string;
team: string;
title: string;
};
changedFields: ("linkedin" | "manages" | "reportsTo" | "team" | "title")[];
googleUserId: string | null;
identity: string;
reason: "matched" | "not_org_participant" | "slack_orphan" | "suspended";
slackUserId: string;
}[];
execution: "audit-only";
killSwitchEngaged: true;
planHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-profiles";
changes: [];
execution: "disabled";
killSwitchEngaged: true;
planHash: null;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "drive-org-chart";
bytes: number;
people: number;
photos: number;
currentSha256: string;
desiredSha256: string;
fileId?: string | undefined;
execution: "managed";
killSwitchEngaged: false;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "drive-org-chart";
bytes: number;
people: number;
photos: number;
currentSha256: null;
desiredSha256: null;
execution: "disabled";
killSwitchEngaged: true;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "managed";
killSwitchEngaged: false;
planHash: string;
selectedChannelAdditions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
selectedChannelRename: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
} | null;
selectedProvenanceChannelRemovals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
selectedRemovalCount: number;
selectedUserGroupHandles: string[];
selectedUserGroups: {
automationOwnership: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
};
authority: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
};
channelAdditions: {
id: string;
isArchived: boolean;
isPrivate: boolean;
name: string;
}[];
channelAdditionIds: string[];
channelRemovals: {
id: string;
isArchived: boolean;
isPrivate: boolean;
name: string;
}[];
channelRemovalIds: string[];
currentHandle: string | null;
currentName: string | null;
desiredName: string;
effectiveAccessAdditions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
expectedSlackUserGroupId: string | null;
handle: string;
memberAdditions: {
identity: string;
slackUserId: string;
}[];
memberRemovalAuthority: "contractor_group_authoritative" | "explicit_google_lifecycle" | "google_group_authoritative";
memberRemovals: {
identity: string;
slackUserId: string;
}[];
requiredChannelIds: string[];
slackUserGroupId: string | null;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserId: string;
} | undefined;
reviewedLifecycleRemoval?: {
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserGroupId: string;
slackUserId: string;
} | undefined;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "audit-only";
killSwitchEngaged: true;
planHash: string;
selectedChannelAdditions: [];
selectedChannelRename: null;
selectedProvenanceChannelRemovals: [];
selectedRemovalCount: 0;
selectedUserGroupHandles: [];
selectedUserGroups: [];
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
additions: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
}[];
branchId: "slack-groups-channels";
channelRenames: {
channelId: string;
currentName: string;
expectedName: string;
isPrivate: boolean;
}[];
lifecycle: {
googleTeamGroupsOutsideAssignmentAllowlist: string[];
nonstandardPublicChannels: string[];
privateChannelRenameCandidates: {
currentName: string;
expectedName: string;
}[];
slackTeamChannelCollisions: string[];
slackUsersWithoutTeamAssignment: {
identity: string | null;
slackUserId: string;
}[];
verticalRetirementCandidates: string[];
};
removals: {
channelId: string;
channelName: string;
identity: string;
isPrivate: boolean;
slackUserId: string;
removalAuthority?: "contractor_group_authoritative" | undefined;
}[];
userGroups: {
automationOwnership?: {
kind: "legacy_unmanaged";
} | {
allowedChannelIds: string[];
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_bootstrap";
sourceGoogleGroupIds: string[];
} | {
allowedChannelIds: string[];
cutoverRevision: string;
evidenceDigest: string;
excludedGoogleGroupIds: string[];
kind: "automation_created" | "explicitly_adopted";
sourceGoogleGroupIds: string[];
} | undefined;
authority?: {
email: string;
excludedEmails?: string[] | undefined;
excludedIds?: string[] | undefined;
id: string;
kind: "google_group";
} | {
emails: string[];
excludedEmails: string[];
excludedIds: string[];
ids: string[];
kind: "google_group_union";
} | undefined;
currentHandle?: string | null | undefined;
currentName?: string | null | undefined;
channelAdditionIds?: string[] | undefined;
channelRemovalIds?: string[] | undefined;
desiredChannelIds: string[];
desiredName?: string | undefined;
desiredUserIds: string[];
handle: string;
memberAdditions?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberAdditionUserIds?: string[] | undefined;
memberRemovals?: {
identity: string;
slackUserId: string;
}[] | undefined;
memberRemovalUserIds?: string[] | undefined;
removalCount: number;
requiredChannelIds?: string[] | undefined;
slackUserGroupId?: string | null | undefined;
status: "create" | "in_sync" | "update";
}[];
execution: "disabled";
killSwitchEngaged: true;
planHash: null;
selectedChannelAdditions: [];
selectedChannelRename: null;
selectedProvenanceChannelRemovals: [];
selectedRemovalCount: 0;
selectedUserGroupHandles: [];
selectedUserGroups: [];
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
accountPlans: {
googleUserId: string;
plan: {
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
kind: "executable";
operations: readonly (Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "invite-organization-member";
role: "member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
invitationId: number & z.$brand<"GitHubInvitationId">;
kind: "cancel-invitation";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-organization-member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "add-team-member";
role: "member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-team-member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}>)[];
} | {
blockers: [Readonly<{
code: "direct-repository-grants" | "identity-mismatch" | "inherited-team-membership" | "outside-collaborator" | "owner-protected" | "pending-invitation" | "pending-team-membership" | "privileged-invitation" | "protected-google-identity" | "repository-inventory-incomplete" | "saml-unlinked" | "team-maintainer";
detail: string;
}>, ...Readonly<{
code: "direct-repository-grants" | "identity-mismatch" | "inherited-team-membership" | "outside-collaborator" | "owner-protected" | "pending-invitation" | "pending-team-membership" | "privileged-invitation" | "protected-google-identity" | "repository-inventory-incomplete" | "saml-unlinked" | "team-maintainer";
detail: string;
}>[]];
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
kind: "blocked";
};
}[];
authorityHash: string;
contentHash: string;
execution: "managed";
killSwitchEngaged: false;
managedTeamSlugs: readonly string[];
organizationId: string;
organizationLogin: string;
selectedOperation: {
desired: Readonly<{
desiredTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "present";
managedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
organizationRole: "member";
rehirePolicy: "fresh-least-privilege";
reviewedDirectGrantRetention?: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
allowedTeamSlugs: readonly (string & z.$brand<"GitHubTeamSlug">)[];
googleUserId: string & z.$brand<"GoogleUserId">;
grants: readonly {
customRoleName?: string | undefined;
permission: "admin" | "maintain" | "pull" | "push" | "triage";
repositoryId: number & z.$brand<"GitHubRepositoryId">;
repositoryName: string & z.$brand<"GitHubRepositoryName">;
}[];
primaryEmail: string & z.$brand<"PrimaryEmail">;
reviewedAt: string;
}> | undefined;
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}>;
lifecycle: Readonly<{
kind: "active";
}>;
}>;
}> | Readonly<{
idempotencyKey: string & z.$brand<"ProvisioningIdempotencyKey">;
kind: "absent";
subject: Readonly<{
aliases?: readonly (string & z.$brand<"PrimaryEmail">)[] | undefined;
authorityRevision: string & z.$brand<"AuthorityRevision">;
github: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "verified";
verifiedAt: string & z.$brand<"IsoInstant">;
}> | Readonly<{
kind: "unlinked";
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-match" | "duplicate-login" | "id-login-mismatch";
}>;
googleUserId: string & z.$brand<"GoogleUserId">;
isAdmin?: boolean | undefined;
isDelegatedAdmin?: boolean | undefined;
observedAt: string & z.$brand<"IsoInstant">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
lifecycle: Readonly<{
kind: "suspended";
}> | Readonly<{
kind: "archived";
}> | Readonly<{
kind: "deleted";
}>;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}>;
googleUserId: string;
operation: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "invite-organization-member";
role: "member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
invitationId: number & z.$brand<"GitHubInvitationId">;
kind: "cancel-invitation";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-organization-member";
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "add-team-member";
role: "member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}> | Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
kind: "remove-team-member";
teamSlug: string & z.$brand<"GitHubTeamSlug">;
}>;
} | null;
teamAccessHash: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
contentHash: string;
execution: "audit-only";
killSwitchEngaged: true;
proposedChanges: {
authorityPath: string[];
blockers: string[];
current: "absent" | "present" | null;
desired: "blocked" | "member" | "none" | null;
grace: "age_unknown" | "conflicted" | "grace_elapsed" | "immediate_authoritative" | "not_applicable" | "pending_grace";
id: string;
kind: "org_add" | "org_remove" | "policy_exception" | "team_add" | "team_remove";
privilege: "admin" | "blocked" | "maintain" | "maintainer" | "member" | "none" | "pull" | "push" | "repository_specific" | "triage" | "unknown";
reason: string;
safelyActionable: boolean;
subject: {
email?: string | undefined;
githubId?: number | undefined;
googleId?: string | undefined;
login?: string | undefined;
};
target: string;
}[];
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "github-access";
contentHash: null;
execution: "disabled";
killSwitchEngaged: true;
proposedChanges: [];
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "access-guard";
execution: "managed";
killSwitchEngaged: false;
plan: {
actions: {
accountId: string;
email: string;
googleUserId: string;
provider: "linear";
type: "suspend";
}[];
diagnostics: ({
code: "ambiguous_github_identity" | "ambiguous_google_email" | "ambiguous_provider_email" | "conflicting_github_identity" | "invalid_google_github_identity" | "invalid_google_org_shape" | "pending_provider_invitation" | "protected_linear_account" | "provider_error" | "unmatched_provider_account";
context: Record<string, string | number | boolean>;
level: "error" | "warning";
message: string;
provider?: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack" | undefined;
} | {
code: "provider_readiness";
context: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
};
level: "error";
message: string;
provider: "linear";
})[];
issues: {
details: Record<string, string>;
googleUserId?: string | undefined;
id: string;
kind: "active_downstream_for_inactive_google" | "active_downstream_without_google" | "coverage_failure" | "missing_google_org_metadata";
provider?: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack" | undefined;
summary: string;
}[];
stats: {
activeGooglePeople: number;
googleUsers: number;
providerAccounts: Partial<Record<"ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack", number>>;
inactiveGoogleUsers: number;
};
};
reviewedLinearSuspension?: {
accountId: string;
email: string;
googleUserId: string & z.$brand<"GoogleUserId">;
organizationId: string;
organizationUrlKey: string;
} | undefined;
scheduledLinearSuspension?: true | undefined;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "access-guard";
execution: "disabled";
killSwitchEngaged: true;
plan: null;
}, {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "identity-provisioning";
execution: "managed";
githubIdentitySeed: {
kind: "disabled";
reason: string;
} | {
issues: string[];
kind: "blocked";
} | {
artifact: Readonly<{
entries: readonly (Readonly<{
evidence: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
source: "github-enterprise-saml" | "identity-admin";
verifiedAt: string;
}>;
kind: "exact-match";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
target: Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>;
}> | Readonly<{
candidates: readonly Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[];
kind: "unresolved";
reason: "github-member-not-found" | "missing-verified-evidence" | "unverified-heuristic";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
}> | Readonly<{
candidates: readonly [Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>, ...Readonly<{
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
}>[]];
kind: "conflict";
reason: "ambiguous-heuristic" | "evidence-id-login-mismatch";
subject: Readonly<{
displayName: string;
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string & z.$brand<"PrimaryEmail">;
}>;
}>)[];
schemaVersion: "github-identity-seed-plan/v1";
sourceRevision: string;
summary: Readonly<{
conflicts: number;
exactMatches: number;
unresolved: number;
}>;
contentHash: string & z.$brand<"GitHubIdentitySeedContentHash">;
}>;
githubSourceFingerprint: string;
kind: "managed";
maxChanges: number;
maxProviderReads: number;
userPlans: ({
kind: "blocked";
reason: "deleted" | "inactive" | "not-found";
userId: string & z.$brand<"GoogleUserId">;
} | {
current: {
githubLogin?: (string & z.$brand<"GitHubLogin">) | undefined;
githubUserId?: (string & z.$brand<"GitHubUserId">) | undefined;
} | null;
desired: {
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
};
kind: "update";
user: {
etag: string;
id: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
};
} | {
identity: {
githubLogin: string & z.$brand<"GitHubLogin">;
githubUserId: string & z.$brand<"GitHubUserId">;
};
kind: "unchanged";
user: {
etag: string;
id: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
};
})[];
};
killSwitchEngaged: false;
providerExecution: "audit-only";
schemaPlan: {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "STRING";
indexed: true;
multiValued: false;
readAccessType: "ADMINS_AND_SELF";
}[];
kind: "add-fields";
schemaId: string;
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
issues: string[];
kind: "blocked";
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "STRING";
indexed: true;
multiValued: false;
readAccessType: "ADMINS_AND_SELF";
}[];
kind: "create";
} | {
after: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
before: {
fields: {
fieldName: "githubLogin" | "githubUserId";
fieldType: "BOOL" | "DATE" | "DOUBLE" | "EMAIL" | "INT64" | "PHONE" | "STRING";
indexed: boolean;
multiValued: boolean;
readAccessType: string | null;
}[];
schemaName: string | null;
};
kind: "unchanged";
schemaId: string;
} | {
kind: "not-selected";
};
subjects: {
authorityRevision: string;
githubLinked: boolean;
googleUserId: string;
lifecycle: "active" | "archived" | "deleted" | "suspended";
}[];
}, ...({
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "managed";
killSwitchEngaged: false;
reviewedPlan: {
plan: {
errors: string[];
planHash: string;
stats: {
activeGoogleEmployees: number;
contractorGoogleUsers: number;
trycompMembers: number;
};
warnings: string[];
actions: ({
deactivationAuthority?: "contractor_group" | "inactive_google" | undefined;
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "deactivate";
} | {
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "reactivate";
} | {
email: string;
type: "invite";
})[];
};
schemaVersion: "trycomp-reviewed/v1";
deactivationMode?: "device-free-membership-revocation" | "membership-revocation" | undefined;
sourceFingerprint: string;
targetBefore: {
fleetDmLabelId?: number | null | undefined;
platformRole?: string | null | undefined;
deactivated: boolean;
email: string;
id: string;
isActive: boolean;
role: string;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
provider: {
kind: "member";
memberId: string;
email: string;
} | {
kind: "pending-invitation";
email: string;
};
} | undefined;
};
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "audit-only";
killSwitchEngaged: true;
reviewedPlan: {
plan: {
errors: string[];
planHash: string;
stats: {
activeGoogleEmployees: number;
contractorGoogleUsers: number;
trycompMembers: number;
};
warnings: string[];
actions: ({
deactivationAuthority?: "contractor_group" | "inactive_google" | undefined;
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "deactivate";
} | {
email: string;
memberId: string;
providerEmail?: string | undefined;
type: "reactivate";
} | {
email: string;
type: "invite";
})[];
};
schemaVersion: "trycomp-reviewed/v1";
deactivationMode?: "device-free-membership-revocation" | "membership-revocation" | undefined;
sourceFingerprint: string;
targetBefore: {
fleetDmLabelId?: number | null | undefined;
platformRole?: string | null | undefined;
deactivated: boolean;
email: string;
id: string;
isActive: boolean;
role: string;
}[];
selectedIdentity?: {
googleUserId: string & z.$brand<"GoogleUserId">;
provider: {
kind: "member";
memberId: string;
email: string;
} | {
kind: "pending-invitation";
email: string;
};
} | undefined;
};
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "trycomp-people";
execution: "disabled";
killSwitchEngaged: true;
reviewedPlan: null;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "slack-names";
execution: "managed";
killSwitchEngaged: false;
reviewed: {
expectedPlanHash: string;
sourceFingerprint: string;
action: {
beforeRealName: string;
desiredName: string;
email: string;
type: "repair-default-name";
googleUserId: string & z.$brand<"GoogleUserId">;
slackUserId: string;
};
branchId: "slack-names";
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
branchId: "linear-profiles";
execution: "managed";
killSwitchEngaged: false;
reviewed: {
expectedPlanHash: string;
sourceFingerprint: string;
action: {
beforeFullName: string;
desiredFullName: string;
email: string;
linearUserId: string;
type: "repair-default-full-name";
googleUserId: string & z.$brand<"GoogleUserId">;
};
branchId: "linear-profiles";
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "google-group-cleanup";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
authorityEmail?: string | undefined;
googleGroupEmail: string;
googleGroupId: string;
googleUserId: string & z.$brand<"GoogleDirectoryUserId">;
lifecycle: "archived" | "deleted" | "suspended";
memberEmail: string;
memberId: string & z.$brand<"GoogleDirectoryUserId">;
role?: "MANAGER" | "OWNER" | undefined;
type: "remove-inactive-google-group-member";
};
expectedPlanHash: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "pagerduty-teams";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: Readonly<{
email: string;
pagerDutyTeamId: string;
pagerDutyUserId: string;
googleGroupId: string;
googleUserId: string;
desiredPagerDutyRole: "manager" | "observer" | "responder";
type: "add";
}> | Readonly<{
email: string;
pagerDutyTeamId: string;
pagerDutyUserId: string;
googleGroupId: string;
googleUserId: string;
currentPagerDutyRole: "manager" | "observer" | "responder";
desiredPagerDutyRole: "manager" | "observer" | "responder";
type: "set-role";
}>;
expectedPlanHash: string;
reviewId: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "sentry-memberships";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
email: string;
memberId: string;
type: "remove-organization-member";
} | {
email: string;
memberId: string;
type: "add-team-member";
} | {
email: string;
type: "invite";
} | {
email: string;
memberId: string;
type: "repair-pending-invite";
} | {
email: string;
memberId: string;
type: "reinvite-expired";
};
authorityPins: {
actor: {
id: string;
orgRole: "admin" | "billing" | "manager" | "member" | "owner";
role: "admin" | "billing" | "manager" | "member" | "owner";
scopes: string[];
teamRole: "admin" | "contributor" | null;
};
organization: {
id: string;
slug: string;
};
project: {
id: string;
slug: string;
};
team: {
id: string;
slug: string;
};
};
expectedPlanHash: string;
googleUserId: string & z.$brand<"GoogleUserId">;
sourceAuthorityFingerprint: string;
} | null;
sourceFingerprint: string;
} | {
diagnostics: {
code: string;
context?: {
error_code: "linear_organization_id_mismatch" | "linear_organization_id_unpinned" | "linear_organization_url_key_mismatch";
kind: "linear_tenant";
observed_organization_id: string;
observed_url_key: string;
} | undefined;
message: string;
scope?: {
kind: "authority";
} | {
kind: "audit";
provider: "ashby" | "attio" | "github" | "linear" | "pagerduty" | "slack";
} | {
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
kind: "action";
} | undefined;
severity: "blocker" | "info" | "warning";
}[];
killSwitchEngaged: boolean;
branchId: "posthog-memberships";
execution: "audit-only" | "disabled" | "managed";
reviewed: {
action: {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "invite";
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "cancel-invite";
inviteId: string;
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "remove-member";
userUuid: string;
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "retire-grant";
} | {
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
type: "bind-member";
userUuid: string;
};
expectedPlanHash: string;
sourceAuthorityFingerprint: string;
organizationId: string;
} | null;
sourceFingerprint: string;
})[]];
googleUsers: number;
policyVersion: "workspace-directory-v10" | "workspace-directory-v11" | "workspace-directory-v12";
};
planHash: string;
};
summaryHandle: {
announcementDigest: string;
changeKey: string;
channelId: string;
state: "announced" | "completed";
timestamp: string;
};
branchHandles: {
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
change: {
changeKey: string;
text: string;
};
handle: {
announcementDigest: string;
changeKey: string;
channelId: string;
state: "announced" | "completed";
timestamp: string;
};
}[];
version: "workspace-receipt-recovery/v1";
paramsDigest: string;
startedAtMs: number;
result: {
authorizedActionIds: ("workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people")[];
branches: ({
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "managed";
state: "applied" | "skipped";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "audit-only";
state: "audited";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "disabled";
state: "disabled";
})[];
executionId: string;
planHash: string;
} | null;
} | undefined;
executionReceipts?: {
branchReceipts: {
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
changeKey: string;
channelId: string;
timestamp: string;
contentHash: string;
verifiedAtMs: number;
}[];
summaryReceipt: {
channelId: string;
contentHash: string;
outcome: "applied" | "audit-only" | "blocked" | "failed" | "no-op";
planHash: string | null;
slackTimestamp: string;
tickId: string;
verifiedAtMs: number;
workflowId: string | null;
};
} | undefined;
branchAttempts?: ({
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
state: "attempted";
githubDispatchClaim?: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
} | undefined;
attemptedAtMs: number;
} | {
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
state: "not-dispatched";
githubDispatchClaim: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
};
attemptedAtMs: number;
refusal: {
category: "credentials" | "final-authority" | "provider-observation" | "scope";
operationHash: string;
recordedAtMs: number;
};
} | {
workflowId: string;
paramsDigest: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
actionId: "workspace-directory.drive-org-chart" | "workspace-directory.fanout" | "workspace-directory.github-access" | "workspace-directory.google-group-cleanup" | "workspace-directory.linear-profiles" | "workspace-directory.linear-suspensions" | "workspace-directory.pagerduty-teams" | "workspace-directory.posthog-memberships" | "workspace-directory.sentry-memberships" | "workspace-directory.slack-groups-channels" | "workspace-directory.slack-names" | "workspace-directory.slack-profiles" | "workspace-directory.trycomp-people";
changeKey: string;
changeSetDigest?: string | undefined;
sourceIdentity: {
kind: "identity";
googleUserId: string & z.$brand<"GoogleUserId">;
providerAccountId: string;
systemId: "ashby" | "attio" | "github" | "google-workspace" | "linear" | "pagerduty" | "posthog" | "sentry" | "slack" | "trycomp";
} | {
kind: "resource";
systemId: string;
resourceId: string;
} | {
kind: "pending-invitation";
systemId: "trycomp";
googleUserId: string & z.$brand<"GoogleUserId">;
email: string;
};
sourceFingerprint: string;
beforeFingerprint: string;
afterFingerprint: string;
githubDispatchClaim?: {
protocol: "github-single-operation/v1";
claimId: string;
operationHash: string;
} | undefined;
observedAfterFingerprint: string;
result: {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "managed";
state: "applied" | "skipped";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "audit-only";
state: "audited";
} | {
detail: string;
branchId: "access-guard" | "drive-org-chart" | "github-access" | "google-group-cleanup" | "identity-provisioning" | "linear-profiles" | "pagerduty-teams" | "posthog-memberships" | "sentry-memberships" | "slack-groups-channels" | "slack-names" | "slack-profiles" | "trycomp-people";
execution: "disabled";
state: "disabled";
};
state: "verified";
attemptedAtMs: number;
verifiedAtMs: number;
})[] | undefined;
completedAtMs: number;
mode: "audit" | "live" | null;
notificationRequired: boolean;
outcome: "applied" | "audit-only" | "blocked" | "failed" | "no-op";
blockedReason?: "action_policy" | "apply_not_supported" | "diagnostics" | "mutation_confirmation_mismatch" | "mutation_confirmation_required" | "plan_blocked" | "plan_expired" | "read_failed" | "readback_failed" | "review_required" | "risk_acknowledgement_required" | "source_drift" | "target_drift" | "write_failed" | undefined;
phase: "terminal";
planHash: string | null;
receipt: {
channelId: string;
contentHash: string;
outcome: "applied" | "audit-only" | "blocked" | "failed" | "no-op";
planHash: string | null;
slackTimestamp: string;
tickId: string;
verifiedAtMs: number;
workflowId: string | null;
} | null;
recovery?: {
priorCompletedAtMs: number;
priorOutcome: "failed";
priorReceipt: {
channelId: string;
contentHash: string;
outcome: "applied" | "audit-only" | "blocked" | "failed" | "no-op";
planHash: string | null;
slackTimestamp: string;
tickId: string;
verifiedAtMs: number;
workflowId: string | null;
} | null;
recoveredAtMs: number;
version: "workspace-verified-attempt-result-recovery/v1";
} | undefined;
workflowId: string | null;
} | null;
mutationSafetyClear: boolean;
pendingTicks: number;
scheduleHealthy: boolean;
unresolvedMutations: number;
}>;
}
export {};