Skip to content

(CODUX-216) Make publications and execution durable - #2953

Merged
numnx merged 1 commit into
feature/CODUX-216-nodes-full-integrationfrom
task/feature-codux-21-t03-codex-80cfa686-mrharjrk
Jul 12, 2026
Merged

(CODUX-216) Make publications and execution durable#2953
numnx merged 1 commit into
feature/CODUX-216-nodes-full-integrationfrom
task/feature-codux-21-t03-codex-80cfa686-mrharjrk

Conversation

@numnx

@numnx numnx commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Make publications and execution durable

Automated task PR opened by Code UX for T03.

📋 Summary

Sprint: Sprint 216 · Nodes Full Integration · Task: T03

Turn the existing project-scoped node-flow foundation and browser-local canvas into a canonical, secure, versioned automation control plane with registry-driven nodes, encrypted credentials, durable execution, governed integrations, isolated custom nodes, agent authoring, dashboard integration, and authenticated headless readiness.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.6-sol

⏱️ Timing

Started 2026-07-12 04:32:18 UTC
Finished 2026-07-12 04:44:44 UTC
Duration 12m 26s

📊 Token Usage

Metric Value
Input tokens 163,262
Cached input tokens 6,386,688
Output tokens 28,033
Total tokens 6,577,983
Invocations 1
Tool calls 71
Active time 12m 1s

Included usage estimate (subscription/local login): $4.85

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

📝 Full Task Prompt
## Objective
Replace the current sequential latest-version execution path with a durable, version-pinned execution plane that can recover safely from crashes and expose redacted attempt history.

## Scope
- `src/services/node-flow-runtime-service.ts`
- `src/services/node-flow-service.ts`
- `src/repositories/node-flow-repository.ts`
- `src/repositories/db/app-db-migrations.ts`
- `src/contracts/node-flow-types.ts` and new execution-policy contracts
- `src/services/scheduler-service.ts`
- `src/contracts/scheduler-types.ts`
- `src/repositories/scheduler-repository.ts`
- New queue, lease, attempt, publication, and recovery services under `src/services/node-flows/`
- `src/app/dependency-factory/dashboard-factory.ts`
- `tests/backend/services/node-flow-runtime-service.test.ts`, scheduler tests, repository tests, and new recovery tests
- Runtime and scheduler documentation under `docs/` and `docs-web/`

## Implementation Requirements
1. Add publication records and immutable policy snapshots; make manual, MCP, and scheduled runs explicitly select a published version or follow the latest published version, and execute the selected snapshot rather than the mutable current flow.
2. Add durable run lifecycle states, queue claims, lease owner/expiry/heartbeat fields, node-flow node-attempt rows, attempt numbers, executor identity, invocation IDs, artifact digests, redacted payloads, failure classifications, and retry decisions.
3. Implement bounded concurrency, timeout and abort propagation, retry policies with exponential backoff/jitter and retryable classes, project quotas, cancellation propagation, and deterministic crash recovery for queued, running, approval-waiting, and retry-waiting work.
4. Integrate the T02 credential broker as a per-node capability boundary and ensure run records, node attempts, invocation messages, and diagnostics retain only credential IDs and redacted values.
5. Add tests for explicit version pinning, latest-version selection, retries, leases, restart recovery, cancellation, timeouts, quotas, redaction, and scheduler behavior; update documentation for the durable lifecycle.

## Constraints
- Do not silently replay unknown side-effect outcomes; represent them as attention-required states.
- Preserve existing successful built-in behavior while routing execution through the new lifecycle.
- Do not let scheduler `flowVersion` remain audit-only metadata.

## Verification
- Run `pnpm exec vitest run tests/backend/services/node-flow-runtime-service.test.ts tests/backend/services/scheduler-service.test.ts tests/backend/repositories/node-flow-repository.test.ts` plus new execution tests.
- Confirm a schedule pinned to version N executes version N after version N+1 is published, while a follow-latest schedule executes N+1.
- Simulate process interruption and verify leases recover without duplicate node attempts or silent duplicate side effects.
- Run `pnpm run typecheck`, `pnpm run test:backend`, `pnpm run build`, and `pnpm run check:docs-web`.
🌿 Branch Info

Base: feature/CODUX-216-nodes-full-integration
Head: task/feature-codux-21-t03-codex-80cfa686-mrharjrk


🤖 Generated by Code UX

@numnx
numnx merged commit 81a423e into feature/CODUX-216-nodes-full-integration Jul 12, 2026
20 checks passed
@numnx
numnx deleted the task/feature-codux-21-t03-codex-80cfa686-mrharjrk branch July 12, 2026 04:49
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