Repository navigation
SDK follow-ups: CI reliability and boundaries (spec #946) - #949
Merged
Merged
Conversation
…runner (#922) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A feature's new `turnChanges` hook reads the ended Turn's transcript and returns its changes; the core stores what the enabled features return in the existing `skill_changes` and `knowledge_changes` columns. The skills and knowledge features now own `skillChangesOf` and `knowledgeChangesOf`, so a Host without them runs no scan and stores no changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#922) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hand-off to-do test (#929) The Memory pass shares the Bot's fake adapter. Under CI timing the second Turn's pass called the Model before the test read `calls.at(-1)`, so the test saw the pass's input ("# The Turn ... # Your memory lines") instead of the Turn's prompt. Pick the last call that offers `send_to_user`. The same `at(-1)` read sat in two other tests with Memory and a Computer on (bot-memory snapshot, webhook cut-and-save); they now pick the Turn's call too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…removes them (#932) A feature's schema gains `enums` and `sequences` beside `tables`. dropFeatureTables and `botsdk migrate --drop` drop the declared ones that no remaining column or default uses, never a core enum, instead of finding them through the dropped tables' columns, so an enum no column uses no longer survives the drop and breaks re-enabling the feature. Memory and MCP create no enums or sequences, so they declare none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… table owns (#932) Review fixes: a declared enum or sequence that an enabled feature also declares stays, and so does a sequence another table owns. The schema's `sequences` takes the same structural shape as `enums`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Memory's pass reads the Models and the thread hint through two new core services, `models` and `threads`; `coreContextOf` and its symbol are gone, and the feature APIs take a FeatureContext. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…es resolve (#923) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…pass (#945) The test polled for `drafting`, which the drafting pass ends about 65 ms later, so a slow poll under load read `failed`. Capturing all 200 steps one by one also took about 4 s alone, past the 10 s poll under load. Seed all but the last few steps, and wait for the Demonstration to stop recording instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…/945-demonstration-capture
…actor/923-jobs-reach-needs # Conflicts: # packages/botsdk/knowledge/src/server/plugin.ts # packages/botsdk/skills/src/server/plugin.ts
…use (#946) R1: drop the union of what the feature declares and what its tables' columns and defaults use, with the same guards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… not failed (#946) R2: script the drafting pass's Model call so the pass ends cleanly and assert saved; seed after the steps already stored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…i-join (#946) R3: activeJobs, checkpointCounts and newestCheckpoints come off the public RunnerApi; Routines and the Helper card call the runner store's functions through runner/internal, and listRoutines, listHelpers and changeData take db again. R4: the reconcile reads the Routines without an active fire job in one anti-join (idsWithoutActiveJob in the runner's store). R7: fireKeyPrefix builds the routine:<id>: prefix everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ad (#946) R4: fails on the two-read version (Routines, then fire jobs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… built up front (#946) R5: turnChanges is synchronous and no longer awaited under the Conversation lock; a type test rejects an async one. R6: writtenFiles(transcript) in @botsdk/bot/feature is the one scan of successful write/edit/run_tool results; Skills and Knowledge use it. R9: create-chat builds the threads service and passes it to contextOf; feature.ts no longer imports the conversation barrel. R10: the Models' init runs before the features are enabled, so a feature's models is a plain property, not a getter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R8: the tools-list rule (offers send_to_user) replaces the copies in hand-off, change-notes, names-first-tools, the webhook test, the memory test, and the same-pattern copies in the Skills and Knowledge tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The webhook Trigger id uses fireKeyPrefix (R7); bot-prompt-start and bot-computer use the shared isTurnCall (R8); a turnChanges that still returns a Promise is logged and stores nothing (R5). Co-Authored-By: Claude Opus 5.5 <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.
Summary
Spec #946: the SDK follow-ups, in two groups.
CI reliability
calls.at(-1), which under CI timing was the Memory pass's Model call, not the Turn's. Tests now pick the Turn's call with one sharedisTurnCall(@ai-chat/test-support/bot-turns). This was a test bug, not a product bug.drafting→failedabout 65 ms later) and stored 200 steps one by one. It now seeds 197 steps, presses to the cap, scripts the drafting round, and assertssaved.seedUseralready makes one user per call.Boundaries
runner/internal), not the job tables. Reconcile is one anti-join again (idsWithoutActiveJob), andfireKeyPrefixis the single place the key prefix is built.coreContextOfand the[coreContext]symbol are gone. Memory's pass reaches Models and the thread hint throughneeds(models,threadscore services).turnChangeshook, using the sharedwrittenFiles(transcript)helper. The core only stores the results, in the same Turn columns, with no migration. With neither feature enabled, no scan runs.schemacan declareenumsandsequences.--dropdrops what the feature declares plus what its tables' columns and defaults use. It never drops a core enum, or anything another table uses or an enabled feature declares.Closes #946
How it was tested
failedbefore the drafting round was scripted. It passed 5/5 alone, and passed in CI on its own PR (test(demonstrations): CI proof for #945 (do not merge) #948). That run's one failure was bot-hand-off, which bot-hand-off 'shows on the to-do list as waiting' fails in CI #929 fixes and test(demonstrations): CI proof for #945 (do not merge) #948 did not carry.--workers=2(58/58 each).@ts-expect-errortest rejects an asyncturnChanges.code-review, high) found 10 findings, R1–R10, all fixed in 86200dc..96c4952.Decisions I made
CoreServicenamesmodelsandthreads(ThreadsService) that a feature can list inneeds(Feature jobs reach only the services in their needs #923, which allowed "or a core service").@botsdk/bot/feature: theturnChangeshook withFeatureEndedTurn/FeatureTurnChanges(The Turn core still computes Skill and Knowledge changes #919, per the triage), thewrittenFileshelper, andschema.enums/schema.sequences(Features declare their enums, so --drop removes them #932, approved 2026-10-27).runner/internal), andsdk.runneris unchanged from main.--droptakes the union of what a feature declares and what its tables' columns use, rather than "exactly what the feature declares", so a feature that doesn't declare its enums keeps main's behaviour.buildBotSdkruns the Models part'sinitbefore enabling features, so a feature's context holdsmodels. This relies on the existing "core parts start with Models" assertion.Risk
--dropdrops enums and sequences the feature declares, in addition to the ones its columns use. This removes more than before, but only things the feature owns, and the guards above still apply.skills()orknowledge()stores none, as it should.Out of scope, noted by #919: core modules that still import feature internals are computer-tools (
isSkillFile), demonstration-draft (skill files), review (memory) andbot/knowledge-files.ts(knowledgeDirectory, walk scripts).🤖 Generated with Claude Code