Terminus: the algorithms

Appendix: the algorithms

The two Terminus algorithms on one panel: laser-linked satellites over the twilight band, with the anchor margin's operating point (5,000 km, 12.70 moves a day, 178 ms p95), the routing decision for one token, the anchor policy's scheduled and event-triggered evaluation instants, and the Hill-sphere axis showing why the planet-synchronous shelf cannot host a stationary satellite

Every mechanism on this page is argued somewhere else in the series — the routing in the backbone, the anchor policy in where the mind lives, the failure story on the backbone's interactive plate. This appendix states them once, as a proposal would: the algorithm, the constants, and nothing persuasive. The normative versions live in the terminus repository under docs/terminus/routing.md and docs/terminus/anchor-policy.md, beside the decision records they cite; every number below traces to a runnable example there.

How a token routes

There is no routing protocol. Every orbit is known years ahead, so every visibility window, duty assignment, and path is a timetable entry with a pre-assigned alternate, and failure handling changes which precomputed path runs, never how paths are computed (ADR-0009). What runs on board is arithmetic:

flowchart TD accTitle: The Terminus routing decision for a single token accDescr: A token starts at the town and climbs to the serving access satellite. The exit gateway comparison asks which ring position offers the least total time to the anchor, counting light plus half a millisecond of relay processing per forwarding satellite, with ties kept by the serving satellite. If the feeder telescope for this ring-and-anchor pair is alive, the token climbs directly to the anchor. If the pair is severed, the route detours along the frozen plane link through a plane mate at the degraded budget. If no plane mate can serve either, the route does not exist and the session must re-anchor. TOWN(["Town → serving satellite"]) --> GW{"Exit gateway<br/>least time to anchor<br/>light + 0.5 ms per relay"} GW -->|"ties stay home"| PAIR{"Feeder pair<br/>(ring, anchor)<br/>alive?"} PAIR -->|"yes"| DIRECT["Direct climb to anchor<br/>300 ms nominal budget"] PAIR -->|"severed"| DETOUR["Detour via plane mate<br/>frozen 37,294-km link<br/>600 ms degraded budget"] DETOUR -->|"no usable mate"| NONE["No route —<br/>the session re-anchors"]
The routing decision for one token, computed from the timetable rather than discovered. The exit gateway is compared in time, not distance — every forwarding satellite charges a relay — and a severed feeder pair falls back to the frozen plane link while the spare acquires.
constantvaluemeaning
keep-alive beat100 msliveness on every laser link
declaration3 missed beats (+300 ms)failure declared, alternate runs
relay delay0.5 msregenerative processing per forwarding satellite
necklace reach1 place per hopa telescope points one place each way
spare acquisition5 scold telescope repoints and locks
detour floor394 ms round tripthe cheapest detour arithmetic admits

Which anchor, and when the question is asked

A session's anchor is the shortest path the whole ring can offer — every ring sees every anchor at every instant, so reachability never binds and latency does. The session holds its anchor unless a rival beats it by the re-anchor margin, 5,000 km of path — an operating parameter, chosen from a measured curve where neither end can be bought: margin zero re-anchors 113 times a day and drowns the backbone in working-memory transfers; a margin high enough to never move leaves 10 ms of thinking time from a 300 ms budget. At 5,000 km, a session moves 12.70 times a day, its p95 round trip is 178 ms, and each move carries its working memory make-before-break.

Nothing polls. The instants at which a rival first beats the held anchor are computable years ahead, so they are timetable entries like every other handover — the 12.70 moves a day are that schedule, counted. The only evaluations no timetable can carry are the ones failures cause, and those run at the event itself:

flowchart TD accTitle: When the Terminus anchor policy evaluates accDescr: The policy evaluates at two kinds of instants. Scheduled crossings are computed from the timetable years in advance, at the moments a rival anchor first beats the held one by the margin. Event-triggered evaluations run immediately when a failure is declared after three missed keep-alives, when a spare telescope locks, or when a hold-off window expires. During a spare acquisition, the hold-off suppresses evaluation, deferring any instant that falls inside the five-second window to its end. TT["Timetable:<br/>precomputed crossing instants<br/>(12.70/day at 5,000 km)"] --> EVAL{"Evaluate:<br/>rival beats held anchor<br/>by the margin?"} EVENT["Failure events:<br/>declared at +300 ms ·<br/>spare locks · hold-off expires"] --> HOLD{"Hold-off<br/>window open?"} HOLD -->|"no"| EVAL HOLD -->|"yes — defer to<br/>window's end"| EVAL EVAL -->|"no"| STAY["Hold the anchor"] EVAL -->|"yes"| MOVE["Migrate —<br/>working memory transfers<br/>make-before-break"]
When the anchor policy runs. Scheduled crossings come from the timetable; failures trigger immediate evaluation — which is exactly why a spare telescope needs the hold-off, and the hold-off needs the spare.

This is what decides the failure race. A severed pair's detour costs 6.3 times the margin, and evaluation fires with the declaration at +300 ms — so without the hold-off, the bucket drains long before a 5 s acquisition locks, and without the spare, the hold-off pins conversations to a 460 ms detour for nothing. The two remedies are one purchase, and the backbone's plate lets you falsify each half.

The timetable's fine print

"Orbits known years ahead" deserves its honest reading, because real satellites station-keep — and the objection is worth answering with the planet's own ledger rather than Earth instinct.

What is more predictable here than at Earth. Oblateness — the dominant orbit-prediction term for Earth constellations — scales with rotation rate squared, and this world turns once in 11.2 days: spin alone would put its J2 two orders of magnitude below Earth's. Quieter is not the whole story, though: a tidally locked world carries a permanent tidal bulge toward its star, so the figure is triaxial — the bulge lifts the shrunken zonal term back to about a fiftieth of Earth's, and the sectorial term Earth ignores rises to meet it, fixed along the sub-stellar axis. A differently shaped gravity field, still a deterministic one. And nothing has ever been launched here before, so the one genuinely unschedulable burn class on Earth — dodging other people's debris — does not exist; every conjunction is self-inflicted, hence schedulable.

What is worse. The star. At a twentieth of an astronomical unit, the third-body term is three orders of magnitude beyond Earth's solar perturbation — the same stellar factor the timing fabric already carries for clocks. Its character matters more than its size: it is deterministic and, because the planet is tidally locked, periodic in a fixed geometry. The star never moves in the frame that matters, so the first response is to design the reference orbits with the tide in them rather than burn propellant against it. But it is not small where the anchors live — the shell orbits at about a third of the prograde stability limit the simulator's Hill arithmetic sets. Its planes are inclined past the angle at which a dominant third body pumps eccentricity. Earth's constellations are protected from that pumping by their planet's fast figure; this planet's figure is fifty times weaker, and whether it still protects the shell is a question only a real propagator settles. The stochastic residue — flare radiation pressure, actuator noise — works out to meters of error against kilometer-scale timetable tolerances. Flares threaten links first; whether a superflare can inflate the day-side thermosphere enough to matter at 2,200 km is a bound not yet computed, and the one place Earth intuition is weakest.

So the assumption's honest form is: the timetable is flown, not merely predicted. Station-keeping is not evidence against it — it is the mechanism that makes it true. The published ephemeris is the reference, satellites hold tolerance boxes around it, and the burn plan — including long, low-thrust ion arcs — is itself a set of timetable entries. What the architecture actually requires is only that the prediction horizon vastly exceed the update-distribution time, and hours of refresh cadence against weeks of validity is a margin measured in orders of magnitude. What that maintenance costs — station-keeping Δv per year at each shell, the refresh cadence the residuals demand, the shell's long-term stability under the tide, and the flare-drag bound — is a declared, unpriced debt: a high-fidelity propagator work package, tracked as an RFC on the simulator.

What stays open

Stated as debts, not fine print: the timetable's alternates are exactly true for one failure, and what covers composed failures — extended alternates, a distributed failure map over shared timetables, or a real routing protocol — is deliberately undecided, with a hard number to beat: an instant switch inside a stall budget that detection has already spent. The plane mate's capacity while it relays two rings on one telescope is unpriced, and so is the timetable's own upkeep, above. And two failures on one ring split the necklace into arcs, whose insurance — skip terminals — is countable and not yet counted.