Skip to content

docs: redesign proposal — batch, Loader, and static flow - #101

Draft
MasterOfBinary wants to merge 3 commits into
masterfrom
cursor/library-redesign-proposal-cd47
Draft

MasterOfBinary wants to merge 3 commits into
masterfrom
cursor/library-redesign-proposal-cd47

Conversation

@MasterOfBinary

@MasterOfBinary MasterOfBinary commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

GoBatch redesign proposal

From-scratch redesign of the library, including workflow-style fan-out, written against ShitQuant / OnyxCore / shitlock and the official #71 / #97–#100 contracts.

Document: docs/redesign/PROPOSAL.md (revision 3)
Reviews: docs/redesign/REVIEWS.md

Recommendation

Layered redesign (approach B), not a dynamic keyed-task scheduler:

  1. batch.Batcher[T] — stream window with a written scheduler (inbound ≤ n, released ≤ W, handlers ≤ W), Run / Add / Close, named drain vs abort.
  2. batch.Loader[In, Out] — request/reply grouping, one terminal outcome per Do, no implicit key coalescing, process-scoped Run ctx.
  3. flow — finite in-process DAG. Immutable input, owned results, View of dependency outputs, explicit join. Sequence, bounded parallel, fan-in, conditions.

This is the Decode / Metadata / Prices → evidence → Persist diagram. It is not the previous workflow lineage on claude/library-redesign-workflow-9kjqu1.

Review

Five independent reviews (adversarial ×2, consumer-fit ×2, Go API ×1). Revision 1 was not approvable. Revision 2 closed the shared-envelope and naming blockers. Revision 3 closes the remaining scheduler and shutdown holes (one cut/dispatch machine, Do after Close is ErrClosed, budget settles waiters, Started/Wait, drain example that does not abort persist).

Consumers (honest)

Project Use this?
ShitQuant Loader + flow on enrichment / multi-token sampling. Stream Batcher for a flush after a measurement. Never on capture, Helius, normalizer maps, or recorder sequencing.
OnyxCore Do not depend on it; do not absorb it. Leave room (stable node IDs, outcomes, events).
shitlock Repo not accessible. A lock library should not live in gobatch.

Private repos were not readable from this environment.

Roadmap

  • Track 0: honesty tag so go get matches the README (current API).
  • Track 1: new batch (v0.7).
  • Track 2: flow (v0.8).
  • Track 3: v1.0 after an external pin and soak.
  • Not this redesign: Redis, generic retry, dynamic workflow, locks, visual editor.
Open in Web Open in Cursor 

Draft a from-scratch redesign that keeps a bounded stream batcher and
request/reply Loader, adds a finite in-process flow graph for fan-out,
and leaves dynamic keyed workflows to the application or OnyxCore.

Co-authored-by: Vaughn Friesen <MasterOfBinary@users.noreply.github.com>
@codecov

codecov Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.76%. Comparing base (63ef757) to head (1c50781).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #101   +/-   ##
=======================================
  Coverage   96.76%   96.76%           
=======================================
  Files          12       12           
  Lines         371      371           
=======================================
  Hits          359      359           
  Misses          9        9           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cursoragent and others added 2 commits September 20, 2026 06:03
Specify the scheduler state machine, Call lifecycle, and drain/abort
table. Replace the shared mutable flow envelope with owned results and
an explicit join. Record the review dispositions.

Co-authored-by: Vaughn Friesen <MasterOfBinary@users.noreply.github.com>
Unify cut vs dispatch, reject Do after Close, settle waiters on
budget expiry, add Started/Wait contracts, and make the enrichment
example drain without aborting persist.

Co-authored-by: Vaughn Friesen <MasterOfBinary@users.noreply.github.com>
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.

2 participants