Changes in flight
See every open pull request and live caisson that touches the code you are about to change, score how much care a pull request needs, and catch two changes that break each other before either merges.
A repository with several agents and people working at once has many changes in flight: its open pull requests and its live caissons. Each one can be green on its own and still break another. Sailfork reads all of them together, so a collision shows up while both sides can still talk, not after the second merge.
A caisson counts its uncommitted edits, so an agent's work is visible the moment it writes a file, before any commit or pull request exists.
sailfork inflight touching chargeCard # who is changing this symbol or its callers
sailfork inflight collisions --pull 12 # changes that break, or are broken by, #12
sailfork inflight conflicts --pull 12 # changes #12 cannot merge with
sailfork inflight risk --pull 12 # how much care #12 needs, and why Every command here is a read. Each one is also an MCP tool (inflight_touching, inflight_collisions, inflight_conflicts, inflight_risk, inflight_symbols, inflight_affected) and a REST route under /api/repos/{owner}/{repo}/inflight/. They work signed out on a public repository, and they only count paths the reader may read.
The In flight page
The In flight tab of a repository lists its open pull requests and live caissons on one board, with a symbol search above it: type a function or type name to see every change that edits it or a caller of it. A pull request's page shows the same view for that one change, with its risk score and the changes it collides or conflicts with.
Who is changing this symbol
Before an agent edits shared code, inflight touching NAME answers who else is already in it.
sailfork inflight touching chargeCard
sailfork inflight touching Cache::load --path crates/store Sailfork finds where the default branch defines NAME and every definition that references it, then intersects those with what each in-flight change adds, removes or changes. Changes that edit the symbol itself come first, then changes that edit a caller.
- The name is exact and case-sensitive.
--pathkeeps definitions and references under a path substring. - It looks at the newest 100 open pull requests and the 100 most recently active caissons.
scan.moreInFlightsays when more exist. - For a language whose definitions carry no end line, the overlap is by file instead of by definition, and the change is marked
byPath.
inflight symbols --pull 12 (or --caisson ID) lists what one change does to definitions: each added, removed or changed function, method, type or constant, with its file, lines, container, and whether its first line changed (signature). Binary files, files over 512 KiB and files past the first 300 are listed as skipped, with the reason.
Collisions
inflight collisions finds pairs of changes that will likely break each other even though git merges them cleanly.
sailfork inflight collisions --pull 12
sailfork inflight collisions --caisson c-3bkbwsz2 A collision is a definition one change removes or re-signs while another change uses its name on a line it added or edited. It runs both ways: breaks means this change breaks the other, and broken_by means the other breaks this one. Each collision names the other change, the definition, and up to 5 places the name is used.
Nothing is built, so a collision is a likely break and not a proven one. To keep noise down, only these count:
- a definition removed (a remove plus an add of the same name and kind is a move, and does not count), or one whose first line changed;
- functions, methods and type-like kinds;
- names of 4 or more characters that are not on a short list of common ones;
- a definition and a use in the same language.
The full rule is returned in rules with every answer. It compares the newest 100 pull requests and 100 most recently active caissons (25 of each signed out).
Conflicts and integration builds
inflight conflicts lists the other changes this one cannot be merged with, and the files that keep them apart.
sailfork inflight conflicts --pull 12 Sailfork compares every pair in the background whenever a branch moves, a pull request opens or closes, or a caisson changes. Reading the answer costs nothing. checked says how many other changes have been compared so far; 0 means the first pass has not finished.
Text conflicts are only half of it. Two changes that merge cleanly can still fail to build together, so Sailfork also builds pairs. Add this line to a push workflow on the default branch to opt it in:
# sailfork: integration Sailfork then runs that workflow on a commit that merges the two changes, with no secrets, and reports a failure under breaks. To keep the cost bounded and the signal clean:
- It builds one pair at a time per repository, at most one run every 30 minutes, starting with the pair that shares the most paths.
- It only builds pairs whose authors can push.
- A failed build counts as a break only when the checks on both changes and on the tip of the default branch are green. A red base is not your fault.
See CI for writing workflows.
Affected steps
inflight affected --pull 12 names the test and build steps a pull request affects: the crates and packages that own a changed file and what depends on them. Dependent Rust crates that mention none of the names the change touches are left out, with the reason. The answer carries a runnable script, and the pull request's CI run gets the same script as SAILFORK_AFFECTED_SCRIPT, so a workflow can run only what the change can break. It needs a signed-in reader.
Risk score
inflight risk scores an open or draft pull request by how much care it needs, and says exactly why.
sailfork inflight risk --pull 12 {
"ref": "pull/12",
"score": 63,
"complete": true,
"reasons": [
{ "factor": "sensitive_paths", "points": 25, "detail": "touches billing (3 files)" },
{ "factor": "symbol_churn", "points": 18, "detail": "2 removed, 3 re-signed, 3 changed definitions" },
{ "factor": "collisions", "points": 20, "detail": "collides by name with 2 other in-flight changes" }
]
} The score is the sum of four factors, never below 0, with no upper bound. Higher needs more care.
| Factor | Points | Cap |
|---|---|---|
sensitive_paths | +25 for each sensitive name the change touches | 50 |
symbol_churn | +3 for each removed or re-signed definition, +1 for each other changed definition | 30 |
collisions | +10 for each other in-flight change it collides with | 30 |
verified_rename | −40 when the ledger proves the change is only verified renames |
The score is a heuristic to order attention, not a verdict. It does not block a merge.
completeisfalsewhen a factor could not be read in time. That factor shows 0 points, so the score may be low.- It is the reader's view: paths the reader may not read do not count.
- A score is kept for 60 seconds per head and reader (30 seconds when incomplete). The pull request page and the merge queue wait up to 2 seconds for it, and finish it in the background otherwise.
- The merge queue shows the score next to waiting entries. It does not change their order.
- When the pull request merges, the score goes into the merge's signed attestation.
Sensitive paths
A path is sensitive when one of its segments, with the extension dropped, is a sensitive name or starts with that name followed by _ or -. So src/billing/invoice.ts and migrations_v2/001.sql match, and rebilling.ts does not.
The defaults are auth, billing, migrations, payments, secrets and permissions. A repository replaces them with a .sailfork/risk-paths file, read from the pull request's base:
# Names that need a second look
auth
ledger
pricing One name per line, matched without regard to case. A line starting with # is a comment, and a line with a / is ignored. The first 64 names count. A file that is empty, over 16 KiB or unreadable falls back to the defaults, so a broken file asks for more care, not less.
Declare what you will change
An agent about to change shared code can say so first. caisson intend declares the symbols a caisson means to change, as a soft lease that lasts while the caisson is live.
sailfork caisson intend c-3bkbwsz2 chargeCard Billing::refund src/cache.rs:load - Each symbol is
name,Container::name,path:nameorpath:Container::name. At most 50; the list replaces the caisson's earlier one, and an empty list withdraws it. - The answer names every other live caisson and open pull request that leases or already changes one of them (
leasesorchanges). - The holder of a caisson that leases the same symbol is told, once per symbol.
- Every later
caisson_batchanswer carriesleasesfor the symbols it changed that another caisson has declared. - Other changes not read within 8 seconds come back in
skipped.
Nothing is refused. A lease is a reason to talk, not a lock: two agents that both need chargeCard find out before either writes, and settle who goes first on the issue.
The MCP tool is caisson_intend, and the route is PUT /api/orgs/{org}/caissons/{id}/intents.
Reference
| CLI | MCP | Route |
|---|---|---|
inflight touching NAME | inflight_touching | GET .../inflight/touching?name= |
inflight symbols | inflight_symbols | GET .../inflight/symbols?pull= or ?caisson= |
inflight collisions | inflight_collisions | GET .../inflight/collisions?pull= or ?caisson= |
inflight conflicts | inflight_conflicts | GET .../inflight/conflicts?pull= or ?caisson= |
inflight affected | inflight_affected | GET .../inflight/affected?pull= |
inflight risk | inflight_risk | GET .../inflight/risk?pull= |
caisson intend | caisson_intend | PUT /api/orgs/{org}/caissons/{id}/intents |
Routes start with /api/repos/{owner}/{repo}. Every read needs repo:read; caisson intend needs repo:write. Fields are in Pull request API and Caisson API.