Skip to content

Guard Droid reconcile with live activity - #16

Merged
sarthakagrawal927 merged 1 commit into
mainfrom
codex/droid-run-reconcile
May 14, 2026
Merged

sarthakagrawal927 merged 1 commit into
mainfrom
codex/droid-run-reconcile

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

Summary

  • make Droid reconcile consider live run-room activity when deciding whether a run is stale
  • include the activity source in active-run reconcile conflicts
  • add coverage for stale D1 rows with fresh run-room activity

Tests

  • pnpm -F @saas-maker/droid typecheck
  • pnpm vitest run tests/droid/runs.test.ts tests/droid/patch.test.ts
  • pnpm test
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ee45c995c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread workers/droid/src/app.ts
candidates.push({ created_at: latestEvent.created_at, source: 'd1', parsed: latestEventTime });
}

const roomStatus = await getRunRoomStatus(env, runId);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Tolerate run-room status failures during reconcile

When DROID_RUN_ROOMS is configured but the Durable Object lookup/status call fails transiently, this new awaited call makes /v0/runs/:id/reconcile hit the app-level 500 handler before it can fall back to the D1 event history. Run-room writes are already treated as best-effort in createRunEvent, so reconcile should similarly catch/log getRunRoomStatus failures and continue using the D1 candidate; otherwise operators can lose the recovery path for stale running rows exactly when the live room is unavailable.

Useful? React with 👍 / 👎.

@sarthakagrawal927
sarthakagrawal927 merged commit 40dd052 into main May 14, 2026
8 checks passed
@sarthakagrawal927
sarthakagrawal927 deleted the codex/droid-run-reconcile branch May 14, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant