Approval demo
UC1
- Consume an authenticated Slack event for an explicitly approved workspace and test channel. The task uses fictional pickup routing.
- Generate and execute a runtime task graph. Demonstrate the first reviewer rejecting the missing held route, an agent repair, and successful re-review with independent routing checks.
- Bind a threaded Slack decision to the approver and open run wait. Record simulated shipment only after approval and send the Done, Next, and Blocked summary in the same thread.
- Settle the SDK's pending dispatch promise when resuming an already-completed helper effect. A regression test covers a Slack write immediately before a human wait.
Verification
- Passed
flows check, example typecheck, and the end-to-end mock-agent and mock-Slack verification on Node 22.23.3. - Completed a real Codex agent run with mock Slack and a simulated shipment on Node 26.8.1. The example README records the invocation and journal receipts.
- Live Slack delivery is pending an approved channel, designated approver, and existing authenticated ingress and writeback access.
Review verification at 70f329df
The SDK build, example typecheck, mock rehearsal and 24 focused SDK tests passed on Node 22.23.3 at 70f329dfbfcd16ce651ab676bd0b5bd17a36ef21. The synthetic Relayfile cases used a local directory and did not contact Slack. Rehearsal commands
- The approval callback restarted relayflowd after it stopped at the human wait and completed the same run
01M8TTHJ92HHEMN0S8HNBPRFW0.node examples/nabis-uc1/verify.mjsassertedresumedAfterDaemonRestart=true. Thread 4765987773 · Restart test - The bridge resolved relative
RELAYFILE_MOUNT_PATH=mountbefore entering its private working directory. In a targeted rehearsal with synthetic delivery receipts, run01M8TTQHHMZ9D97P7657SFH6KTwrote the prompt and summary beneath that mount in the same fixture thread and then completed. Thread 4765987931 · Mount resolution - The held-only coder returned
{"rules":null}in targeted mock run01M8TTQN1P6PG5DSGBG1XM4Z9Y. The run recordedstep_failedand a threaded blocked summary before the reviewer or human wait. Both comments identify the same input check. Thread 4765988130 · Thread 4766011976 · Coder output validation - The SDK settles the memoized helper's dispatch promise because the lifecycle tracks the promise from
completed.catch(). Removing onlyresolve()reproducedunsettled_derived_work. Restoring it passed and verified a single approval prompt followed by anApprovedreply in its thread. The SDK source and test match the mutation receipt at this head. The 24-test successor run included this regression. Thread 4766046957 · Fail-and-pass receipt · SDK regression test
Successor verification at b93e1217
The model-pin successor declares codex/gpt-5.6-sol for the UC1 worker. The bridge still uses the local read-only Codex shim. The shipped-source scanner found no missing or unresolved model pair for UC1. Pinned agent call
- The mock rehearsal passed at the successor and completed run
01M8TV9F81T9S329MW98CYGEKTafter a daemon restart. The two targeted cases also passed. Run01M8TV9F50EMS5FF30KJT4QM2Cwrote through the relative synthetic mount and surfaced the stale socket warning. Run01M8TV9JW85WTJ7W94C93WPDH5stopped on malformed coder output. Rehearsal commands - Real Codex with the supported model completed run
01M8TV5KEFQDA9QAGASGRBA823with mock Slack and one simulated shipment. Journal receipt
Linux artifact result and PATH follow-up
The Linux artifact job on b93e1217 stopped in the full SDK suite with 11 failures, 5,029 passes, and 14 skips. All 11 failing cases also failed on the fa65e682 merge base. The UC1 model-pin check and authored Slack replay tests passed in the Linux job. Successor Linux job · Merge-base Linux run
The bridge drops empty PATH entries before resolution at 5008a075. In a targeted mock rehearsal, removing the filter let a trailing empty entry expose the launch directory to the fake agent and reproduced a refusal. Restoring the filter passed. At 5008a075, the same rehearsal approved mock run 01M8TWEVJFR44HVGR6ZW2RRMAK with the trailing empty entry present in the launch environment. Thread 4766274883 · PATH normalization
PATH verification at ee428459
The bridge drops empty PATH entries. If that leaves only the read-only Codex shim, the shim exits 127 immediately. The previous shim timed out in the same setup. At ee428459, the targeted trailing-entry rehearsal passed in mock run 01M8TWQ1GF0V5S50DJWWTJ5F0E. The full mock verifier also passed, including the shim-only refusal and approval after a daemon restart, in run 01M8TWQ53D1DNMTQTWSZ3RRZFC. Review thread 4766274883 · Verifier
The exact-head Linux artifact job stopped in the SDK suite with 11 failures, 5,029 passes, and 14 skips. All 11 failures also appeared on the fa65e682 merge base. The shipped-source model-pin and authored Slack tests passed. Exact-head Linux job · Merge-base Linux run

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds the Nabis UC1 Slack approval demo, where a Slack mention in an approved workspace and test channel starts a fictional pickup-routing run: a planner builds a task graph at runtime, the first reviewer rejects the missing held route, a repair agent fixes it, and a threaded approval from the designated approver must confirm before a simulated shipment is recorded. Also fixes the SDK so resuming an already-completed helper effect settles its pending dispatch promise instead of leaving derived work pending after a Slack write before a human wait.
The demo ships with both a local Socket Mode listener and a native hosted Slack path. The local bridge validates incoming events through a scoped envelope, persists accepted callbacks to an inbox before Slack acknowledgment, and replays unfinished work after a listener restart. It routes through the Flows CLI and the f.human gate, reconnecting to the local journal before each approval so decisions land after a daemon restart. Mock-agent and real Codex runs pass with mock Slack, including refusals for wrong workspace, channel, approver, or thread, stale replies, bot replies, and a shim-only PATH.
Hosted Slack path
- Adds the
mentioned=trueboolean to theslack:trigger settings in@relayflows/surfaceso Cloud accepts a top-level app mention for the approved channel. - Posts a link to the live Cloud run as the first threaded reply, before any agent or Slack step; the base URL is validated like the SDK and normalized to strip trailing slashes and empty query or fragment separators, and invalid bases fail the run before any reply or agent step.
- Verifies the mounted Slack record (sender, exact text, thread) before any agent or reply step; on a cold start it waits up to 60 seconds for the trigger's record to appear in the mirror.
- Posts the approval question in the trigger thread and records the simulated shipment only after the designated approver confirms.
- Hosted tests exercise the input, mounted-record, mirror-delay, approval, and Cloud-link normalization branches with local fixtures; a live Slack rehearsal in the approved workspace is pending.
A live recording needs the approved workspace, test channel, designated approver, and authenticated ingress and writeback access.