Skip to content

feat(trello): add opt-in Trello control plane - #1167

Draft
dilipgv wants to merge 7 commits into
kunchenguid:mainfrom
dilipgv:dv/trello-control-plane/reliability
Draft

feat(trello): add opt-in Trello control plane#1167
dilipgv wants to merge 7 commits into
kunchenguid:mainfrom
dilipgv:dv/trello-control-plane/reliability

Conversation

@dilipgv

@dilipgv dilipgv commented Jul 28, 2026

Copy link
Copy Markdown

Intent

Add the opt-in Trello control plane on a branch from current upstream main; keep PR #1158 unchanged; enforce captain-only Inbox and Ready writes in code; preserve captain-authoritative Ready and fresh go-label decisions despite stale or current bindings; enforce one authoritative card binding with deterministic legacy fallback; cross-process synchronize every Trello mutation or binding change with poll reads and seen-marker updates; load Trello cadence across watcher guard session-start and native harness arming paths; supervise Trello-only homes; preserve idempotency single-trigger sweeps and nudge/hold routing; add regression tests; include durable screenshot proof for Ready detection and Trello-only supervision; push the separate branch and keep upstream PR #1167 draft with no reviewers and no merge.

What Changed

  • Add bin/fm-trello.sh, bin/fm-trello-poll.sh, and bin/fm-trello-lib.sh implementing an opt-in Trello board dashboard and command surface, with a new trello skill and supporting docs/examples.
  • Enforce captain-only Inbox/Ready writes, preserve captain-authoritative Ready and fresh go-label decisions over stale bindings, and cross-process synchronize Trello mutations, polls, and seen-marker updates with a shared lock to close race windows.
  • Wire Trello cadence through fm-bootstrap.sh, fm-guard.sh, fm-session-start.sh, fm-supervision-instructions.sh/fm-supervision-lib.sh, fm-turnend-guard.sh, fm-claude-stop-autoarm.sh, and native harness watch-arming (opencode/pi) so Trello-only homes stay supervised, plus regression tests and documentation updates.

Risk Assessment

✅ Low: The branch is a mature, multi-commit iteration of an opt-in Trello control plane; the final commit adds a well-scoped cross-process lock around every board mutation and the poll sweep, guarded by existing stale-owner-safe lock primitives, with matching trap-based cleanup, docs, and new regression tests (including a real concurrency test) — no correctness, security, or regression issues found in the diff.

Testing

Ran the full tests/fm-trello.test.sh suite (30 tests) against the target commit; all passed, including the newly-added test_mutation_and_poll_marker_updates_are_synchronized, which spawns a real background fm-trello.sh comment mutation blocked mid-REST-call, verifies a concurrent fm-trello-poll.sh sweep stays blocked on the shared lock until the mutation releases it, then confirms the poll resumes and reads the mutation's freshly-written seen marker — directly demonstrating the cross-process synchronization fix works end-to-end. Repo working tree is clean after the run, no stray artifacts.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-trello.test.sh (30/30 passed, including test_mutation_and_poll_marker_updates_are_synchronized which exercises the fm-trello.sh mutation lock against a concurrent fm-trello-poll.sh sweep)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

dilipgv added 5 commits July 27, 2026 19:35
Config-gated (config/trello.env), inert until opted in, mirroring the
X-mode architecture: a generated state/trello-watch.check.sh poll shim on
the watcher, thin bin/ wrappers, a docs section, and an agent-only skill.

- bin/fm-trello-lib.sh: config load, authed REST (creds off argv via a
  0600 -K curl config file), dynamic lane resolution, seen markers, meta
  bindings
- bin/fm-trello.sh: comment/move/describe/create-card/label/list-cards/
  get-card/bind/unbind/card-for/pause/start; silent no-op without config
- bin/fm-trello-poll.sh: inbound triggers (inbox, ready/go, per-task
  nudge, per-task hold) with dateLastActivity + seen-marker idempotency;
  no-op when paused or unconfigured
- fm-bootstrap.sh: additive trello_mode_setup generating the poll shim and
  30s cadence from config presence, with opt-out cleanup
- /trello agent skill, docs/trello-control-plane.md, config example,
  configuration.md pointer + env vars, AGENTS.md section 15
- tests/fm-trello.test.sh: 24 hermetic behavior tests

Deep outbound-mirror lifecycle auto-hooks (spawn/status/teardown) and
auto-hibernate are a documented fast-follow; the outbound mirror is
agent-driven via the /trello skill for now.
… one-trigger-per-sweep, comment status, 60s cadence)

Refinements from review of the Trello control plane:

- Poll: a card bound to a live task can never re-fire trello-ready in any
  lane - the Ready-lane and go-label pickup branches are scoped to unbound
  cards, so a captain comment on a bound In-Progress card classifies as a
  nudge/hold or fires nothing, never a wrong re-pickup.
- Poll: emit at most ONE trigger line per sweep, matching fm-x-poll.sh - the
  watcher flattens all shim stdout into one wake payload, so multiple
  differing-arity lines would collapse into an unparseable blob. Deferred
  firing-eligible cards keep their seen marker and fire on a later sweep.
- /trello skill: strip the go label on pickup, and post the status block as a
  card comment instead of overwriting the description (which holds the
  captain's original request text); describe is reserved for firstmate-created
  cards.
- Cadence: Trello board poll runs once per minute (FM_CHECK_INTERVAL=60), not
  30s; X mode's cadence is unchanged.
- Tests: regression coverage for the bound-card ready guard and the
  one-trigger-per-sweep deferral; cadence assertion updated to 60.
@dilipgv
dilipgv marked this pull request as draft July 28, 2026 05:20
@dilipgv

dilipgv commented Jul 28, 2026

Copy link
Copy Markdown
Author

Verification screenshots

Ready/Go incident regression: the exact stale INV-15 binding emits trello-ready on the first sweep and stays silent on the second.

Trello Ready incident regression

Trello-only supervision: guard, turn-end, and Claude auto-arm paths remain active with no ordinary fleet task and inherit the 60-second cadence.

Trello-only supervision regression

Both assets are pinned to validated PR commit 72104c4.

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