feat(std/ecs): systems, stages and the sequential schedule #769
No reviewers
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language!769
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/763-ecs-schedule"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #763
Refs #89
Task: torbscript/language#763, step 2 of #89.
What:
std/ecsgainsSystem<World>,Stage,ConflictandSchedule<World>: stages in run order, systems in declaration order,fixedrun once per wholestepof aDurationaccumulator (each time withelapsed = step), amaxStepsPerFramecap withdroppedSteps, andconflicts()on demand.project.trbdepends onstd/time. Theecs-scheduleconformance program steps a world for ten frames; four small programs pin the panics (step of zero, unknown stage inadd, unknownafter, stage added twice). Docs page, skills and the ECS.md slice 1 record are in the second commit.Deviations from the issue text:
Schedulehas no defaultstep: a field default cannot call16.milliseconds(), so the constructor takesstepandSchedule.sixtyHertz()is the 16 ms one.to,after); the language has no separate external label.Test: local quick checks with the nightly toolchain:
torb check std/ecs,torb format --check,torb test std/ecs(91 passed),ecs-scheduleVM run,torb docs check/index/declarationsandskill --check,tools/check-commits.sh. Tier A and B run in forge CI.Budget:
tests/conformance/ecs-schedule.allocationsis 1109, the count the first tier B run on this PR reported (VM and native printecs-schedule.expectedbyte for byte there; the only tier B finding was the missing budget). Tier A failed only onformat --checkof one call inschedule.test.trb; fixed andtorb format --check std/ecsandtorb test std/ecs(92 passed) are clean with the 2026-11-11 nightly.std/ecsschedule:System,Stage,Scheduleand theecs-schedulegate (step 2 of #89) #763std/ecswith oneStoreper group type, andstd/transform(ECS slice 1) #89Review of head
ca829a9. CI is green, but the gate of #763 is not proven yet.Checklist
std/ecs/tests/schedule.test.trbcovers run order, carry, no drift over 3600 frames, the cap,conflicts()and the panics. The four panic programs are intests/conformance/.runandmultiplegive the numbers inecs-schedule.expected(frame 10: cap 4, 6 dropped, 2 ms left).std/time, as the issue says.Findings
tests/conformance/ecs-schedule.allocationsis missing, and the native run of the gate was never done.tests/conformance/README.mdsays a program with a leak run and no.allocationsfile fails tier B and prints its count. #763 asks for the budget "from the first forge CI run's report" and for tier B to giveecs-schedule.expectedbyte for byte, VM and native.skippedon this head.ci.ymlruns it on a PR only when the PR touchescompiler/src/ir,compiler/src/backend,runtime/,tools/or.forgejo/. No forge report will appear for this PR.mainruns tier B and fails on the missing budget. The native output is unverified until then.ecs-schedule(sh tools/conformance.sh --filter ecs-schedule --update-budgets, or a tier B run on a branch that triggers it). Then commit the.allocationsfile and confirm VM and native print the same bytes. The checkbox "Tier A and B green in forge CI" in #763 also needs that run.Non-blocking
elapsedmakeswholenegative and leaves a negativecarried.accumulated()can then go below zero, which the docs do not allow for. Clamp the accumulator at zero, or document the case.Requesting changes on item 1 only; the rest is ready to merge.
std/scene(ECS slices 5, 7 and 8) #91Bufferand parallel systems (ECS slices 6 and 9) #92Review of head
b593874. The negative-elapsedsuggestion from the last round is fixed, but the gate of #763 is still open and CI is red on this head.Checklist
a negative frame runs nothing and the accumulator stops at zeromatches the change.Schedule.run(std/ecs/src/schedule.trb, after the cap handling) keepscarriedat zero or more. Docs and doc comments say the same.docs/standard-library/ecs.mdand its skill copy carry the same sentence.Findings
tests/conformance/ecs-schedule.allocationsis still not in the diff, so the gate in #763 is unproven (same as my earlier finding, no new demand).ecs-schedule.expectedbyte for byte in the VM and natively, with the budget "from the first forge CI run's report". Tier B ran on this head for the first time (tier B (linux-x64), failing after 19m) and is the report the PR body waits for..allocationsfile with the printed count, and confirm VM and native print the same bytes. If tier B fails for another reason (output differs, leak), that is the real finding to fix.b593874:tier A (linux-x64)failed after 40m52s, tier B failed, andgatesfails as a result.ca829a9had tier A green, so the change is in the last commit (new test, clamp, docs wording) or the run itself broke (runner timeout).torb test std/ecsortorb format --checkon the new test, adocs/skill --checkmismatch, or a timeout. The PR body lists those checks as run locally on the earlier head, not on this one.Requesting changes on items 1 and 2; nothing else blocks. I will look at the next head for those two points and the lines changed since.
Follow-up on review 702, new head
590ab6d:tests/conformance/ecs-schedule.allocations= 1109, the count printed by the tier B log ofb593874(job 32140:has no allocation budget, allocated 1109 blocks). No output diff was reported forecs-schedule, so VM and native matched; the budget was the only tier B finding for this program.format --check:std/ecs/tests/schedule.test.trb(the callschedule.run world, 0.milliseconds() - 10.milliseconds()needs parentheses). Fixed. Every other tier A lane was green, so no timeout. Local:torb format --check std/ecs0 of 19 would change,torb test std/ecs92 passed, commits conform. Changes sinceb593874: that one line and the new.allocationsfile.Review of head
590ab6d. Both blockers from the last round are fixed and CI is green on this head.Checklist
tier Aandtier B (linux-x64)are green on exactly this head.tier Bpassing withecs-schedule.allocations= 1109 means VM and native printecs-schedule.expectedbyte for byte and the leak budget holds, which closes the gate of #763.std/time, as the issue says.Earlier findings
.allocationsbudget: fixed. The file is in the diff, 1109, taken from the tier B report ofb593874. The range diffb593874..590ab6dis exactly that file plus one test line.format --checkfailure was the parenthesized call inschedule.test.trb; tier A is green now.No non-blocking points. Merging by rebase.
std/ecsschedule:System,Stage,Scheduleand theecs-schedulegate (step 2 of #89) #763