fix(core): shared work budget for grading (#68) #69

Merged
yuuhikaze merged 2 commits from fix/grade-budget into master 2026-10-24 16:06:21 -05:00
Owner
Closes #68 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Tt5Kc71LcLjqfyZWoZosqh
fix(core): bound grading work with a shared budget
All checks were successful
ci / rust (pull_request) Successful in 1m51s
ci / web (pull_request) Successful in 2m19s
ci / image (oven/bun:1.4.2-debian=docker-image://git.yhkze.net/actions/bun:1.4.2-debian node:22-bookworm-slim=docker-image://git.yhkze.net/actions/node:22-bookworm-slim , web, deploy/web.Dockerfile, rgxr-web) (pull_request) Has been skipped
ci / image (rust:1-slim-bookworm=docker-image://git.yhkze.net/actions/rust:1-slim-bookworm debian:bookworm-slim=docker-image://git.yhkze.net/actions/debian:bookworm-slim , ., deploy/api.Dockerfile, rgxr-api) (pull_request) Has been skipped
0e33ba6427
A bounded comparison could run up to 4000 words with up to 50 000 PDA
configurations each (~200M, minutes of CPU per request). Grading now
shares 200 000 work units across words (PDA configuration = 1, TM step
= 1/16), runs TMs without traces, and reports budgetExhausted when it
stops early. Contract limits table covers grammar, PDA, TM and
grading limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tt5Kc71LcLjqfyZWoZosqh
fix(core): bound grammar parsing, CYK and conversions
All checks were successful
ci / web (pull_request) Successful in 22s
ci / rust (pull_request) Successful in 1m38s
ci / image (oven/bun:1.4.2-debian=docker-image://git.yhkze.net/actions/bun:1.4.2-debian node:22-bookworm-slim=docker-image://git.yhkze.net/actions/node:22-bookworm-slim , web, deploy/web.Dockerfile, rgxr-web) (pull_request) Has been skipped
ci / image (rust:1-slim-bookworm=docker-image://git.yhkze.net/actions/rust:1-slim-bookworm debian:bookworm-slim=docker-image://git.yhkze.net/actions/debian:bookworm-slim , ., deploy/api.Dockerfile, rgxr-api) (pull_request) Has been skipped
b8489ff0f2
A 150-long unit chain made CYK take ~10 s and the chart parser ~1 s
per word (and grading could repeat that per word). Parsing and CYK
now carry a 10M-step work budget, CYK indexes binary rules by their
right-hand pair, grading charges parse work to its shared budget,
UNIT expansion checks its size while building, PDA→CFG and the
table-filling view have tighter caps. Regression tests for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tt5Kc71LcLjqfyZWoZosqh
yuuhikaze merged commit 18be2447d4 into master 2026-10-24 16:06:21 -05:00
yuuhikaze deleted branch fix/grade-budget 2026-10-24 16:06:21 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
k8s-services/rgxr!69
No description provided.