Conversation
GET /api/workspace/subscriptions/current answers with the complete jw record of every subscribed section: dozens of scheduling scalars plus nested course, category, campus, department and teacher objects, about 3 KB per section. Four read paths loaded that response, used a handful of fields from it, and then recorded the whole thing as the capability's model-facing data. Each site now records a projection of what it actually answers with: - calendar_link answers with one URL and now carries only that URL. - subscription list / my_subscribed_sections carry the sections through the existing compactSubscriptionSection projection, and no longer leak the private iCalendar credential into a list answer. - exam carries the exams plus the identity of the section each belongs to, sorted in display order, instead of all 75 section records. - the internal subscribed-section probe records its count. Measured against a 75-section fixture shaped like api/openapi.json (209,631 char API body), the model-facing tool result drops from 392,178 to 89,327 chars for the subscription list, 392,171 to 28,185 for exams, and 392,279 to 272 for the calendar link. Every reply text is byte-identical before and after. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
The current-subscription endpoint returns a complete record for every subscribed section, but each Bot capability uses only a small projection. The full record also exposed a private calendar URL to capabilities that never needed it.
Model-facing command payloads are much smaller while user-visible replies remain unchanged, and unrelated capabilities no longer receive the private calendar link.
Refs #178