Repository navigation
test(context): restore provider init and per-provider tool tests - #3109
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: b410ac2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
🟡 agents import sizes: 1 entry point grew
Changed exports (1)
How this worksEach runtime export is bundled on its own, minified, and gzipped. Changes smaller than 100 B, or smaller than 1% and 1 KiB, are ignored. Growth over 10% or 5 KiB is marked 🔴. This report is informational and does not fail CI. The workflow artifact contains every measurement. Compared |
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
…y read-only search blocks
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.
Restores the tests #2773 deleted with
context-init.test.tsandcontext-search.test.ts(verify finding F7). They pin two things nothing else on main covers:ContextBlockscalls a provider'sinit(label)once, beforeget(), with each block's own label, and a provider withoutinitstill loads.search_contextwithout a search provider, and a read-only search provider getssearch_contextbut notset_context.The files are as they were before #2773, with one change:
ContextBlocks.freezeSystemPrompt()is nowrenderSystemPrompt(). Tests only, no runtime change.Each behaviour fails with its line in
context/blocks.tsremoved or broken (20 tests, two files):blocks.tsinitcall removedget, once, the label used ingetand indexing)initcalled on a provider that has noneinit)initalso called on every readsearch_contextalways offeredAfter Devin's review, three tests are stronger (22 now), each also failing with its line broken: the indexing test passes a title and checks that it is the key used (fails when
set_contextignores the title); a remind block read afresh does not callinitagain (fails wheninitruns on every read); an empty read-only search block still renders (fails when only writable blocks render when empty).