Skip to content

Add durable trip progress and safe cancellation (INT-416, INT-417) - #26

Merged
hudsonaikins merged 2 commits into
mainfrom
feat/int-416-417-trip-control
Nov 13, 2026
Merged

hudsonaikins merged 2 commits into
mainfrom
feat/int-416-417-trip-control

Conversation

@hudsonaikins

@hudsonaikins hudsonaikins commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

First v0.5.0 slice: INT-416 and INT-417.

  • trip_progress(thread_id) (new, read-only, no model or provider call): turn state, pending/cancelled approval and history, per-leg revision stage, completed legs, uncertain generations, next.
  • cancel_trip(thread_id, reason?) (new): records the request, signals the running turn, and returns cancelled (stopped / completed) or cancelling. Withdraws the pending approval and approved-but-unclicked revisions. Completed plans and briefings are kept.
  • Turn deadline: IFD_TURN_DEADLINE_SECONDS (default 600) counts active execution only, not approval waits. Hitting the deadline withdraws unclicked approvals, the same as a cancel (owner-confirmed).
  • Additive changes: turn_status falls back to the persisted record and reports interrupted after a restart; approve_dispatch refuses cancelled approvals; conversation_status reports approval_cancelled.
  • Safety: cancellation is checked only before the click (model/tool boundaries, browser queue, pre-Generate). claim_generation refuses cancelled revisions. A made click is never interrupted, cleared or retried. Browser limits (1 active, 2 waiters, 30s queue, 180s session) are unchanged and asserted by a test.
  • Storage: no schema change; JSON records in the existing settings table and leg_meta. Works on SQLite and Postgres.

Verification (local)

Check Result
ruff check src tests evals pass
pytest -q (SQLite) 486 passed, 3 skipped
pytest -q (local Postgres 14, not Neon) 489 passed
v0.5.0 controlled MCP suite (WF-029–033) 5/5; FlightAware 0, Browserbase 0
v0.4.4 controlled MCP suite 28/28; FlightAware 0, Browserbase 0
scripts/validate.py blocked: integration code changed, so exact-image live acceptance must be repeated

Before ready for review

  • Exact-image two-leg live acceptance under a new owner-approved allowance
  • LangSmith experiment upload for the v0.5.0 suite: scripted-controlled run on clean commit 8a0b835, suite SHA-256 51065fd8…41bc, dataset ifd-workflow-v050-51065fd816ea, experiment v050-candidate-scripted-3fdf1e72 (id 6eec51e2-42f4-4efd-b72a-b13be747c3cb), 5/5 cases (WF-029–033). Real-model replay and live-provider evidence are still separate and pending.
  • No live test cancels while a browser session is open (needs a live session); cleanup relies on existing session_scope

🤖 Generated with Claude Code

hudsonaikins-crown and others added 2 commits November 12, 2026 14:16
Persist each conversation's turn, approval history and per-leg stage in
the existing store, exposed by a read-only trip_progress MCP tool that
reports interrupted work after a restart. Add cancel_trip and a per-turn
active-time deadline (IFD_TURN_DEADLINE_SECONDS, default 600) that stop
work at safe points, withdraw unclicked approvals and keep completed
plans. A Generate click already made is never interrupted or repeated.
Browser limits are unchanged. Adds the WF-029-033 controlled suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the INT-416/417 entries under Unreleased above the released 0.4.7 section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hudsonaikins
hudsonaikins marked this pull request as ready for review November 13, 2026 04:40
@hudsonaikins
hudsonaikins merged commit b494dcc into main Nov 13, 2026
3 of 4 checks 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