feat: split TokenSpace into a dedicated channel type - #1040
Open
think-back wants to merge 3 commits into
Open
think-back wants to merge 3 commits into
think-back wants to merge 3 commits into
Conversation
Keep the existing channel records and explicit material provider path intact while giving new TokenSpace channels a stable type boundary.\n\nConstraint: Existing persisted channel types and 106 production configuration must remain compatible.\nRejected: Channel-ID special cases | They preserve the coupling this split is meant to remove.\nConfidence: high\nScope-risk: moderate\nDirective: Retain the legacy explicit tokenspace_material path until existing channels are migrated deliberately.\nTested: git diff --check and design self-review.\nNot-tested: Implementation behavior is pending.
Sequence the compatibility-preserving type registration, provider boundary, and console updates behind failing tests.\n\nConstraint: The existing DoubaoVideo and explicit tokenspace_material records must remain runnable without migration.\nRejected: One broad untested refactor | It obscures regressions across routing, provider selection, and two frontends.\nConfidence: high\nScope-risk: moderate\nDirective: Keep RED and GREEN checkpoints separate and do not deploy from this worktree.\nTested: git diff --check and plan self-review.\nNot-tested: Implementation tests are pending.
…nel type Keep legacy DoubaoVideo records intact while giving new TokenSpace channels their own routing, provider, asset-binding, and console semantics. Constraint: Preserve existing channel 106 records without database migration or production mutation. Rejected: Copying a second Seedance adaptor or hardcoding channel IDs | the protocol and provider boundary are reusable by type. Confidence: high Scope-risk: moderate Directive: Keep ordinary TokenSpace asset materialization explicit and retain the legacy Doubao provider path. Tested: targeted Go tests for type, endpoint, provider, assets, pinned routing, polling keys, and Responses isolation; default/classic Bun tests and builds; default typecheck; locale JSON parse; git diff --check. Not-tested: full service suite times out on existing Windows/SQLite parallel-test contention; classic i18n lint was unavailable because the required bunx dependency could not be resolved.
|
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
ChannelTypeTokenSpace(114) so TokenSpace no longer relies on the legacyDoubaoVideochannel type (54).Compatibility and rollout
DoubaoVideochannels with explicittokenspace_materialconfiguration remain supported.106.106is migrated after deployment, change only its channeltypefrom54to114after backing up/freezing traffic; preserve its keys, settings, models, groups, and channel ID, then refresh/restart channel caches.tokenspace_materialconfiguration.Validation
go test -vet=off ./constant -count=1 -buildvcs=false -timeout=30sbun test src/features/channels/constants.test.ts src/features/channels/lib/channel-form.test.ts(default console)bun test src/components/table/channels/modals/modelapi-seedance-classic.test.js(classic console)bun run buildfor bothweb/defaultandweb/classicThe full
go test ./servicepackage suite was not used as the gate because unrelated Windows file-lock/process behavior prevents that package-wide run in this worktree; the focused service test binary and compile completed successfully.