Skip to content

Add direct workflow dry-run contract - #134

Merged
wren-nutthouse merged 3 commits into
mainfrom
feat/tutti-direct-dry-run-contract
Jul 20, 2026
Merged

Add direct workflow dry-run contract#134
wren-nutthouse merged 3 commits into
mainfrom
feat/tutti-direct-dry-run-contract

Conversation

@wren-nutthouse

Copy link
Copy Markdown
Collaborator

Summary

Milestone A only from the Tutti fix-up plan: establish the direct workflow dry-run/config contract without implementing any provider/API execution.

  • Adds tt run --direct as a planning/dry-run mode selector for prompt steps.
  • Extends prompt workflow config with optional direct, provider, model, and policy metadata.
  • Resolves direct prompt steps to an explicit internal direct step shape.
  • Shows direct provider/model/policy/prompt metadata in human and JSON dry-run output.
  • Rejects non-dry-run direct execution with an actionable “not implemented yet” error.
  • Preserves existing non-direct workflow paths by defaulting all service/webhook/verify/scheduler call sites to direct: false.

Non-goals

  • No real model/provider/API execution.
  • No provider secrets or global-provider lookup.
  • No dashboard/product redesign.
  • No atomic-write/env-scrub/replay/context-compaction work.
  • No merge or modification of existing open PR branches.

Verification

Local verification from /Users/adamnutt/work/nutthouse/tutti:

cargo fmt
cargo test --quiet
# 463 unit tests passed
# 1 integration test passed

cargo clippy --all-targets -- -D warnings
# finished successfully

cargo build --quiet
# finished successfully

Dry-run smoke checks:

(cd /tmp/tutti-direct-smoke && target/debug/tt run plan --direct --dry-run --json)
# emitted a `type: direct` step with provider/model `default/default`, policy `read_only`, and output_json path

(cd /tmp/tutti-direct-config-smoke && target/debug/tt run plan --dry-run)
# emitted human dry-run row: type direct, provider openai, model gpt-5.6-sol, policy read_only

(cd /tmp/tutti-direct-config-smoke && target/debug/tt run plan)
# exits non-zero with: direct execution is not implemented yet; use `tt run plan --dry-run`

Open PR signal reviewed before opening this PR

Current open PRs and interaction risk:

PR Signal Interaction with this PR
#130 Finish Tutti trust and activation sprint CONFLICTING / DIRTY, review required. Touches activation/runs/automation/docs. Overlaps src/automation/mod.rs, src/cli/mod.rs, src/main.rs; should not be merged without rebasing after this or vice versa.
#132 Add configurable tmux/Zellij multiplexer backends Mergeable but blocked on review/admin; CodeRabbit latest check green and author reports local cargo test --quiet pass. Overlaps src/automation/mod.rs, src/config/mod.rs, src/main.rs; likely needs a rebase if this lands first.
#133 Add OpenCode CLI runtime adapter Mergeable but review required; Greptile flagged broad "opencode" idle pattern and missing idle/completion/auth tests. Overlaps src/config/mod.rs; direct contract should compose, but #133 should address Greptile adapter-detection findings before merge.

Product/market-learning signal folded in

Chief-of-Staff / operating-context learnings point Tutti toward an evidence/control-plane product, not just another runtime adapter collection:

  • Direct API execution needs explicit provider/model/policy and run-id correlation before real execution.
  • The market direction is orchestration with auditable gates, recovery, evidence, and multi-agent SDLC loops: Claude/CE for planning/review/ops, Codex/CE for bounded implementation/testing, and proof before merge.
  • Runtime breadth matters (Add configurable tmux/Zellij multiplexer backends #132/feat(runtime): add OpenCode CLI runtime adapter #133), but it should not outrun the control-plane contract: dry-run inspectability, explicit policies, no secret leakage, and non-ambiguous execution ledgers.

This PR intentionally ships only the contract/dry-run seam so real direct execution can be reviewed as a separate provider/run-ledger design.

@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a direct workflow planning contract without enabling provider execution. The main changes are:

  • Adds tt run --direct for direct prompt dry-runs.
  • Adds provider, model, policy, and direct metadata to prompt configuration.
  • Preserves prompt inputs and controls when resolving direct steps.
  • Shows direct step details in human and JSON dry-run output.
  • Rejects direct execution outside dry-run mode.

Confidence Score: 5/5

This looks safe to merge.

  • Direct steps retain configured prompt inputs and controls.
  • Unsupported policy values are rejected during configuration validation.
  • Direct dry-runs now apply the artifact prerequisite check.
  • No blocking issues remain in the reviewed changes.

Important Files Changed

Filename Overview
src/automation/mod.rs Adds direct step resolution, preserves prompt inputs and controls, and blocks direct execution.
src/config/mod.rs Adds direct prompt metadata and validates required provider, model, and policy values.
src/cli/run.rs Adds direct dry-run rendering, JSON serialization, and artifact prerequisite validation.
src/cli/mod.rs Adds the --direct argument to the run command.
src/main.rs Forwards run options through the new structured request.

Reviews (3): Last reviewed commit: "fix: validate direct artifact dry-run pr..." | Re-trigger Greptile

Comment thread src/automation/mod.rs
Comment thread src/config/mod.rs
@wren-nutthouse
wren-nutthouse merged commit 6b86cca into main Jul 20, 2026
11 checks passed
@wren-nutthouse
wren-nutthouse deleted the feat/tutti-direct-dry-run-contract branch July 20, 2026 04:50
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