Skip to content

feat(flowsafe): close long-running agent residuals#34

Open
gcharang wants to merge 5 commits into
devfrom
feat/close-long-running-agent-residuals
Open

feat(flowsafe): close long-running agent residuals#34
gcharang wants to merge 5 commits into
devfrom
feat/close-long-running-agent-residuals

Conversation

@gcharang

Copy link
Copy Markdown
Contributor

Summary

Closes the residuals deferred across the long-running-agents program (Tracks A/B/C/D): the spike's per-thread DO now hosts a real runtime-driven durable agent, and Track B execution runs on D1 without a core version bump. flowsafe minor (changeset included).

  • Durable agent on the thread DO — starts register with Mastra's public thread runtime; restart resume performs prepare → observe/register → runtime resume after validating the snapshot memory binding (eviction-safe).
  • Server-only resume routing — approval records may carry a tenant-validated resumeTarget; reviewer payloads still can't name it (TCB-only field).
  • Tenant-safe thread routing everywhere — idle wake, agent schedule targets, and the new createNotificationDispatchTick all route through createThreadTopology (header overwritten, ownership-404 before addressing).
  • Track B execution enabledcreateBackgroundTaskD1Domains + BackgroundTaskHost.execution (one manager per tenant DO); serialized D1 workflow adapter, tenant-scoped task domain, store/TTL/offboarding snapshot cascades close R-B1/R-B2/R-B3 and tenant-blind recovery.
  • Live proof split from CI — deterministic spike:verify stays the CI gate; spike:verify:llm (requires SPIKE_LLM_MODEL_ID + SPIKE_LLM_API_KEY) drives the real LLM loop across kill/restart.

Verification

  • pnpm lint && pnpm typecheck && pnpm test && pnpm build green
  • pnpm --filter @proofoftech/flowsafe spike:verify green (workerd restart + fail-closed probes)
  • Credentialed spike:verify:llm exercised against a real model

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
anchorage-showcase 46f6acf Jul 25 2026, 08:09 AM

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