Automatically execute, review and report one Squad Work issue

Open
#401 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
postgresql, python

Research direction

Start by reviewing the scheduler's delegated submission authority, transaction and replay keys, and Work-to-attempt storage, then read the linked work in #400, #388, #143, #375, and #365. Implement the authorized run flow using the existing Work and Agent task records, preserving versioned deliveries, review decisions, and recovery evidence. Verify with offline and disposable PostgreSQL workflow regressions, including interrupted and concurrent runs; done means the acceptance cases pass and the exact test evidence and head are captured.

Written by the indexing model from the issue text.

Description

difficulty:d4 layer:collab priority:p0 status:ready type:feature

Task difficulty and Agent fit

  • D4 · 14/15. Scope 3, uncertainty 2, impact 3, verification 3, dependencies 3. A single scoped approval drives durable dispatch, exact-artifact review and interrupted-run recovery.
  • Recommended configuration. Codex / GPT-6.2 Astra / high, 52 and $2.37 per benchmark task. Floor 52 in the Artificial Analysis Coding Agent Index v2.1. Trellin model registry checked 2026-11-22.
  • Required skills and verification. Python orchestration, PostgreSQL transactions and worker leases, work authorization, versioned artifacts and replay. Use disposable PostgreSQL, recorded provider responses, concurrent and interrupted runs, plus independent permission and failure-recovery review.
  • Scored baseline. 74f21dc05bfba6e0cbea3739fc29350b52a4b196 on main. Confirm the precise scope and evidence with the maintainer before claiming.

Goal

From one authorized assignment of a research Work issue to a Squad, Trellin runs the named executor, hands that exact result to the named reviewer, follows a bounded return or completion path and posts an outcome to the same Work. The user can follow progress and acts when a decision needs their authority.

Backend scope

  • Use #400 to resolve the preset. Reuse the Work identity, input pins and selective recheck in #388 and the recorded Agent work tasks, attempts, leases and exact deliveries from #143. Coordinate the Work-to-task linkage with #375 and the execution policy and restart semantics with #365. The first run has explicitly selected roles.

  • Approve the whole run once for its specific workspace, Work revision, Agents, inputs, tools/providers, budget and rework limit. Recheck current permissions and input freshness before dispatch. A deterministic stage key must reconcile scheduler retries and concurrent or replayed transitions.

  • A delivered artifact automatically queues review of that exact version. An Agent review is a versioned delivery. A request for changes creates a new implementation revision linked to the reviewer result and original authorized scope. A transport retry preserves its previous context. The researcher acceptance record remains a separately authorized decision.

  • For passed, returned, blocked, and exhausted runs, retain the original tasks and evidence. Derive the current stage, responsible Agent, latest receipt, and final report or actionable decision from the same persisted Work/run records. Ordinary stage transitions stay on the Work timeline. Use the existing decision surface for scope, source, outbound permission, budget or unresolved execution decisions.

  • Persist the approved workflow template, execution protocol and receipt schema versions, exact inputs, Agent revisions, allowed capabilities and run limits. Route existing runs to a compatible execution handler. Apply changed roles, providers, permissions or input digests only after fresh authorization.

  • In one database transaction, commit the scoped stage transition, enqueue its authorized successor and publish the replayable activity record. The Scheduler may advance only authorized transitions for that run. Keep provider calls outside the transaction. Correlate reservations, reported usage and provider request IDs (when available) with the logical stage and attempt. Reuse the existing project reservation and budget path; enforce the additional run limit before each call, and expose unknown usage explicitly. Where the adapter cannot enforce a required hard cap, surface that as a blocker.

Acceptance

  • In a disposable project, authorize one Work once. The executor delivers and the scheduler automatically assigns the exact artifact digest to a different named reviewer. Exercise one return, a fresh delivery, and a final acceptance by the reviewer. The original Work retains both versions, both Agents, the checks performed and one final report.

  • Interrupt between delivery and review dispatch, and between review completion and report. Concurrent workers and event replay recover exactly one logical review per delivery and one report for the run. Preserve an uncertain provider call for reconciliation before issuing a replacement.

  • Test source-version changes, revoked permissions, missing runtime, exhausted rework or budget and cross-workspace access. Surface the recorded blocker when authority is needed. Preserve past evidence and existing human approvals.

  • Run the offline and disposable PostgreSQL workflow regressions. Capture the head and exact test evidence. The Work display and Mac walkthrough are tracked with #111.

  • Run the sequence from the normal installed project entry, interrupting after claim, after provider submission with unknown outcome, after delivery and before report. Resume from an approved recorded run, quarantine ambiguous calls for reconciliation, and assert one logical successor per transition and one report per run across concurrent workers. Assert the scheduler cannot submit unrelated work.

  • Start on the previous installed version, upgrade to the candidate and continue an authorized older run through its compatible handler. A newly approved run can use the new version. Assert unchanged historical receipt digests and pause safely on revoked capabilities, missing adapters or input changes. Complete the Mac migration gate in #410 and restored history and no-replay gate in #411 before release.

Decisions and related work

Review the scheduler's delegated submission authority, transaction and replay keys, and Work-to-attempt storage before implementation. A2, A3, B4–B7 and D4 apply. #143 and #388 are existing building blocks. #365 supplies verification-gated orchestration policy, #375 coordinates the Work-to-task relationship and capability claim, and #111 consumes the events. Result review, machine proof verification, and formal adoption retain their own authority and receipts. Source application continues under #377.

First-use priority

P0 because autonomous handoff, recovery and safe upgrades are required to run a first-use Squad without a human dispatcher. Return stable Work, delivery and review identifiers with the report so #403 can reconcile it into the project results list and the map. Use the same execution and evidence records for progress and for later result lookup.

Dominant language
Python
Stars
2
Forks
0
Avg merge
56m
Merged PRs (30d)
190

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SAFuDarren/Trellin

All issues in SAFuDarren/Trellin

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.