Addresses and the verbs of `jig send`
provisional · Version 1 · Plan item 36 · Plan item 42
An address
names one station
of the execution line (one fixed step a piece of work passes through) on one
piece of work: the pick-up of a tracker item, the drive of a pull request,
the follow-up of a merged one. jig ask <address> answers where that
station stands, and jig send <address> <verb> tells it what to do. This
chapter is for a program that forms addresses or sends verbs: a dashboard,
a chat bridge, a workspace app, a script of a repository’s own.
An address is derived from the records the station leaves, never declared,
so nothing registers one and an address nobody holds is still valid: jig ask answers that nobody holds it
(ADR-0014).
The form of an address
An address is station@owner/name#key, such as drive@jig-harness/jig#456:
- The station is one of the stations listed below.
- The repository is
owner/nameas the forge (the service that hosts the repository and its pull requests) writes it. On input its short name is accepted where the machine’s dispatch file lists exactly one repository of that name (drive@jig#456), and it may be left out inside a checkout of the repository, which then names it (drive#456). - The key is the piece of work, in the form its station’s key takes: a
pull request’s number, with or without a leading
#, or the tracker’s item key as the tracker writes it (#12on GitHub Issues,ENG-4on Linear or Jira). Some shells give#a meaning of its own, so the key may also follow as a second argument:drive@jig 456.
Every answer prints an address in full: the repository as owner/name, a
pull request’s key after # without a second one, an item key as the
tracker writes it. A program that compares addresses compares that form.
A malformed address, an unknown station, a short name that names no
repository or two, an address that leaves its repository out outside a
checkout, a key not in its station’s form, and a pickup key with no
checkout on the machine to name its tracker are each refused as a usage
error (exit 2), with a reason; the reason for a malformed address or an
unknown station lists the valid stations. The exceptions are assign and
the hold and release of a pickup: each resolves its address without
checking the key against the tracker, and refuses a key the tracker does not
know afterwards, as an operational refusal (exit 1), not a usage error.
Stations
A reader that meets a station this table does not list refuses the address.
| Station | Its key | Meaning |
|---|---|---|
pickup | the tracker’s item key | The pick-up of a tracker item: held by the session that claimed the item to start its work |
drive | the pull request’s number | The drive of a pull request: the driver that runs its review rounds, whether a dispatched re-arm or takeover or one armed by hand |
followup | the pull request’s number | The follow-up of a merged pull request: the pass, a dispatcher’s tick or a person’s run, that settles what the merge still owes |
The verbs of jig send
jig send writes one record of a kind the line already reads, and exits;
the record’s reader acts on it at its next run. A verb this table does not
list, a verb sent to a station its row does not name, and arguments the verb
does not take are each refused as a usage error (exit 2). A person’s
command is refused, with exit 1, in a session the line started (a
dispatched launch, or a drive’s pass, which carries JIG_LAUNCH); the
mailbox directives are not a person’s commands, and such a session may send
them. --dry-run shows what a verb would write without writing it.
| Verb | Arguments | To | A person’s command | Meaning |
|---|---|---|---|---|
assign | — | pickup | yes | Hand the item to the line: assign it to the factory identity and, when it is in no dispatch state, move it into the first one, for the dispatcher’s next tick to pick up |
drive | — | drive | yes | Ask for a drive on a pull request that has none: the drive command label, which the dispatcher’s next tick arms a drive for |
rearm | — | drive | yes | Ask for a stopped drive to be re-armed in its existing working tree: a request bound to that stop and the rearm command label that the dispatcher reads |
withdraw-rearm | — | drive | yes | Withdraw a pending re-arm request and remove its rearm command label |
hold | [--until-merged <PR> | --until-closed <ITEM>] (pickup only) | drive, followup, pickup | yes | Keep the line off a pull request with the hold command label, or keep a tracker item out of pickups and batches with a hold on its dispatcher host |
release | — | drive, followup, pickup | yes | Withdraw the pull request’s hold label or the tracker item’s hold on its dispatcher host |
answer | <key> <text> | <key> --approve|--choose <option> [--note <text>] [--decision <digest>] | --all --approve [--decision-set <token>] | drive, followup, pickup | yes | Answer a parked question or a need’s decision by approving or choosing one of its options, at any of these stations; a drive also takes the person’s own words, and —all to approve every parked question it may at once, which the other stations refuse. The bracketed —decision and —decision-set can be left out only on a dry run and, for an individual answer, on a park framed without a digest: a real structured answer to a framed decision needs its digest, and a real —all approval needs the set token the dry run printed. One answer comment per item, read by the re-arm or the dispatcher’s next tick |
pause | — | drive | no | Pause a running drive at its next round boundary: a directive in the mailbox of the working tree that holds the drive on this machine |
resume | <hold-push|pause|stop> | drive | no | Withdraw the mailbox directive it names, so the drive goes on past it |
stop | — | drive | no | Stop a running drive at its next round boundary: a mailbox directive |
hold-push | — | drive | no | Hold a running drive’s pushes: a mailbox directive the driver checks before each push |
What each verb checks before it writes, which record it writes and who reads it are in the plugin’s README.