Stop dropping Context collections from the agent catalog - #208
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
7180f71 to
2835253
Compare
|
Confirmed: skills are internally sorted, collections are internally sorted, and they're concatenated collections-first. Since the Workshop drops from the tail, collections survive unless collection count alone exceeds 200 — the intended guarantee. I've completed a thorough review of this PR. Here's my assessment: SummaryThe change is coherent, correct, and well-contained. It fixes the "collections dropped from the agent catalog" bug via two mechanisms:
Verification
The one non-blocking design tradeoff (if skills alone reach 200, collections could still be dropped) is genuinely mitigated by collections-first ordering: collections survive unless the collection count itself exceeds 200, a much stronger guarantee than before. No new actionable code defects found. LGTM! |
2835253 to
622afd0
Compare
622afd0 to
e11d864
Compare
|
@AshishKumar4 Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
e1bf086 to
79f74fb
Compare
79f74fb to
ad7e612
Compare
|
bonk break glass |
Cap advertised skills at 150 and put collections first. The shared 1000-entry limit remains a final backstop, applied both before RPC and again by the Workshop. The Workshop now clamps before sorting so the gatekeeper's priority order determines which entries survive. Remove the redundant catalog request parameter; its limit was always the shared constant already imported by both sides.
ad7e612 to
7971609
Compare
What does this change?
With hundreds of skills the agent saw a truncated Context Library, and collections went missing from it. Collections are how the agent finds anything at all; individual skills it can enumerate through the session's
list()/search().The returned catalog was always being bounded to a low value of 25, and at both, before returning the values in RPC and an outer bound, which made most of the skills and collections be truncated.
This PR fixes that by increasing the outer bound threshold, and separately bounding the skills catalog to a value of 150.
This PR also simplifies the
getAgentCatalogAPI by removing the request field.Also,
normalizeAgentCatalogclamps from the tail and sorts the survivors, so the gatekeeper's order decides what livesWhy is this obviously correct and trivially verifiable?
The behavioural change is one moved
.toSorted()and one reordered concatenation. The catalog policy moved intobuildContextCatalog(), so it reads as a single pure function instead of being spread through a Durable Object method.Checklist
Checking every item does not guarantee acceptance. Maintainers determine whether
a pull request meets the contribution policy.