Skip to content

chore(sdkx): bump sdk to v0.2.3 + deprecate knowledge/watcher for v0.3.0#48

Merged
lIang70 merged 2 commits into
mainfrom
chore/bump-sdkx-sdk-v0.2.3
Apr 29, 2026
Merged

chore(sdkx): bump sdk to v0.2.3 + deprecate knowledge/watcher for v0.3.0#48
lIang70 merged 2 commits into
mainfrom
chore/bump-sdkx-sdk-v0.2.3

Conversation

@lIang70

@lIang70 lIang70 commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two small changes that belong in the same sdkx release window:

1. Bump sdkx/go.mod from sdk v0.2.2v0.2.3

Atomic follow-up to PR #47: pick up the just-released sdk/v0.2.3 (cut by auto-tag against the PR #47 merge commit). PR #47 deliberately suppressed sdkx's auto-tag via [skip-tag:sdkx] so that the dep bump and the corresponding sdkx tag could be cut as one self-contained chore — this commit is the dep-bump half. The sdkx code that adopted the new sdk APIs (errdefs.ClassifyProviderError, telemetry.AttrXxx, errdefs.NotAvailable wrapping in retrieval/recall storage paths, etc.) already shipped inside the PR #47 merge using the local module imports; this commit only switches the published dep coordinate.

Mechanics:

cd sdkx
go get github.com/GizClaw/flowcraft/sdk@v0.2.3
go mod tidy

go.sum side-effect: github.com/expr-lang/expr v1.17.8 falls out of the indirect set. sdkx never directly imports sdk/graph (only errdefs, llm, telemetry, retrieval, recall, embedding), so exprsdk/graph's edge-condition compiler — was always a spurious transitive that earlier tidies happened to keep around. sdk/v0.2.2..v0.2.3 contains zero changes to sdk/go.mod, so this is purely a re-tidy artefact, not a behaviour change.

2. Deprecate sdkx/knowledge/watcher for sdkx/v0.3.0

Every type this package consumes from sdk/knowledge*FSStore, ChangeNotifier, NewReloader — has been marked // Deprecated: in sdk/knowledge/deprecated.go and is scheduled for removal in sdk/v0.3.0. Once those go away sdkx/knowledge/watcher cannot compile against the new sdk, so the package will be dropped entirely in sdkx/v0.3.0.

The replacement is architecturally different: sdk's v0.3.0 EventNotifier emits typed knowledge.ChangeEvent values (DatasetID / DocName / Kind) rather than opaque struct{} ticks, and pairs with NewEventReloader (scope-aware, serialised). No in-place upgrade is possible — call sites have to be rewritten against factory.NewLocal + a typed EventNotifier impl + the new EventReloader. The package doc spells out the migration shape so downstream callers have a release window to plan instead of being surprised by the v0.3.0 hard break.

Surface marked // Deprecated::

  • the package doc (full migration map + rationale)
  • type Notifier (points to package doc)
  • func New(ctx, store) (points to package doc)

Interface-method receivers (Events, Close) are not individually annotated — any caller already trips SA1019 on the constructor / type / the deprecated knowledge.ChangeNotifier interface they implement, so double-annotating adds noise without catching anything new.

watcher_test.go is the only in-tree caller of the deprecated surface and exists exactly to keep the v0.2.x compatibility window honest. Added //lint:file-ignore SA1019 at the top so static analysis treats "tests of a deprecated package" as intended.

A typed fsnotify-backed EventNotifier replacement will ship inside sdkx itself post-v0.3.0; until then the deprecated package keeps working against sdk/v0.2.x and is the recommended bridge for them.

Out of scope (intentional)

  • sdkx/internal/testenv is NOT deleted. It is the active shared .env loader for sdkx/llm/provider_integration_test.go and sdkx/embedding/embedding_integration_test.go (mirrors sdk/knowledge/e2e/internal/testenv on the sdk side). internal here is the Go visibility boundary, not a code-smell flag; removing it would silently break those integration test binaries.
  • voice/go.mod still pins sdk v0.2.2; bench/go.mod pins v0.2.0; examples/chatbot-with-recall uses a replace on the local sdk. They will be bumped on their own cadence — this round is sdkx-only by user scope.

Auto-tag policy after merge

.github/workflows/auto-tag.yml will see only sdkx/** change in the merge commit, find no skip marker, and cut sdkx/v0.2.2 (next patch after sdkx/v0.2.1) against the merge commit. sdk/ and voice/ will be untouched (no diff under those prefixes).

Test plan

  • go build ./... green in sdkx/ against sdk@v0.2.3.
  • go vet ./knowledge/watcher/... clean (file-level SA1019 ignore in the test file is the only suppression).
  • go test ./... green in sdkx/ (no FAIL lines), watcher tests included.
  • After merge: confirm auto-tag cut sdkx/v0.2.2 and that no sdk/ or voice/ tag was created.

lIang70 added 2 commits April 29, 2026 15:47
sdk/v0.2.3 was cut from main by auto-tag right after PR #47 merged
and contains the pod-runtime errdefs/telemetry convergence: the
hoisted errdefs.ClassifyProviderError dispatcher, the AttrXxx
telemetry constants, the chain-terminal NotAvailable wrapping, and
the ctx.Err() normalisation via errdefs.FromContext.

The sdkx changes that *adopted* those new sdk APIs (sdkx/llm,
sdkx/embedding, sdkx/retrieval/{sqlite,postgres},
sdkx/recall/jobqueue/sqlite) all shipped inside that same merge as
local imports, but sdkx/go.mod was deliberately left at v0.2.2 in
PR #47 (via [skip-tag:sdkx]) so that the bump and the corresponding
sdkx tag could be cut as one atomic chore. This is that chore.

Mechanics:
  go get github.com/GizClaw/flowcraft/sdk@v0.2.3
  go mod tidy

go.sum side-effect: github.com/expr-lang/expr v1.17.8 falls out of
the indirect set. sdkx never directly imports sdk/graph (only
errdefs, llm, telemetry, retrieval, recall, embedding), so expr —
which is sdk/graph's edge-condition compiler — was always a
spurious transitive in sdkx/go.sum that earlier tidies happened to
keep around. v0.2.2..v0.2.3 contains zero changes to sdk/go.mod,
which means this is purely a tidy hygiene fix triggered by
re-resolving the dep graph; no sdkx code path observed it before
or after.

After this merges, auto-tag is expected to cut sdkx/v0.2.2 against
the merge commit (no skip marker; sdkx is the only module touched).
voice and bench remain on their existing pins; they will be bumped on
their own cadence.

Verified: go build ./... + go test ./... in sdkx all green.
Made-with: Cursor
…ion map

Every type this package consumes from sdk/knowledge — *FSStore,
ChangeNotifier, NewReloader — has been //Deprecated in
sdk/knowledge/deprecated.go and is scheduled for removal in
sdk/v0.3.0. Once those go away this adapter cannot compile against
the new sdk, so the package will be dropped entirely. Add the
deprecation notice now so downstream callers have a release window
to plan, instead of being surprised by a hard break the moment
sdk/v0.3.0 lands.

The replacement is architecturally different — sdk's v0.3.0
EventNotifier emits typed knowledge.ChangeEvent values
(DatasetID / DocName / Kind) rather than opaque struct{} ticks, and
pairs with NewEventReloader (scope-aware, serialised). That means
no in-place upgrade is possible; call sites have to be rewritten
against factory.NewLocal + a typed EventNotifier impl + the new
EventReloader. The package doc spells out the migration shape.

A typed fsnotify-backed EventNotifier replacement will ship inside
sdkx itself post-v0.3.0; until then the deprecated package keeps
working against sdk/v0.2.x consumers and is the recommended bridge
for them. The notice is calibrated for "removed in sdkx/v0.3.0"
specifically, not "removed now".

Surface marked Deprecated:
  - package doc                  — full migration map + rationale
  - type Notifier                — points to package doc
  - func New(ctx, store)         — points to package doc

Method receivers (Events, Close) are not individually annotated:
they implement the deprecated knowledge.ChangeNotifier interface,
so any caller already triggers SA1019 on the type / constructor /
interface; double-annotating the methods adds noise without
catching anything new.

Tests: watcher_test.go is the only in-tree caller of the deprecated
surface and exists exactly to keep the v0.2.x compatibility window
honest. Added //lint:file-ignore SA1019 at the top so static
analysis treats "tests of a deprecated package" as intended rather
than as latent SA1019 hits.

Out of scope for this PR (intentional):
  - sdkx/internal/testenv is NOT deleted. It is the active shared
    .env loader for sdkx/llm and sdkx/embedding integration tests
    (mirrors sdk/knowledge/e2e/internal/testenv on the sdk side).
    "internal" here is the Go visibility boundary, not a code-smell
    flag, and removing it would silently break those test binaries.

Verified: go build ./... + go vet ./knowledge/watcher/... +
go test ./... in sdkx all green.

Made-with: Cursor
@lIang70 lIang70 changed the title chore(sdkx): bump sdk dependency to v0.2.3 chore(sdkx): bump sdk to v0.2.3 + deprecate knowledge/watcher for v0.3.0 Apr 29, 2026
@lIang70
lIang70 merged commit 4ce4632 into main Apr 29, 2026
7 checks passed
@lIang70
lIang70 deleted the chore/bump-sdkx-sdk-v0.2.3 branch April 29, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant