deferred-reads: anchor deferrals on workflow files and cover contract skills #98
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#98
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?
Unblocker for the v2.6.2 context-weight work. Nothing else in this milestone that moves a block behind a
Readcan land guarded until this ships.Problem
lib/deferred-reads.mjs(self-verify check 13) is what keeps a deferral honest: delete oneReadsentence and the reference becomes unreachable with nothing failing. It has two coverage holes, and every deferral this milestone proposes falls into one of them.1. It can only anchor on a command SKILL.md with numbered steps.
deferredReadIssues()only opensskills/<name>/SKILL.md, andregionLabels()only labels regions under a top-level^N.step inside<process>. But:<step name="...">tags and are themselves the@-includeskills/cad-execute/SKILL.mdis a bare@-include with no numbered stepsskills/cad-verify/SKILL.md's<process>is the single line "Execute end-to-end."So a register row for a deferral made from a workflow file can never satisfy its anchor. Adding one fails CI forever; omitting one leaves the deferral unwatched.
2. Contract skills are explicitly out of scope (
lib/deferred-reads.mjs:40-44). The stated reason is that dispatch prose "bytes never touch the main thread at all" — that prices main-thread residency and does not price subagent context. A contract byte is paid on every dispatch of that role, which makes it the most multiplied byte in the repo.Change
filefield naming where theReadsentence must live, so a row can point at a workflow file rather than assuming its skill.regionLabels()to label<step name="...">regions alongside^N.numbered steps.Must not regress
The matching unit stays the SENTENCE, not the blank-line block. That bound is load-bearing and the header explains why:
skills/cad-land/SKILL.mdstep 4b is a single ~2,900 B paragraph, so a block-level test passes when the real instruction is deleted, anddo NOT Read <path>passes a block-level test.Likewise, do not consolidate per-arm
Readsentences anywhere as part of this. "Each arm's own sentence" is a rule the header documents as reproduced, not theorised.Acceptance
Readsentence lives in acadence-core/workflows/*.md<step name="...">region, and fails when that sentence is deleted.skills/cad-*-contract/SKILL.md, same failure behaviour.node cadence-core/bin/self-verify.mjsreturnsok:true.Shipped: lib/deferred-reads.mjs anchors workflow-file regions and covers contract skills; the main-thread-only rationale is retired in its header. Verified against the live tree.