Skip to content

fix(cluster-tool): mirror sysio.epoch's 7 x 8 schedule ceilings - #154

Merged
heifner merged 2 commits into
masterfrom
fix/wns-56-schedule-ceilings
Oct 24, 2026
Merged

heifner merged 2 commits into
masterfrom
fix/wns-56-schedule-ceilings

Conversation

@heifner

@heifner heifner commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Pairs with Wire-Network/wire-sysio#692; merge the two together. #692 caps sysio.epoch::setconfig at 7 operators per group (Ethereum's OPERATORS_PER_GROUP) and 8 groups (Solana's MAX_OPERATOR_GROUPS), which keeps the OPERATORS roster inside one Ethereum transaction (WIRE-342). BatchOperatorSchedule mirrors those ceilings so a shape the depot rejects fails at config time instead of in setconfig after the cluster is up.

  • MaxOperatorsPerEpoch 100 → 7 and MaxBatchOperatorGroups 255 → 8.
  • A size derived from an explicit group count is capped at 7. 21 operators over 1 group used to derive a group of 21; they now derive 7, and the other 14 stay unscheduled, as they already do when the size is floored below the roster.
  • The window check is removed: #692 derives the window ceiling from 7 × 8 instead of checking it, so the check here could no longer fail. MaxScheduledBatchOperators stays exported, derived the same way (56).
  • Every flow's shape is already within the new ceilings; the largest is flow-emissions-soak's 7 × 3.

Tests

BatchOperatorSchedule.test.ts: an explicit 9 per group and 9 groups are rejected, both ceilings are accepted, a size derived over 1 or 2 groups is capped at 7, and the constants are pinned, MaxScheduledBatchOperators at 56. All 39 cases pass, and lint and build are clean.

Wire-Network/wire-sysio#692 caps `sysio.epoch::setconfig` at 7 operators per group (Ethereum's) and 8 groups (Solana's). The mirror still carried the old 100 / 255 / 1,000, so a shape the depot now rejects passed here and failed in `setconfig` after the cluster was up.

A size derived from an explicit group count could also pass 7: 21 operators over 1 group derived a group of 21. It is now capped at 7, and the extra operators stay unscheduled, as they already do when the size is floored below the roster. The window check is gone: the contract dropped its own, because 7 x 8 bounds the window.

@huangminghuang huangminghuang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for one compatibility regression in packages/cluster-tool/src/config/BatchOperatorSchedule.ts. MaxScheduledBatchOperators is part of the published @wireio/cluster-tool API through both the config and root wildcard barrels, and it shipped in v0.1.22. Deleting it makes existing downstream imports fail to compile. Please keep the export as a derived compatibility constant (MaxOperatorsPerEpoch * MaxBatchOperatorGroups, currently 56), optionally deprecated, while removing only the now-redundant total validation. The paired wire-sysio#692 change likewise retains its derived MAX_SCHEDULED_BATCH_OPERATORS constant. The 7 × 8 schedule arithmetic and tests otherwise look sound.

…two ceilings

It shipped in `@wireio/cluster-tool` 0.1.22, so removing it would break downstream imports (HM's review). It is now `MaxBatchOperatorGroups * MaxOperatorsPerEpoch` (56), as `sysio.epoch.hpp` derives `MAX_SCHEDULED_BATCH_OPERATORS`; only the separate window check stays removed.

@huangminghuang huangminghuang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed at f0d3a5b. The follow-up restores the released MaxScheduledBatchOperators export as the derived 7 × 8 ceiling, fully addressing the compatibility concern. The complete diff matches wire-sysio#692; lint, build, diff checks, and all 39 focused tests passed locally. The remaining Prettier line-wrap observation is non-blocking.

@heifner
heifner merged commit 51fc27a into master Oct 24, 2026
2 checks passed
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.

3 participants