TRN-01 in the other direction: bulk tool output has no file transport and no register #200
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence-archived#200
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?
The symmetric gap
v3.5.2shipped TRN-01: caller-derived free text going INTO a seam rides a filepath instead of a shell word, stated once in
references/conventions.md, with a36-row register in
lib/text-transport.mjsandself-verifycheck 19 refusing aseventeenth inline site.
The same lesson has never been applied to bulk output coming BACK. A
git log, agit status, a broadgrepor a wideReadlands in the live window and is thenre-paid at the cache-read rate on every subsequent turn of that session.
The cost
Over the last 7 days on this repo, cache-read is 62.5% of the bill
(181,626,530 billed-equivalent, 1,816,265,297 raw tokens) at an average window of
121,250 tokens across 15,579 messages. A 2,000-line read is not a one-time cost:
in a 100-turn session it is paid ~100 times at 0.10x. That is what makes window
growth compound rather than accumulate.
The precedent already in the tree
workflows/execute.mdalready does the right thing in one place: on arisk_surfacefire it writesgit diff {base}..HEADtoreports/plan-<k>-risk.diffand passes the PATH, explicitly marking the filetransient and deleting it once the trigger returns. RES-01 and RES-02 did the
same for executor reports and verifier findings.
So the pattern is established, proven and applied at three sites out of however
many there are. Nothing states the rule, and nothing checks it.
The proposal
Mirror TRN-01's shape exactly, in the other direction:
references/conventions.md: bulk command output that a workflow does not needverbatim in-context goes to a file, and the workflow reads the slice it needs.
With the criterion for "bulk" stated rather than left to judgment.
lib/text-transport.mjsshape: everyworkflow site issuing a command whose output can exceed the threshold, with a
verdict and a reason for the ones deliberately kept inline (a
git log --onelineof 6 commits is fine and should be recorded as fine).self-verifycheck that reads the register, so a new unbudgeted site isrefused rather than noticed a milestone later.
Scope note
This is about workflow-prescribed commands, not about constraining what an
executor does inside its own turn. The executor's reads are its own business and
its report file already leaves the orchestrator's context. The target is the
orchestrator's own accumulating window, which is 59% of spend and the half no
budget currently governs.