GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — allons/docs/deferred.md at main · FelineStateMachine/allons

Expand file tree

/

deferred.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
793 lines (620 loc) · 40.4 KB
/

deferred.md

Copy path

File metadata and controls

793 lines (620 loc) · 40.4 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Deferred correctness items

Things that are knowingly incomplete, the milestone that has to resolve each, and why leaving it is safe until then.

This file exists because the dangerous deferral is not the one someone argued about — it is the one that was noticed once, fixed nowhere, and forgotten. Every entry below was found while building something else, and each one is harmless today for a reason that stops being true at a specific point in ROADMAP.md.

An entry leaves this file only when the thing is done, not when it stops being convenient.


ACK promises "committed", not "on the platter"

Found at 0.0.4, building the sync engine. Must be resolved by 0.5.0 (compaction) — Gate C depends on it.

DESIGN.md §8.2 is explicit: ACK means fsynced, not received. The whole compaction story rests on it, because §12.2 cuts an epoch floor only where peer_acks.acked_seq covers everything below the floor. An ACK that overstates durability means the floor deletes operations no peer actually holds.

The engine does the right thing at its own layer: it sends ACK only after Log.Apply returns, and Log.Apply returns only after the SQLite transaction commits. The gap is underneath. §6 runs SQLite with synchronous=NORMAL, under which a WAL commit survives a process crash but is not durable against a power loss until the next checkpoint. So today's ACK truthfully means "committed and will survive this process dying" and not "fsynced".

Harmless now because nothing at 0.0.x deletes anything. At 0.5.0 the fix is one of:

  • synchronous=FULL on the connection that applies inbound operations, paying an fsync per batch — which batching already amortises, so the cost is bounded by batch count rather than operation count; or
  • an explicit wal_checkpoint before ACK, which is the same fsync with worse granularity.

The first is probably right, but it should be measured against Gate A's numbers rather than assumed, because it changes exactly the thing Gate A measures.


effects/ is not checked for the gen import cycle

Found at 0.0.3, wiring projection discovery. Must be resolved by whenever an application first writes an effect in effects/ — realistically 0.1.0, when the authoring docs describe it.

DESIGN.md §5.1 states the rule for both directories: projections/ and effects/ may import gen/<model>, but never gen itself, because the registry imports them and the reverse direction cycles. The generator enforces it for projections/ with a clear error. effects/ has the same rule and no check, so an author gets go build's cycle diagnostic instead — which names the cycle but not the fix.

Harmless now because nothing generates from effects/ yet.


Retroactive operations make an op projection's counters wrong

Found at 0.0.3, writing the activity feed. Must be resolved by 0.1.0, when two real devices first exchange history.

§7.5 warns that a retroactively-arriving operation from a long-offline peer lands in the middle of an op projection's feed, not at the end. The feed handles that — it orders by HLC, so a late operation sorts into its real place.

What does not survive is any value an OpProjection derives from insertion order, such as a running counter assigned at Apply time: the incremental result and the rebuilt result then disagree for any out-of-order delivery. The shipped ActivityFeed deliberately has no such column, and the equality test between incremental and rebuilt output is what keeps it that way.

This is a documentation gap rather than a code one: the constraint belongs in the cookbook §18 assigns to the feature, in the words "anything you compute from arrival order will be wrong after a peer comes back".


Remote apply recomputes state projections in full — quadratic

Found at 0.0.3, and measured at 0.0.4, which changed its severity. Was assigned to 0.1-d, which could not close it and made it worse; see the note at the end. Was assigned to 0.1.0, which landed half of it. The remaining half is 0.2.0's, and it still blocks DESIGN.md §18 phase 4's exit criterion outright.

Status: the Reducer contract change has landed and it did not fix the number. Reducers now report the rows they wrote (local.Touched), so a remote apply hands Refresh a precise changed set — measured at 18 entities for a 64-operation batch, and proven by five mutations that each make a test fail. That was the fix this entry predicted. The prediction was wrong about the consequence, and the two halves are separated below because conflating them is what made a correct fix look like a complete one.

A StateProjection gets the entities a transaction touched so it can refresh incrementally. A locally authored commit supplies them through tx.Notify. An operation arriving from a peer did not — nothing told a reducer to call Notify for somebody else's operation — so changed was nil, and Refresh's contract reads that as recompute everything (§7.5). Once per batch, over a table that is growing.

This was filed as "correct, and slower than it needs to be". Gate A shows it is quadratic, which is a different thing:

backlog projection cost ratio
10,000 51.3 µs/op 1.3x
20,000 80.1 µs/op 1.4x
40,000 ~178 µs/op ~1.9x

Per-operation cost rising with backlog size means total cost is quadratic. Extrapolated to a million operations it is on the order of ninety minutes against Gate A's ten-minute budget — so phase 4's "cold join of a 1M-op workspace" cannot be met with this path unchanged. See docs/gate-a.md §4.4.

Nothing in 0.0.x is affected, because there is no networked catch-up yet. That is the only reason this is a deferral rather than a defect.

The fix: reducers report the rows they touched, so Refresh receives a real changed-set on the remote path exactly as it already does on the local one. That is a change to the Reducer contract and therefore to every generated reducer, which is why it wants doing once and deliberately rather than patched around.

Half a fix, and the wrong half to stop at. The contract change is right, it is necessary, and it is done. It is not sufficient, and this entry asserted that it would be without checking. What it missed: supplying a changed set only helps if the projection's refresh is cheaper for having it, and the fixture's TagFacets is not. Measured, at a 40,000-operation backlog and batch=64:

projection cost per batch
before the contract change 469.5 µs/op 30.0 ms
after it 594 µs/op 38.0 ms
after it, with the projection's own indexes 394 µs/op 25.2 ms

Two things in that table matter more than the direction.

The per-batch cost now varies with batch size — 38.0 ms at 64 against 43.9 ms at 256, where before the change it was flat at 30.0 and 30.8. A cost that moves with the number of operations in the transaction is a cost that is reading the changed set. So the contract change is working; the table is not measuring its absence.

And the growth rate is unchanged. 56.8 → 99 → 171 µs/op at batch=256 across 10k/20k/40k, which is still linear in backlog and therefore still quadratic in total. The reason is the projection, not the framework: TagFacets recounts each affected tag from live state, the benchmark's workload uses 17 distinct tags (inbox plus tag-0…tag-15), and an average batch touches 13 of them. Thirteen of seventeen tags is most of a table that grows one row per operation, so "incremental" visits a linearly growing row set however precise the changed set is. Instrumented, at batch=64 over 40,000 operations: avg_changed=18.0, avg_tags=13.0, and notes_tags at 6,432 → 12,832 → 19,232 rows as the run proceeds.

Indexes are worth having and are not the answer either. Refresh's statements constrain element and id; every generated index is led by workspace_id; so both statements were SCAN notes_tags under EXPLAIN QUERY PLAN. Indexes led by the constrained column turn both into SEARCH and buy about 1.5x — 594 → 394 µs/op — and leave the growth rate where it was. (An index led by workspace_id buys nothing at all, which cost one wrong measurement here before the plan was read rather than assumed. See the separate entry on Refresh having no workspace identifier: that is why no generated index can serve a projection.)

What actually closes this, and it is 0.2.0's:

  • A TagFacets whose refresh is O(rows the transaction changed) rather than O(rows carrying an affected tag). The shape is a projection-owned membership table — one row per (tag, note) — with the count adjusted by the membership delta. That stays idempotent, because membership is derived from state rather than accumulated, and it stays rebuild-consistent, because the count is a function of rows the projection itself owns. examples/notes has a scoped refresh that measures flat (294 → 362 µs/op across a 40x backlog increase) on a growing tag vocabulary, and still rising on a fixed one — which is the same finding from the other direction: the cost follows notes-per-tag, not the changed set.
  • A decision about what the Gate A workload should be. Seventeen tags over 40,000 operations means ~2,350 notes per tag, and that is not an unrealistic tag — an inbox with thousands of notes in it is the ordinary case. So this is not a benchmark artefact to be tuned away; it is the workload a real projection has to survive, and the membership design is what survives it.

An interim mitigation, if the contract change slips: skip state projections during a catch-up entirely and rebuild each once at the end. RebuildProjections already exists and is tested to agree with the incremental path, so the machinery is there — it trades a stale read model during catch-up for a linear one, which is very likely the better trade for a cold join.

Why 0.1-d did not close it, and made it worse. The fix is a change to the Reducer contract, which lives in local — every reducer, and the generator that writes them. 0.1-d owned local/sync and local/wire, and neither the contract change nor the interim mitigation can be reached from the protocol side: sync.Log deliberately cannot see a projection, and giving it a "this is a catch-up, skip them" flag would be designing another package's mitigation through a keyhole.

What 0.1-d did change is the batch size, and it cuts the wrong way here. The receiver now applies in transactions of 64 operations instead of 256 (sync.DefaultMaxApplyBatch, from docs/gate-a.md §7). A state projection recomputes once per transaction and its cost is a function of table size, not of batch size — so the per-operation projection cost is now four times what gate-a §4.4 measured. Storage got 16% faster and this got 4x slower, on the same change, because the two costs are paid per batch and per operation respectively.

That is not an argument for putting the batch back: 256 was measured as worse on both of storage's own axes, and a read-model defect should not be paid for with a write-lock hold that makes keystrokes wait. It is an argument that the two land together. Whoever fixes the Reducer contract should re-run BenchmarkGateAProjections at both batch sizes, because the interaction is now part of the answer.

Measured, at review. BenchmarkGateAProjectionsByBatch now does exactly that, and 0.1-d's estimate was right to within the noise — 3.9x, not 4x:

backlog batch=256 batch=64 ratio
10,000 42.1 µs/op 104.4 µs/op 2.5x
20,000 72.1 µs/op 194.7 µs/op 2.7x
40,000 120.2 µs/op 469.5 µs/op 3.9x

End to end at 40,000 operations, a catch-up with the read model on takes 12.4 s at 256 and 26.5 s at 64.

The mechanism is now pinned down rather than inferred: per-batch projection cost is 30.0 ms at batch=64 and 30.8 ms at batch=256. It is the same fixed cost either way, so a smaller batch does not make a recompute cheaper — it buys more of them. That is worth stating plainly because it is the reason no batch size can fix this: the cost is per transaction and the only lever that touches it is the changed-set.

The apply batch is left at 64. See docs/gate-a.md §7.1 for why the trade is genuinely balanced on the receiver's path — shorter individual stalls against half the total wall clock — and why Limits.MaxOpsPerBatch stays at 256 regardless. Both revert to the measured optimum once this entry is closed, which is one more reason it needs an owner.

Reachable in production as of 0.1.0, for the first time. The wiring milestone built local/synclog.go, whose Apply calls Workspace.ApplyBatch — so the path these numbers describe is now the path a real application's catch-up takes, at the engine's MaxApplyBatch of 64, rather than one a benchmark had to construct. Nothing about the measurement changed; what changed is that a design partner can now hit it. That is what makes the 0.1.0 assignment above binding rather than aspirational.

One thing the wiring settled, and it removes an option: the interim mitigation cannot be expressed at the seam. "Skip state projections during a catch-up and rebuild once at the end" needs to know that a batch is a catch-up, and nothing on the receiving side knows: sync.Log.Apply is handed envelopes and no session context, deliberately (sync must not learn about projections, and local must not learn about session state). If the Reducer contract change slips, the flag therefore has to be inferred inside local — the two candidates being the adapter watching for full batches, or Workspace.ApplyBatch gaining an explicit "catch-up" variant that the adapter alone calls. Both are worse than the contract change, and both are cheaper than a partner's first cold join, so whoever owns this should choose deliberately rather than discover it under time pressure.

The membership redesign landed, and this entry stays open

Still open. The exponent moved; the budget is still missed. Both halves of the fix named above are now done — reducers report the rows they wrote (0.2-a), and TagFacets keeps a projection-owned membership table and adjusts counts by the membership delta rather than recounting affected tags. docs/gate-a.md §7.3 has the design and the 40,000-operation numbers; §7.4 has the million-operation ones, which are the reason this entry does not close.

At 40,000 operations and batch=64 the projection cost fell from 594 to 101 µs/op, and the row-visit count is genuinely flat: instrumented at 40,000 and at 160,000 — a 4x table — every batch reports the same 18 changed notes, 58 live memberships read, 48 written. The algorithmic defect this entry was opened for is fixed. Recounting "most of a growing table" is gone.

What is not fixed is the cost of visiting a flat number of rows in a growing database. Measured at a million operations rather than extrapolated:

batch 1M with projections 1M without T1 (≤10 min)
64 (shipping default) 30m20.8s 4m29.1s fail, 3.0x over
256 11m33.1s 4m14.3s fail, by 15%

The growth is still quadratic, and this is now measured inside Refresh rather than inferred from a differential. With a nanosecond accumulator around Refresh at batch=64: 2.340 s of a 12.171 s catch-up at 40,000 operations, and 36.615 s of 81.101 s at 160,000. A 4x backlog costs 15.6x the refresh time — 58.5 → 228.8 µs/op, an exponent of 0.99, so per-operation cost still rises linearly and total work is still quadratic. §7.3's "sub-linear" reading came from a 10,000→40,000 sweep, which is the range where fixed costs dominate.

What the redesign bought is a constant factor of roughly 6x (594 → 101 µs/op at 40,000), not a change of growth. Both statements are measurements.

Three candidate causes are eliminated, each by measurement:

  • Not the rebuild fallback. Refresh recomputes the whole table when handed an empty changed set. Counted over both runs: one rebuild each — the initial one — against 625 and 2,500 incremental adjustments.
  • Not the page cache. Raising the write connection's cache_size from the default 2 MiB to 64 MiB (verified applied by probing PRAGMA cache_size, and verified to fail when the pragma is removed) moves the refresh time by under 1%, at 160,000 operations where the working set fits easily, and by −0.9% at a million. The same pragma makes projections=off 6.8–7.2% faster, so it works; this path is not cache-bound.
  • Not visible in row counts. 18 changed / 58 read / 48 written is flat at 4x the table and reproduces. It counts rows returned, so it cannot see work that scales with rows examined or pages touched, and it should not be read as evidence of flat cost — which is exactly how it was read.

So the cause is inside Refresh, is not any of the three above, and is not yet identified. That is where the next owner starts, and it is a better starting position than this entry has had before: the search is narrowed to the statements adjustFacets runs, all of which have flat row counts and none of which is supposed to be O(table).

Phase 4's "cold join of a 1M-op workspace" therefore still cannot be met on this path, which is the sentence this entry has carried since Gate A and which the redesign was expected to retire. It is not retired. It is closer: 11m33s at batch=256 against a ten-minute budget is a miss by 15%, where the same criterion was previously an extrapolated ninety minutes.

Newly assigned by this work, and both belong to whoever picks this up:

  • The batch-size guidance in this entry and in docs/gate-a.md §7.3 is wrong at scale. Both say the receiver's sync.MaxApplyBatch = 64 costs little — §7.3 quantifies it at 18% — because the per-batch projection cost is fixed and a smaller batch merely buys more of them. That reasoning is right and its conclusion is not: at a million operations the fixed cost is 99 ms per batch, so 64 buys 15,625 of them and costs 163%, not 18%. sync.MaxApplyBatch is now an open question rather than a settled default.
  • The interim mitigation above is worth more than it was. "Skip state projections during a catch-up and rebuild once at the end" now competes against a measured 11–30 minutes rather than an estimate, and projections=off finishes in 4m14s. The seam objection recorded above still stands and is still the reason it is not free.

A projection refresh cannot use any generated index

Found at 0.2.0, measuring the Reducer contract change above — twice independently, which is the only reason it was believed the first time. Must be resolved by 0.2.0, with the quadratic entry above: it is half of why that entry's fix did not move the number.

StateProjection.Refresh(tx *sql.Tx, changed []local.EntityRef) is handed a transaction and a list of entity references. Neither carries a workspace identifier, and EntityRef is {Model, ID, Fields} with nowhere to put one.

Every generated index on a replicated table is led by workspace_id, because every generated statement binds it first — the schema is multi-workspace and DESIGN.md §6 scopes each row. A projection refresh cannot bind it, so it cannot seek any of them. Verified with EXPLAIN QUERY PLAN rather than inferred: the fixture's two refresh statements, which constrain element and id, both report

SCAN notes_tags USING COVERING INDEX notes_tags_live

where the index is notes_tags(workspace_id, id, element) WHERE removed = 0. A covering-index scan is cheaper than a table scan and it is still O(table).

This is worse than it looks, for three reasons:

  • It is silent. The projection is correct. It is correct at O(table) per transaction, and nothing in the framework says so — §5.1's promise of EXPLAIN QUERY PLAN index advice in dev builds is itself a carried item, so the one mechanism that would surface this does not exist yet.
  • It applies to every application, not to the fixture. Anyone who writes a projection over a replicated table hits it, and the well-written projections hit it hardest: a refresh that carefully scopes itself to the changed rows is exactly the one whose WHERE clause cannot use the index.
  • The workaround is a projection creating indexes on somebody else's table. Which works — openProjections re-runs Migrate on every open precisely so a projection can add an index without a version bump — but it means the access path for a table lives in a different file from the table, and it is discovered by measurement rather than offered by the API.

Three candidate fixes, in the order they should be considered:

  1. Refresh gains the workspace id. Most honest — the projection is being refreshed for a workspace and currently cannot know which. It is a breaking change to a signature DESIGN.md §7.5 prints, so it needs the same deliberation the Reducer contract change got.
  2. EntityRef gains a workspace. Smaller blast radius, and it puts the scope next to the id it scopes. But EntityRef is also the UI change-feed's vocabulary, where it is not needed.
  3. The generator emits a second index per side table, led by the element column. No signature changes, and it guesses which access path a projection will want, which is the kind of guess that is wrong for half of them.

Not harmless today, unlike most entries in this file: it is one of the two reasons a 1M-op cold join does not meet phase 4's ten-minute budget.


A remote operation moves state and publishes no change event

Found at 0.2.0, landing the Reducer contract change. Must be resolved by 0.2.0.

DESIGN.md §7.4 prints the apply pipeline as nine steps, and step 9 is:

9. tx.Notify(topic_for(kind))

tx.apply implements steps 1 through 6 and does not implement step 9. The only callers of tx.Notify outside local/tx.go are generated repositories, which exist on the local path only. w.publish is fed exclusively from tx.notices. So a peer's operation reduces, moves materialized state, refreshes projections — and no fragment repaints.

Verified by probe rather than by reading: subscribing to the bus and then authoring locally versus applying the same envelope remotely, the local commit published local:items-changed and the remote apply published nothing within 500 ms.

local.TopicFor(table) and oplog.Header.Topic() both exist for this and are otherwise unused outside tests, which is a fair sign of where the missing call was meant to go.

The reason this is a deferral and not a same-commit fix: the mechanism is now available — the contract change above gives tx.apply an authoritative per-operation row set, so step 9 could publish with correct entity refs for free — but whether a month's backlog should repaint fragments at all is a decision, not a bug fix. coalesceNotices already reduces a batch to one event per topic, so the cost is bounded; §11.3's concern is a UI that is unusable while it updates. Choosing between "publish per batch during catch-up" and "publish only once catch-up completes" wants the same deliberation as the rest of 0.2.0, and guessing it inside a milestone about projection cost would be the wrong place to decide it.

Harmless for a single-device workspace, which is every workspace that exists today. It stops being harmless the moment a design partner runs the two devices ROADMAP 0.1.0's exit criterion asks for.


A persistent peer block does not survive a restart

Found at 0.1-d, implementing the strike system. Must be resolved by 0.2.0, which is where a peer first has a durable identity worth remembering across runs.

§8.4 asks for two limits and this file is about the second: "3 strikes ⇒ close + 15 min quarantine of that EndpointId; 10 strikes across sessions ⇒ persistent block requiring user action". Both are implemented and both are in memory, so a restart forgives a blocked endpoint and it starts again at zero.

The quarantine is fine in memory — it is fifteen minutes and a restart is a plausible reason to give a peer another chance. The block is not: "persistent" is the word §8.4 uses, and a block that clears itself when the application is relaunched is exactly the wrong shape, because a desktop application is relaunched constantly and the abuse it defends against is a reconnect loop that costs a handshake every time.

The reason it is not fixed is a missing table, not a missing decision. DESIGN.md §6.1 has no row for peer misbehaviour, and sync cannot add one: the Log interface deliberately cannot create rows, which is what keeps the engine from being able to write history. So the fix is a framework table (peer_strikes, keyed by endpoint, holding the count and the block) plus two more methods on the seam — and it wants doing next to the membership work at 0.2.0, where the inspector's peers panel gains the "allow this device again" control that the block's "user action" refers to.

Harmless until then because nothing is exposed to hostile peers yet: at 0.1.0 a peer had to be handed a ticket by a human to reach us at all.


Frame compression is refused rather than bounded

Found at 0.1-d. Must be resolved by whichever release first wants zstd on the wire — realistically 0.3.0, when attachments make frame size matter.

§8.4 requires that decompression be "bounded by an absolute output cap and a ratio cap (100:1), enforced by a limited reader — never by trusting a declared size". There is no decompressor in the tree at all, so there is nothing to bound, and zstd is frozen vocabulary that a build could nonetheless advertise.

So sync.New refuses to advertise it. That is deliberately not the same as ignoring it: a feature's absence has a defined behaviour under §10.1 ("no zstd ⇒ send uncompressed"), and its false presence has none — advertising it invites a peer to send frames this build cannot decode, let alone bound. Refusing to advertise keeps the negotiation honest and removes the resource-exhaustion surface entirely, which is a better position than an unbounded decompressor and a worse one than a bounded compressor.

When it lands, the bound is the interesting half and it must be written first: the ratio cap is what stops a 1 KiB frame from becoming a gigabyte, and it can only be enforced by counting output bytes as they are produced. A decompressor that allocates from a declared size has already lost before the cap is checked.


MaxQuarantineBytes is not enforced

Found at 0.1-d, implementing §8.4's limits. Must be resolved by 0.2.0, when policy.limits makes the hard caps above it real.

§16.1a's escalation ends: "Only when quarantine itself exceeds MaxQuarantineBytes do ops get rejected outright, with strikes." The ceiling is in local.Limits at 1 GiB and nothing consults it.

It cannot be consulted from the protocol side, which is where the strike would be issued: sync has no idea how many bytes of unapplied operations the store holds, and asking would mean a new method on the Log seam whose only caller would be a limit whose lower layers — the replicated WorkspaceLimits of §16.1a — do not exist yet. Adding the reporting method before the policy that makes it meaningful would be a limit enforced against a number nobody can set.

Harmless at 0.1.0 because quarantine only fills from a newer peer's operations (§10.2), which means a mixed-version mesh in the window before an upgrade — bounded by how much a design partner authors in that window, not by anything an attacker chooses. It stops being harmless as soon as an unauthorized peer can make us store something, which is 0.2.0's territory exactly.


An item whose milestone has already shipped

Found at 0.1.0, merging five milestone reports into this file.

Six of the entries below arrived assigned to 0.1-b, 0.1-c, 0.1-d or 0.1-f, all of which are now done. An agent finishing milestone N naturally files what it found against milestone N+1, and by the time anyone merges the reports, N+1 has often shipped too.

The failure mode is specific and worth naming once, here, rather than rediscovering it: a deferral assigned to a completed milestone is invisible. Nobody will open this file looking for work that belonged to something already released, so the item does not get skipped — it stops being read at all.

So every entry below names a milestone that is genuinely still ahead, and where that meant moving an item, the original assignment is recorded beside the new one. Reassignment is not a bookkeeping detail; it is the difference between a deferral and a loss.


The generated iroh bindings carry local patches

Found at 0.1-b. Must be resolved by 0.2.0 at the latest, and re-verified at every move of the iroh-ffi pin — including one made for an unrelated reason.

uniffi-bindgen-go has three defects, described in docs/gate-b.md §4.3. One is fatal: HashMap<Vec<u8>,T> generates map[[]byte]T, which is not valid Go, in 21 places. internal/irohbuild patches two mechanically and works the third around in detail().

The patches assert their own occurrence counts, so an upstream shape change fails loudly instead of silently patching nothing. That is the only reason this is a deferral rather than a hazard.

ROADMAP's second fallback — fix it upstream — is the right resolution, and docs/gate-b.md §5 says so rather than treating the local patch as the answer. The generator is third-party and pinned to iroh's uniffi minor, so this cost recurs on every upgrade until then.


Only darwin/arm64 has a native transport

Found at 0.1-b. Must be resolved by 0.6.0, and gated by Gate D. Was implicitly 0.1-c's, which built the module machinery but could not build archives for platforms this machine is not.

§15.1 names four platforms. One has an archive, a derived link line, and a passing loopback dial. The other three have none of those.

They must not be guessed at. docs/gate-b.md §4.2 is the reason: §15.1's own documented link line for darwin/arm64 was wrong, and wrong in the way that links cleanly and panics at runtime, because a missing framework only surfaces when an Objective-C class lookup fails. A hand-written link line for a platform nobody has linked on is the same mistake with less evidence.

Related and smaller, both from 0.1-b and 0.1-c:

  • MACOSX_DEPLOYMENT_TARGET is unpinned for the Rust build, so every link warns that objects were built for a newer macOS than they are linked against. Harmless here; a Gate D question, and §15.3 already requires it pinned for allons build.
  • allons doctor's loopback check needs -tags iroh. A default-built CLI links no transport, so the check reports unavailable with the build command as its action — correct behaviour, and it stops being necessary when the per-platform module becomes an ordinary dependency.

Per-platform modules are specified and tested, but not published

Found at 0.1-c. Must be resolved by Gate D, before 0.6.0.

The module naming, the release matrix, the archive layout, and checksum verification all exist, and allons doctor checks them. The archive itself is reproduced from a pinned tag rather than committed (see .gitignore), and lives behind the iroh build tag.

Until CI publishes allons-irohffi-<platform>, go install cannot produce a networked binary and §15.3's distribution table is aspirational. Harmless now: there are no external users, and the build tag keeps the default build green on a machine that has never seen cargo.


allons doctor runs quick_check, never integrity_check

Found at 0.1-c. Must be resolved by 0.6.0 (Operability), which owns doctor --rebuild.

§16.3 wants the full check available "weekly or on demand" and there is no flag that asks for it, so the index-level corruption quick_check skips is currently invisible.

Harmless while nothing compacts and every database is disposable dev data. It stops being harmless the moment a real workspace is worth rebuilding, which is the same release that adds the rebuild.


The inspector cannot show durations, or pre-coalescing queue depth

Found at 0.1-f, building the panels. Must be resolved by 0.6.0 for the durations, 0.2.0 for the queue depth. Both were filed against 0.1-f itself, which is what shipped the panels that need them.

§14.5 asks for commit duration and for how long each reducer and projection took. The panel reports whole-request duration and labels it as such, because there is no timing hook in commit or applyProjections. It is the same instrumentation §14.3's commit span needs, which is why it waits for the release that adds tracing rather than growing a private stopwatch now.

§14.5 also asks for pending change events before coalescing. The panel shows the post-coalescing count. The window exists inside events.Bus and has no reader; the fix is a Bus.Pending() diagnostic accessor.

Both are honest gaps in a debugging surface, which is a category worth separating from a wrong answer: the panel does not claim a number it does not have.


diag.WorkspaceStatus is not fed from the log

Found at 0.1-f. Must be resolved by 0.2.0. Was filed against 0.1-d, which shipped without it.

State is always active, and QuarantinedOps, Conflicts and Epoch stay zero — as does Local.PendingOps, which is the "committed here, acknowledged nowhere" count §14.1 pairs with Synced. The inspector does not rely on them — it reads the log directly — and raises a StateNote when the two disagree, which is tested.

That mitigation is also the hazard: anything else that trusts WorkspaceStatus gets zeros and no warning. The struct reads like a summary and is partly a placeholder.

Narrowed at 0.1.0. Peers, Replication, PartialCurrent and PartialTotal are now fed, by local/replication.go's replicationStatus, from the engine's live peer list plus one read of peer_heads and the peer_acks ledger. So "synchronized" is §14.1's definition evaluated against the ledger rather than a constant, and Status.Network is measured from the endpoint and the peers' paths rather than hard-coded to offline. The remaining fields are the ones that need the epoch (§12), the conflict table (§7), and a quarantine count on the status path — none of which have a reader that would notice today.


allons dev --replicas N has no fault-injection panel

Found at 0.1-f, and explicitly outside its ROADMAP row. Must be resolved by 0.2.0, alongside the peers-panel controls that the strike system's "cleared by user action" already refers to.

§14.5's last paragraph asks for a panel that injects the faults localtest can already produce — latency, loss, partition, corruption — against a multi-replica dev session. localtest has the faults and 0.1-d's tests drive them; what is missing is the multi-replica orchestration and the panel.

The per-replica half of that orchestration is now in place: each replica binds its own loopback port and records it under its own data directory, so N replicas are individually reachable and cannot collide (local/devserve, tested with two at once). What dev still does is refuse --replicas N for N ≠ 1 and run one window, so the ready line names one replica rather than §17.2's 3 replicas (alice bob carol).

Also unimplemented and smaller: the Cmd-Shift-I shortcut that opens the inspector, which needs the bridge JS.


EXPLAIN QUERY PLAN index advice does not exist

Found at 0.1-g, writing the query documentation. Must be resolved by 0.6.0, or sooner if a design partner's workspace grows first.

§5.1 promises that a dev build logs the scan and the index that would fix it. local/query.go has a comment where the mechanism should be.

Harmless while every dataset is small. It becomes a Gate A concern rather than a convenience the moment one is not, because a missing index on a composed query is silent and slow rather than wrong — the failure mode nothing reports and everybody feels.


An inbound connection cannot be routed when several workspaces replicate at once

Found at 0.1.0, wiring local to the sync stack. It is the one thing that wiring could not finish, rather than a thing it chose to skip. Must be resolved by 0.2.0, which is where membership decides who may connect at all and is therefore the release that has to touch this code anyway.

DESIGN.md §1 gives the App one endpoint — "one DB per workspace, shared endpoint" — and §3.1 gives each workspace one engine. transport.Transport has exactly one Accept, so local owns the accept loop and hands each inbound connection to one workspace's engine (local/endpoint.go, netKit.deliver).

Deciding which workspace has no complete answer at that layer. The workspace is named in the connection's HELLO, HELLO is read by the engine's own handshake after the control stream opens (§8.1, §8.3), and peeking at it above the engine would mean reimplementing the handshake outside the code that owns it. Handing it to the wrong engine is worse than refusing: the wrong engine refuses the HELLO as "another workspace", which is a semantic refusal, so the dialer backs off on §8.3's hard budget and the user is shown "incompatible" for a peer that is perfectly compatible.

So the routing rule today is: one replicating workspace takes everything; several are narrowed to whichever engine already knows the endpoint; and anything still ambiguous is refused with CloseBusy and a reason that names this limitation. CloseBusy and not CloseNotAMember because the condition is transient — adding the peer, or stopping the other workspace, makes the next dial succeed — and because a refusal before any HELLO lands on the dialer's network backoff rather than §8.3's semantic one, so the peer keeps retrying gently instead of being told for an hour that it is incompatible.

Harmless for every application that exists, and the boundary is exact rather than vague: it bites only when two or more workspaces are replicating in one process and a device none of them has a ticket for dials in. AutoWorkspace — the default bootstrap, and what allons new scaffolds — produces one workspace. The case that does arise, a peer we were handed a ticket for, is the case the endpoint-match rule covers.

Two candidate fixes, and they are not equivalent:

  • A workspace-scoped ALPN. AppID + "/sync/1/" + workspace_id, so the demultiplexing happens in QUIC where it costs nothing. It needs an ALPN per accepting workspace and a dialer that knows which to request, which means transport.Addr or Ticket carrying it — a change to the transport interface, and §8.1 fixes the ALPN's shape, so it is a specification question and not only an implementation one.
  • A demultiplexing pre-HELLO, where local reads one frame before handing the connection over. Cheaper to reach and worse: it puts a second parser in front of the handshake and a second place for the workspace check to be wrong.

The first is almost certainly right. Either way it wants doing beside membership, because a 0.2.0 peer must prove it may connect to this workspace before we spend a session on it, and that is the same question stated once instead of twice.


allons pair inspects an offer and cannot redeem one

Found at 0.1-e; re-confirmed at 0.1.0 once the wiring landed, which is what turned it from "not yet" into "not ever, here". Resolution: none. This is a boundary, not a deferral, and it is recorded so nobody files it a third time.

The wiring milestone made everything else about pairing reachable from an application: Workspace.Sync(), Workspace.Ticket(), sync.Engine.AddPeer, and pairing.Redeem on top of them. allons pair still cannot redeem, for two structural reasons that no amount of wiring in local changes:

  • The binary has no reducers. A workspace opens with the application's generated local.Schema (§3.1), and allons is one generic executable that has never seen it. It cannot open a workspace, so it cannot own an engine for one. This is the same reason allons inspect is an HTTP client of the running application rather than a reader of its database.
  • The inspector is read-only by design. §14.5's panels are served by the application and §3.2a makes every framework read query-only, so there is no route through which a CLI could ask a running replica to add a peer.

Redemption belongs in the application, which is where DESIGN.md §4.5 puts it — the invitation flow there is a pair of the application's own handlers — and §17 lists no pair verb at all. cmd/allons/pair.go says all of this in its own package comment, at length, and remains the place to read it.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.