Skip to content

Run all AI work through YAML workflows - #8

Merged
dkropachev merged 9 commits into
mainfrom
feat/yaml-ai-workflows
Oct 27, 2026
Merged

dkropachev merged 9 commits into
mainfrom
feat/yaml-ai-workflows

Conversation

@dkropachev

Copy link
Copy Markdown
Contributor

Issue

Only issue investigations used YAML workflows. Regular tasks, PR reviews, priority assessments and question-recovery helpers started model turns directly, leaving their execution contracts in application code.

Fix

Run every model-producing turn through embedded YAML definitions using the pinned agent-workflow Go executor. Move priority and helper response schemas into their workflow definitions, reject invalid results without automatic repair, and propagate workflow failures to callers.

Preserve retained Codex sessions, selected skills, models, modes, sandbox and publishing authority, native questions and approvals, steering, interrupts and restart recovery. Keep launches and answered-question continuations in Starting until their provider turn is acknowledged. Update specification mappings and generated reconciliation records.

Decisions

  • Use the Go workflow executor with the existing interactive Codex transport adapter to preserve native session controls and scoped permissions. Issue investigations keep their detached workflow controller.
  • Keep the application ledger authoritative for recovery and uncertain delivery. Private workflow checkpoints retain execution status and omit prompts, answers, output and provider error text.
  • Fixture verification establishes local behavior; installed-provider and real-host acceptance remain explicit opt-ins.

Route task, review, assessment and question-helper turns through embedded
YAML definitions and the pinned agent-workflow executor. Retain native
Codex session controls, selected skills and invocation authority through
an interactive provider adapter.

Keep recovery and uncertain delivery owned by the application ledger.
Record private status-only workflow checkpoints, reject invalid structured
results without replay, and propagate workflow failures to callers.
Preserve Starting during launch and answered-question continuation
admission. Map workflow definitions and regression assertions in the
maintained specifications.
Reject pending native replies after durable interruption intent, before
claiming the request or saving its answer. Provider completion can arrive
after the interrupt RPC returns, so the pending flag alone is insufficient.
Preserve retained async and textual question recovery.

Map the interruption boundary and deterministic barrier regression in the
UI and answer flow specifications. The regression fails without the guard;
focused race checks and 20 repeated MCP stale-recovery cases pass.
The fallback reaches idle before its final recovery event is journaled.
Wait for that completion before measuring the next preparation event
count, preserving the existing event assertion.

The preparation case passes 100 repeated race-enabled runs, with all 11
surrounding review tests passing.
Expose failed interactive workflow finalization through the existing
callback using originating turn/thread identities and a generic diagnostic.
Preserve native terminal timing, follow-up admission and ledger recovery.
Release execution ownership before diagnostic delivery so shutdown cannot
join a callback waiting for its session lock.

Exercise late persistence failures, active follow-up, shutdown and private
checkpoint serialization with fixture regressions. Map the assertions and
completed-turn boundary in the affected flow contracts.
Restore inactive state when admission cannot be saved before dispatch,
while retaining an acknowledged active turn when the later save fails.
Roll back only still-starting state so terminal outcomes remain intact.
Keep the durable answer claim authoritative and never replay a sent turn.

Use storage-fault regressions to separate unsent and acknowledged cases.
Check journal history so queued notifications cannot hide a false idle
transition, and map these assertions into the recovery contracts.
Return setup persistence errors through a deferred-unlock scope before
failing the test. Fixture shutdown can then acquire the session mutex on
either error path. Preserve the admission and recovery-claim assertions.

The admission and storage-failure cases pass 20 repetitions each under
the race detector.
Share acknowledgement acceptance across both admission paths. Stop the
admission cancellation callback before transferring observation to the
retained client, and reject canceled admission or client lifetime before
decoding a successful acknowledgement. Never replay native work.

Exercise a buffered acknowledgement against an in-progress cancellation
callback, successful admission followed by caller cancellation, and client
shutdown. Preserve early completion, structured validation and diagnostics.
Give each startup, turn, follow-up and interrupt RPC a fresh ten-second
test deadline. Retain the client lifetime separately so caller cancellation
and shutdown assertions still exercise the intended ownership transfer.

Blocked initialization, thread and turn probes fail locally with cleanup
before the package timeout. Preserve the existing behavior assertions.
Validate structured provider output against its YAML-owned schema using the
existing schema library. Reject numeric upper limits missed by the pinned
executor without repairing output, replaying work or exposing response data.
Refuse external schema loading and preserve the executor dependency pin.

Exercise independent priority/confidence violations and exact boundaries
through the actual provider fixture. Synchronize Close entry in the blocked
checkpoint test and verify sensitivity with a private no-drain mutation.
@dkropachev
dkropachev merged commit f184049 into main Oct 27, 2026
1 check passed
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