Skip to content

refactor(sofi): the genesis row has no separate writer - #958

Merged
cryptskii merged 1 commit into
mainfrom
chore/sofi-remove-dead-genesis-writer
Sep 21, 2026
Merged

cryptskii merged 1 commit into
mainfrom
chore/sofi-remove-dead-genesis-writer

Conversation

@cryptskii

Copy link
Copy Markdown
Collaborator

record_genesis_with_conn landed in #957 with exactly one occurrence in the tree: its own definition. No caller, not even a test.

It also has no distinct responsibility. record_resolved_with_conn already writes generation zero, as the pre-side of the first resolved chain link — write_root(tx, v, post.pre_generation, &post.pre_root) — and a vault's evidence at its genesis is served by vault_leaves_at_genesis from the accepted genesis object rather than from this store. So the doc comment's claim, "without it the first trade's parent has no status", was false as written.

That makes it the same shape #956 removed the dark trader tree store for: a capability that reads as live, is reachable from nothing, and would be mistaken for the thing that establishes a fact something else already establishes. The owner ruled it goes rather than waits for a caller.

Why no gate caught it

ci/sofi_reachability.py sets CORE_SOFI = "/dsm/src/sofi/". G1 proves Core production reachability, not SDK production reachability — every SDK SoFi producer is the subject of no gate at all, so a green G1 coexists with dead SDK capability.

The blind spot is currently wide. As of this PR the entire SDK SoFi producer surface has no production caller: all 21 TraderCore::new/DlvCore::new sites are tests or the cfg(test) fixture, plus fulfill, complete_pending_fulfillment, resolve_pending_position, relay_fulfillment, draft_trade, draft_route, draft_close, build_setup, build_vault_create and Resolver::walk_parent. None of that moves G1.

Closing it is ruled into the production-facade work (spec §44.6): extend G1 to the SDK SoFi surface, or add a companion gate for it. A sofi_routes.rs that exists and compiles but calls nothing would otherwise discharge the facade requirement on paper while moving no gate.

Provenance

This deletion was written and gated while #957 was still open, but #957 merged first, so the commit was stranded on a branch that no longer had a PR (fb0199e2e1a72776798517c5c25c8654a47106ac, recorded). This branch re-applies it onto 2f5a6365 (the #957 squash). The resulting tree is byte-identical to that stranded commit, verified with git diff --quiet.

Gates

storage::client_db 388/0 re-run on the new base. The tree being byte-identical to the already-gated one, the rest carry over from that run: sdk::sofi_* 53/0, make lint exit 0, ci/production_safety_checks.sh exit 0. Core and G1 cannot change — only dsm_sdk/ is touched, and G1 scans /dsm/src/sofi/.

`record_genesis_with_conn` has exactly one occurrence in the tree: its
own definition. No caller, not even a test.

It also has no distinct responsibility. `record_resolved_with_conn`
already writes generation zero, as the pre-side of the first resolved
chain link (`write_root(tx, v, post.pre_generation, &post.pre_root)`),
and a vault's evidence AT its genesis is served by
`vault_leaves_at_genesis` from the accepted genesis object rather than
from this store. So the doc comment's claim — "without it the first
trade's parent has no status" — was false as written.

That makes it exactly the shape #956 removed the dark trader tree store
for: a capability that reads as live, is reachable from nothing, and
would be mistaken for the thing that establishes a fact something else
already establishes.

The gate did not catch it and structurally could not: `sofi_reachability`
scans `CORE_SOFI = "/dsm/src/sofi/"`, so an SDK producer with no
production caller is invisible to it. Closing that blind spot belongs
with the production facade, where the SDK surface gets its callers.
@cryptskii
cryptskii merged commit 30b3263 into main Sep 21, 2026
20 checks passed
@cryptskii
cryptskii deleted the chore/sofi-remove-dead-genesis-writer branch September 21, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant