feat(trello): add opt-in Trello control plane - #1167
Draft
dilipgv wants to merge 7 commits into
Draft
Conversation
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.
…marker race window
…dd deny_captain_lane note
dilipgv
marked this pull request as draft
July 28, 2026 05:20
Author
Verification screenshotsReady/Go incident regression: the exact stale INV-15 binding emits trello-ready on the first sweep and stays silent on the second. Trello-only supervision: guard, turn-end, and Claude auto-arm paths remain active with no ordinary fleet task and inherit the 60-second cadence. Both assets are pinned to validated PR commit 72104c4. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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
bin/fm-trello.sh,bin/fm-trello-poll.sh, andbin/fm-trello-lib.shimplementing an opt-in Trello board dashboard and command surface, with a newtrelloskill and supporting docs/examples.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.shsuite (30 tests) against the target commit; all passed, including the newly-addedtest_mutation_and_poll_marker_updates_are_synchronized, which spawns a real backgroundfm-trello.sh commentmutation blocked mid-REST-call, verifies a concurrentfm-trello-poll.shsweep 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.