chore: drop v0.2.0 deprecated APIs [skip-tag]#36
Merged
Conversation
deprecated.go was always intended as a single-commit removal target (see its file-header comment) — every Legacy* symbol carried a v0.2.0 migration godoc since the new Bus/Envelope/MemoryBus surface landed. With the v0.1.x window closed, do the planned `git rm` and clean up sibling files that referenced the removed types in comments. Removed: - sdk/event/deprecated.go (LegacyMemoryBus, LegacyEventBus, Event, EventType, EventFilter, LegacySubscription, LegacyWithBufferSize, LegacyWithDropCallback, LegacyMemoryBusOption, LegacyNoopBus + all EventGraphStart/EventNodeStart/... constants) - sdk/event/deprecated_test.go (matching pin tests) Updated comments to drop dangling references in bus.go (file-layout header), observer.go, envelope.go, memory.go, kanban/board.go. No external consumers (sdkx, examples, bench) reference any Legacy* symbol — verified by grep before deletion. Made-with: Cursor
Three deprecated symbols all scheduled for v0.2.0 removal, dropped together since they target the same call sites: - Scheduler.SetKanban — superseded by WithScheduler, which already performs the back-wiring inside kanban.New (see kanban.go: the k.scheduler.kanban = k assignment after the option loop). All three in-tree callers in tools_test.go were redundant double-wires. - TaskBoard alias + NewTaskBoard constructor — Board / NewBoard have been the canonical names since the kanban split. Migrated the last in-tree callers (board_test.go, tools_test.go) to the new spellings. - WithEventBus(event.Bus) Option — was already a no-op since Board.Bus() became the single source of truth for kanban events. Drop the option and its dedicated pin test (TestKanban_WithEventBus_DeprecatedNoOp). Also removed the now-unused event import from kanban_test.go. Out of scope: RestoreTaskBoard / WithTaskBoard / TaskBoardFrom / ctxKeyTaskBoard — these are live (non-deprecated) public APIs that happen to share the "TaskBoard" prefix; they will be renamed in a separate, non-breaking pass if desired. Made-with: Cursor
ValidateGraphDef was a one-line wrapper around (*GraphDefinition).Validate() kept around to avoid an immediate call-site sweep when validation moved into the graph package. With the v0.2.0 cleanup all in-tree callers (compiler_test.go) are migrated to def.Validate() directly. No external consumers reference this symbol — verified by grep across sdk, sdkx, examples, bench. Made-with: Cursor
Two deprecated symbols in sdk/llm/resolver.go cleared together since
both have stable replacements that have shipped for the full v0.1.x
deprecation window.
- GlobalDefaultProvider ("__global_default__") + the matching fallback
branch in defaultResolver.resolveDefaultModel: superseded by the
DefaultModelStore interface, which any store can implement directly
without piggybacking on a magic ProviderConfig row. The fallback
chain is now a clean two-step: DefaultModelStore -> WithFallbackModel.
- WithModelCaps: was a one-line alias for WithExtraCaps.
Test-side cleanup:
- Drop TestResolver_LegacyMagicKey_DynamicDefault and
TestResolver_LegacyMagicKey_OverridesFallback — both pinned the
removed fallback branch.
- Drop TestResolver_DefaultModelStore_PreferredOverLegacyMagicKey —
the "preferred over legacy" assertion is moot once the legacy path
is gone; DefaultModelStore-vs-WithFallbackModel ordering is still
covered by TestResolver_DefaultModelStore_FallsBackToWithFallback.
- TestResolver_ExplicitModel_OverridesDefault keeps its intent (an
explicit "prov/model" string must beat any default lookup) but is
rewritten to seed a WithFallbackModel pointer rather than the
legacy magic-key row.
No external callers reference either symbol — verified by grep.
Made-with: Cursor
The untyped config["caps"] sub-object was a v0.1.x carry-over for configs that stuffed caps into the same JSON blob as api_key/base_url. The typed pipeline (ProviderConfig.Caps + ModelConfig.Caps + the registry catalog) has been the canonical source since DefaultResolver landed, so retire the legacy path together: - factory.go: NewFromConfig now wraps with registryCaps only; the per-call merge with capsFromConfig(config) is gone, and the helper itself is deleted (both the structured and the older flat forms). - resolver.go: drop the corresponding "(3) Legacy Config[caps]" layer from the caps-merge chain in createLLM. Order is now strictly (registry catalog) -> (ProviderConfig.Caps) -> (ModelConfig.Caps) -> (WithExtraCaps). - factory_test.go: drop the four TestCapsFromConfig_* cases that pinned the helper's behaviour. sdkx/llm/provider_integration_test.go still parses a "caps" sub-object out of its own env-var JSON to decide whether to skip unsupported scenarios (e.g. no_temperature) — that is purely test-side dispatching and never reaches the SDK; left untouched. Made-with: Cursor
Remove the three v0.1.x convenience options that bolted sink
configuration onto InitLog from the side. The canonical
WithLogProcessor path covers every use case explicitly:
- WithLogExporter(sdklog.Exporter) — covering single-exporter slot
with hard-coded BatchProcessor wrap. Replaced by
WithLogProcessor(sdklog.NewBatchProcessor(exp)) at the call site,
which makes batching policy / severity gating explicit.
- WithLogConsole(bool) — toggle for the implicit default console sink.
Drop the implicit sink entirely; if no processor is supplied InitLog
installs a discardProcessor (still safe for global Info/Warn/etc.)
but emits nothing. Callers that want stdout/stderr output now must
pass WithLogProcessor(ConsoleProcessors(...)...) — this is the
forward-compatible recipe that has been documented for the full
v0.1.x cycle.
- WithLogMinSeverity(otellog.Severity) — only ever affected the two
shortcuts above. With them gone, severity gating is the processor's
job (NewSeverityFilter when needed); the option has no remaining
surface to bind to.
logOptions struct shrinks to {processors, serviceName, serviceVersion}.
InitLog godoc updated to describe the simpler, single-path wiring.
Test cleanup:
- log_test.go: drop TestWithLogExporter and TestWithLogMinSeverity;
rewrite TestInitLog_ForwardCompatible_ConsoleViaProcessor to stop
passing WithLogConsole(false) (no longer needed since console is no
longer implicit).
- logger_test.go, log_test.go, init_all_test.go: drop every
WithLogConsole(false) suppression — those tests just need a
no-output InitLog, which is now the default.
External callers (sdkx/telemetry/logfile) only reference InitLog via
docstrings using WithLogProcessor — no code change required.
Made-with: Cursor
The provider-integration test fixture parses a "caps" sub-object out of its env-var JSON config to decide whether to skip scenarios that exercise unsupported capabilities (e.g. no_temperature on a model that rejects it). That sub-object used to be honoured by llm.NewFromConfig too — it no longer is (see chore(llm): drop NewFromConfig "caps" key earlier in this PR), so the example in the providerSpec godoc was on track to mislead readers into thinking the SDK still consumes the field. Append a note that "caps" here is purely a test-fixture convention, parsed only by capsHas; real caps must flow through ProviderConfig.Caps or ModelConfig.Caps via DefaultResolver. Made-with: Cursor
The function was introduced as a v0.1.x bridge that moved a typed
[]model.Message out of vars["messages"] into channels[MainChannel]
when restoring a Board snapshot. Tracing both call sites shows it is
now dead code and the comment "remove after v2 migration window" can
finally be honoured:
In-process round-trip (Snapshot -> RestoreBoard / RestoreFrom on the
same process): no caller actually uses SetVar("messages", []Message)
to seed a snapshot any more — channel-based addressing has been the
canonical message location since the workflow refactor. The two
remaining SetVar("messages", ...) call sites in
sdk/graph/node/llm_test.go are pure GetVar("messages") read paths and
never go through Snapshot.
Cross-process round-trip (FileCheckpointStore JSON, the only real
persistent surface): json.Unmarshal decodes BoardSnapshot.Vars as
map[string]any, so a JSON array under "messages" comes back as []any,
never []model.Message. The .([]model.Message) type-assertion in
migrateVarsMessages therefore cannot match anything that came off
disk; the function was a no-op for the only path that could conceivably
need it.
The lingering responsibility — guaranteeing channels[MainChannel]
exists when snap.Channels is empty — is inlined into RestoreFrom
(RestoreBoard already had its own explicit branch). Add
TestBoard_RestoreFrom_NoChannels_InitializesMainChannel to mirror
the existing TestRestoreBoard_NoChannels_InitializesMainChannel and
pin the invariant directly on the public surface.
Drop migrateVarsMessages itself and its three pin tests
(TestMigrateVarsMessages_*); they only exercised the now-deleted
helper and constructed Boards via internal-field literals to bypass
the real persistence path.
Made-with: Cursor
WithTaskBoard / TaskBoardFrom / ctxKeyTaskBoard had zero non-test callers
in this monorepo and duplicated the functionality of the live WithKanban /
KanbanFrom pair (which production code does use to plumb a Kanban handle
through context). Carrying both a Kanban-level and a Board-level context
key invites confusion ("which one do I inject?") with no callers to
justify the complexity, so drop the Board-level pair outright as part of
the v0.2.0 surface cleanup.
This is not formally Deprecated-tagged, but qualifies as the same class
of removal: arity-1 unused helpers whose only users were their own unit
tests.
Made-with: Cursor
Aligns the persistence-restore entrypoint with the canonical NewBoard constructor (the "TaskBoard" alias was already removed in the previous kanban cleanup commit, leaving RestoreTaskBoard as the only surviving "TaskBoard"-named symbol). All callers and test names are updated in lockstep; no shim is left behind because there are zero external consumers in this monorepo. This is a v0.2.0 breaking change for any out-of-tree caller persisting KanbanCardModel rows. Made-with: Cursor
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
Removes the v0.1.x deprecation surface ahead of the v0.2.0 cut. All
items in this PR were either explicitly tagged
// Deprecated:ingodoc, dead branches the audit surfaced, or zero-caller helpers whose
only consumers were their own unit tests.
Scope: 10 atomic commits, 29 files, +100 / −1,425 LoC.
Per-commit summary
eventsdk/event/deprecated.go+ tests:LegacyMemoryBus,LegacyEventBus,LegacySubscription,LegacyWith*optionskanbanshimsScheduler.SetKanban(auto-wired byWithScheduler),TaskBoardtype alias,NewTaskBoard,WithEventBus(no-op)graphcompiler.ValidateGraphDefwrapper (callers use(*GraphDefinition).Validate()directly)llmGlobalDefaultProvidermagic-key constant +WithModelCapsalias;Resolverlookup order simplifiedllm/factorycapsFromConfighelper +NewFromConfigreading theconfig["caps"]sub-objecttelemetryWithLogExporter,WithLogConsole,WithLogMinSeverityshortcuts; see breaking-change note belowsdkx/llmcapsJSON convention (no behaviour change)workflowmigrateVarsMessagesdead branch inBoard.RestoreFrom(in-process callers never hit the migration path; persisted snapshots fail the type assertion sincejson.Unmarshalproduces[]any)kanbanctxWithTaskBoard/TaskBoardFrom/ctxKeyTaskBoard— zero non-test callers, duplicatedWithKanban/KanbanFromkanbanrenameRestoreTaskBoard→RestoreBoard(aligns withNewBoard; no shim, zero external callers)Breaking changes
telemetry.InitLogno longer implicitly enables console output.Callers that relied on the default sink must now pass
WithLogProcessor(ConsoleProcessors(...)...)explicitly. With noprocessors supplied,
InitLoginstalls adiscardProcessorsootellog.Logger()is always non-nil but silent.kanban.RestoreTaskBoardwas renamed tokanban.RestoreBoardwith no shim. Out-of-tree callers that persist
KanbanCardModelrowsmust update the call site.
llm.NewFromConfigno longer reads acapssub-object from itsconfigmap. Per-provider capability overrides must be supplied viathe registered
Capabilitiesreturned by the provider factory.Legacy*event-bus shims,Scheduler.SetKanban, theTaskBoard/NewTaskBoardaliases,WithEventBus,ValidateGraphDef,GlobalDefaultProvider,WithModelCaps,WithLogExporter,WithLogConsole, andWithLogMinSeverityare allremoved without replacement; migration paths were documented in the
godoc on the deprecated symbols since v0.1.x.
Out of scope (deliberately deferred)
sdk/graph/node/schema_registry.go::NodeSchema.Deprecated bool—a never-read frontend-contract field, not a code deprecation. Belongs
in a future "NodeSchema field audit" PR after frontend usage is
confirmed.
sdk/graph/node/schema*.goas a whole — actively consumed bysdk/knowledge/node.go::KnowledgeNodeSchema(),sdk/graph/node/scriptnode/jsnode.go::PortsForTypeand the builderagent's
schema(action=node_usage)tool. Not deprecated.sdk/speechpackaging (split into a standalone module) — separaterefactor.
Tag policy
Title carries
[skip-tag]soauto-tag.ymldoes not cut a new tag forthis PR even though
sdk/,sdkx/llm/andbench/files weretouched. The breaking changes above are expected to ship together with
the rest of the v0.2.0 cut under a single coordinated tag.
Test plan
make cigreen locally (sdk/sdkx/bench/examples/voice-pipeline)make ciMade with Cursor