fix(skills): serve the bundle references the prompt advertises #969
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!969
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/bundle-references-reachable"
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?
#927 split each skill into an inline entrypoint and fetchable references, and
loadSkillsappends a Readable references index naming every deferred path.The composed bundle got the index and not the tool.
The bug
NewAgentbuiltSkillProviderfromcfg.Definition.LocalSkillRootsalone, andLoadBundlethrew its reference list away:So a composed profile rendered an index naming bundle paths, instructed the model
to call
read_skillon them, and every one of those calls was refused with a listof the local-root paths instead.
On
sirens-dowelthat is not theoretical. The engineer bundle selects 14 skillscarrying references, and
coding-*alone defers 96,080 bytes. All of itadvertised, none of it reachable, on a lane with a 12-round tool budget in a live
room. Rounds were being spent learning that the index lies.
The fix
bundleRootsis extracted fromLoadBundle, so the pack and the references itdefers come from one walk. Two walks could disagree, which is the class of
bug this is.
LoadBundleReferencesserves what the pack left out.NewAgentappends them to the local-root references and builds one provider.The prompt is byte-identical. The index was already there and the references
were already out of it. Only the served set changes, so no
promptBudgetsentrymoves.
The local-root load also stops swallowing its error.
LoadSkillpackruns on thesame roots twenty lines earlier and hard-fails, so
err == nilwas unreachableand read as tolerance that does not exist.
The tests pin the wiring, not just the partition
Reverting only the
NewAgentchange failsTestTheAgentServesTheBundleReferencesItsPromptAdvertiseswith the exactproduction symptom:
That is the failure a member would have seen as a wasted tool round. The other two
cover the index-equals-served invariant, and that an
inline: alwaysreference isnot also fetchable so its text is not paid twice.
Verification
go build ./...,go vet ./...,go test ./...all pass.pre-commit run --filesgreen on all three files, includingrendered prompt snapshots, which isthe check that would catch an accidental prompt change.
Scope note
This makes progressive disclosure work for composed skills. It does not
reduce the inline half, which is the 165,624-byte figure on the engineer bundle.
That is
agent/compose/roles.kdland it is #966's call.Related: #927, #859.