Nothing bounds the bytes a plan's files: frontmatter hands its executor #245
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
external-review
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence-archived#245
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
workflow.max_plan_tasksbounds a plan by TASK COUNT. Nothing bounds it by the bytes itsfiles:frontmatter declares, and that declared source is the large majority of what a dispatch actually costs.Measured
On one phase's
PLAN-1.md: the executor's fixed prefix (contract skill plus rung file) and the shared reads together accounted for roughly 15k of a 70,554-token dispatch. The other ~55k was the four files the plan declared - 252,473 B, about 63,000 estimated tokens. The declared source was ~90% of the bill and nothing measured it.The failure mode this permits: a plan can pass the task ceiling at 5 tasks while declaring 15 files totalling 812,591 B (~203,000 estimated tokens), which is larger than the context window. That executor cannot read what it was told to read, and no gate says so.
Why this repo hits it hardest
Two files dominate:
cadence-core/bin/planning.test.mjs(245,774 B) andcadence-core/bin/planning.mjs(151,958 B). Every plan touching either pays it in full just to orient.The asymmetry is exact:
cadence-core/bin/weight.mjsplusweight-budgets.jsonenforce per-surface BYTE budgets on Cadence's own shipped docs through self-verify, while the one number that decides executor spend is unmeasured.Three-part fix, in order of cost
files:bytes at plan time, estimate tokens, and refuse over aworkflow.max_plan_tokensbudget the same way the task ceiling refuses a 9-task plan.planning.mjs plan-overlapalready parses that exact frontmatter, so a siblingplan-weight --phase <N>is the natural seam andcad-plan-checkerthe natural gate.files:entry carries a symbol or line anchor rather than a bare path, so the executor greps to the ~200 lines that matter instead of reading 6,000. Most of the win, none of the refactor risk, no code change.grep/sedover a whole-fileReadabove some byte threshold.Not the problem
Reviewer payloads. A
planfire mails 8-17 KB. A largerisk_surfacepayload is a large DIFF, which is plan size again one layer downstream.Moved to GitHub: https://github.com/crenshawdev/cadence/issues/94
This project's tracker is now GitHub; this repository remains the public archive. Closed here as migrated, not as resolved.