Skip to content

feat: add stable thread refs and flat cli#33

Merged
galligan merged 1 commit into
mainfrom
feat/stable-refs-flat-cli
Jun 5, 2026
Merged

feat: add stable thread refs and flat cli#33
galligan merged 1 commit into
mainfrom
feat/stable-refs-flat-cli

Conversation

@galligan

@galligan galligan commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Context

Implements the stable refs and flat CLI/MCP reshape from .agents/plans/stable-refs-flat-cli/PLAN.md, stacked on PR #32 (feat/top-level-thread-actions). Full Codex thread ids remain accepted; dispatch refs are stored local selectors for managed lanes; titles and @handles are mutable convenience labels.

What changed

  • Added dispatch-local Codex ref allocation and v3 registry migration/backfill.
  • Added a shared selector resolver for refs, full ids, handles, exact titles, and read-only fuzzy title matching.
  • Flattened canonical CLI routes: attach, list, get, tail, watch, sync; split persisted tail from bounded live watch.
  • Renamed grouped MCP tools to dispatch_thread_read, dispatch_thread_write, and dispatch_thread_destroy while preserving safety annotations.
  • Managed-thread outputs now consistently include identity context: lane, ref, full id, title, handle, managed, source, status, and cwd for send/goal/sync/tail/watch-style outputs.
  • Updated schemas, tests, README, usage/design docs, ADR-0019, agent rules, skills, plugin docs, and the plan RETRO ledger.

How to test

  • uv run pytest tests/core/test_handlers.py tests/core/test_triggers.py tests/surfaces/test_mcp_routing.py tests/surfaces/test_parity.py tests/core/test_examples.py -q
  • uv run dispatch schema send
  • uv run dispatch schema 'goal status'
  • uv run dispatch schema sync
  • uv run dispatch schema tail
  • uv run dispatch schema watch
  • uv run ruff check src/outfitter/dispatch tests
  • uv run ruff format --check src/outfitter/dispatch tests
  • uv run mypy src tests --strict
  • just check

Risks / notes

  • Registry schema bumps to v3 and backfills refs for existing lanes in created_at, id order.
  • lane remains in these output payloads as a compatibility field for the full Codex thread id; ref and id are the stable thread-oriented fields for new consumers.
  • search --lane and stop --lane remain accepted compatibility aliases, but docs teach --thread / positional selectors as canonical.
  • CI is intentionally left in draft until checks finish green.

galligan commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@galligan galligan force-pushed the feat/stable-refs-flat-cli branch 4 times, most recently from d93d9c1 to ef6f89d Compare June 5, 2026 20:25
@galligan galligan marked this pull request as ready for review June 5, 2026 20:38

galligan commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jun 5, 8:39 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 5, 8:40 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 5, 8:41 PM UTC: @galligan merged this pull request with Graphite.

@galligan galligan changed the base branch from feat/top-level-thread-actions to graphite-base/33 June 5, 2026 20:39
@galligan galligan changed the base branch from graphite-base/33 to main June 5, 2026 20:39
@galligan galligan force-pushed the feat/stable-refs-flat-cli branch from ef6f89d to 22440a2 Compare June 5, 2026 20:40
@galligan galligan merged commit fcb9d10 into main Jun 5, 2026
5 checks passed
@galligan galligan deleted the feat/stable-refs-flat-cli branch June 5, 2026 20:48
galligan added a commit that referenced this pull request Jun 5, 2026
## Context

Bumps `outfitter-dispatch` to `0.4.0` after the stable refs / flat CLI work landed on `main` via PR #33.

## What changed

- Updated the project version in `pyproject.toml` from `0.3.0` to `0.4.0`.
- Updated the editable package entry in `uv.lock` to match.

## How to test

- `uv run dispatch --version` -> `dispatch 0.4.0`
- `just check` -> `190 passed, 9 deselected`, build and package contents check passed, and `dist/outfitter_dispatch-0.4.0.*` was built.
- Live dispatch smoke with isolated `DISPATCH_HOME`:
  - `dispatch new` created a real managed Codex thread on `gpt-5.3-codex-spark`.
  - The worker ran `UV_CACHE_DIR=/tmp/dispatch-smoke-uv-cache uv run dispatch --version` and observed `dispatch 0.4.0`.
  - The worker confirmed `dispatch schema send` includes `ref`, `id`, `title`, and `managed` in the output schema.
  - `dispatch send` follow-up returned the identity-rich `ActionAck`, and the worker replied via `dispatch tail`.

## Risks / notes

- The first read-only live smoke could not run `uv run` because UV needed a writable cache, then fell back to the older globally installed `dispatch 0.2.1`. The successful smoke used `workspace-write` only to permit a temp UV cache; no repo files were changed by the smoke worker.
- Both smoke threads were archived after verification.
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