Skip to content

Commit d5f2f08

Browse files
committed
fix: address feedback
1 parent 13454c0 commit d5f2f08

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

apps/workflows/src/cron/external-status.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ export async function runExternalStatusTick(): Promise<{
404404
const triplets = buildTriplets(services);
405405
const tickStartedAt = new Date();
406406

407+
// The three phases are intentionally independent: each hits a different
408+
// upstream endpoint and store, so a failed status fetch must not suppress a
409+
// service's components (or vice versa). A tick can therefore persist
410+
// component history for a service whose status snapshot failed that tick.
407411
const [statusOutcomes, incidentOutcomes, componentOutcomes] =
408412
await Effect.runPromise(
409413
Effect.all(

packages/services/src/external-service-component/upsert.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ export async function upsertExternalComponentsForService(args: {
4949
updatedAt: now,
5050
}));
5151

52+
// No `withTransaction`/`emitAudit`: external services are a global, public,
53+
// cron-driven catalogue with no workspace scope or audit log (ADR-0006/0007),
54+
// mirroring `upsertExternalIncidentsForService`. `withBusyRetry` wraps the raw
55+
// transaction since the audit-aware helper expects a workspace ServiceContext.
5256
return withBusyRetry(() =>
5357
db.transaction(async (tx) => {
5458
const rows = await tx

0 commit comments

Comments
 (0)