Skip to content

docs(scarab): dedupe brake — scarab IS seed_agent, no second crate#108

Open
gHashTag wants to merge 1 commit into
mainfrom
feat/scarab-thin-bin
Open

docs(scarab): dedupe brake — scarab IS seed_agent, no second crate#108
gHashTag wants to merge 1 commit into
mainfrom
feat/scarab-thin-bin

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

🪲 One-page doc explaining why crates/scarab/ should never exist as a separate crate.

Diagnosis

Operator's local checkout has a crates/scarab/ with parallel claim.rs, trainer.rs, config.rs files duplicating crates/trios-igla-race/. That local fork drifted: it kept AND account = $1 while trios-igla-race/pull_queue.rs shipped the fungible claim. When acc3 died at 2026-04-30 18:15 UTC, seed=45 starved waiting for it while acc5 idled.

What this PR ships

Just a doc: crates/trios-igla-race/docs/SCARAB_DEDUPE.md — explains

  1. The existing pull_queue.rs::pull_experiment IS the fungible claim.
  2. The existing bin/seed_agent.rs IS the scarab (worker loop).
  3. If a rename is desired (e.g. for Railway service naming hygiene), the only correct edit is a one-line [[bin]] rename in Cargo.toml, not a second crate.
  4. Three explicit anti-patterns with examples of what NOT to do.

No binary change

I deliberately did NOT add a thin bin/scarab.rs wrapper. Reason: seed_agent::worker_tick is currently bin/-private. Exposing it to a second bin requires moving it into lib.rs + making Cli public, which expands API surface for zero behavioural gain. A one-line [[bin]] rename is cheaper, safer, and tracked under trios-railway#101 Khepri-3 when ready.

Runway

Does not block current Gate-2 drain. Existing bin/seed-agent (fungible after #106) and trios-trainer-igla/src/bin/scarab.rs (fungible after #64) are already deployed; operator's railway up is the only remaining step.

Anchor: phi² + phi⁻² = 3.

Documents why crates/scarab/ should never exist as a separate crate.
Everything the Stateless Scarab Pattern needs already lives in
crates/trios-igla-race/ (fungible pull_queue.rs, worker_tick in
bin/seed_agent.rs, shared asha/ema/sampler).

The local-only crates/scarab/ on the operator's machine drifted —
it kept 'AND account = $1' while trios-igla-race removed the
filter — and caused the 2026-04-30 seed=45 starvation on acc3.

If a rename is desired (scarab vs seed_agent), the correct edit is
one [[bin]] name change in Cargo.toml, not a second crate.

Refs:
  trios-railway#101 Scarabaeus umbrella
  trios-railway#106 fungible CLAIM_SQL (merged)
  trios-trainer-igla#64 fungible scarab.rs (merged)
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