1. 30 Aug, 2026 7 commits
    • fix(model): return string from JSON column Valuers for pg simple protocol · 6eb6f35e
      With PrepareStmt disabled, PostgreSQL queries run over pgx's simple
      protocol, which encodes every []byte parameter as a bytea hex literal
      ('\x...'). driver.Valuer implementations returning []byte from
      json.Marshal therefore fail json-column writes with SQLSTATE 22P02
      (reported on the channels UPDATE path via ChannelInfo).
      
      Reproduced against a live PostgreSQL 16: []byte Valuer into a json
      column fails under simple protocol, string succeeds; []byte into a
      text column silently stores the hex literal (no such path exists in
      the repo today — audited all Valuers, json.RawMessage fields, and raw
      SQL call sites).
      
      - ChannelInfo, Properties, TaskPrivateData, JSONValue Value() now
        return string; zero-value nil semantics unchanged. Task.Data
        (bare json.RawMessage) is unaffected — database/sql's default
        converter already passes it as expected.
      - Their Scan() counterparts now accept both []byte and string via a
        shared jsonScanBytes helper: SQLite returns string for these columns
        once Value() emits string, and the old []byte-only assertions
        silently zeroed the field (caught by the model test suite).
      - Add regression tests locking both contracts: json-column Valuers
        must return string (or nil for zero values), Scanners must accept
        []byte and string.
      
      Verified end-to-end against PostgreSQL 16 with the real model types:
      Channel create/update/read-back, Task json fields, PrefillGroup items.
      CaIon committed
    • fix(sqlite): enable WAL + working busy timeout + _txlock=immediate to stop… · 1751f43e
      fix(sqlite): enable WAL + working busy timeout + _txlock=immediate to stop concurrent write lockouts (#7030)
      
      * fix(sqlite): enable WAL + working busy timeout + _txlock=immediate to stop concurrent write lockouts
      Xayinn committed
    • fix(subscription): 无有效订阅时前端如实显示「仅用订阅」偏好 (#6222) (#7086) · b5b94bc6
      Co-authored-by: Claude <noreply@anthropic.com>
      ruiyunzhao committed
    • feat(web): factory task plugins update only with the system · dc4732cf
      Marketplace install/upgrade on a factory-served plugin actually created
      a permanent override shadowing every future built-in release. The card
      now shows an informational "Updates with the system" badge instead of
      the action, while keeping the built-in vs marketplace version line and
      the upgradable state badge visible. Deliberate overrides are untouched:
      upload and marketplace actions on overridden or third-party plugins
      behave as before, and the plugins table now hints when an override
      lags behind the shipped built-in version so operators know deleting it
      restores the newer factory plugin.
      CaIon committed
    • fix(model): disable PostgreSQL prepared statements for pooler compatibility · 66031a09
      GORM v1.25.2 closes cached prepared statements asynchronously on any SQL
      error and immediately re-Parses the same deterministic name (pgx's
      stmt_<sha256>) on the same client connection. Transaction-pooling proxies
      (PgBouncer >=1.21 with max_prepared_statements, Neon, Supabase) respond
      with FATAL "prepared statement name is already in use" (SQLSTATE 08P01)
      and drop the connection. PreferSimpleProtocol only disables pgx's
      implicit prepare and never covered GORM's explicit PrepareStmt cache.
      
      - PostgreSQL now runs with PrepareStmt disabled entirely; named prepared
        statements are fundamentally session state and cannot be made safe
        under transaction pooling. Parse/plan cost is noise for this workload.
      - Upgrade gorm to v1.25.12 so MySQL/SQLite statement caches (still
        enabled) no longer churn close/re-prepare on ordinary SQL errors;
        v1.25.9+ restricts eviction to driver.ErrBadConn. Deliberately not
        v1.26+, whose LRU eviction has an open use-after-close race (#7831).
      - sanitizeDBError now attaches a remediation hint on 08P01/42P05 so
        affected deployments can self-diagnose from the log line.
      CaIon committed
    • feat(task): resolve channel-mapped aliases and case variants for plugin models · 6c22550e
      Channel model_mapping keys exposed in a channel's model list now act as
      first-class aliases for task-plugin models across the whole line:
      
      - Derived alias view (model/task_model_alias.go): built from enabled
        channels' model_mapping, chain-following with cycle detection, declared
        names always win, cross-plugin conflicts dropped. Rebuilt on channel
        cache refresh, registry generation change, and a 60s TTL.
      - Request path: PinTaskPluginEndpoint resolves declared-name case folds
        and mapping aliases before endpoint lookup (never rewriting the body
        until the endpoint is claimed), pins with MappedModel, and the decode
        contract accepts alias echoes without loosening model ownership for
        normal pins. Legacy /v1/tasks submit folds case variants the same way.
        Fixes aliases on POST /v1/responses silently falling through to the
        main relay against task channels.
      - Mapping order: ModelMappedHelper now runs before the plugin submit
        hook builds and caches the upstream body, so channel model_mapping
        actually reaches the upstream request. Plugins receive the mapped
        name as ctx.upstreamModel in both decode and submit contexts.
      - Billing: identity stays the origin name; when the alias has no tiered
        expression, the selected channel's mapping tail expression applies.
        Pricing page and billing-expr smoke tests resolve aliases to the
        owning plugin's usage schema.
      - Case folding: ASCII-only fold with exact-match priority; same-plugin
        and cross-plugin fold collisions rejected at registration.
      - Plugins: model-keyed rate tables, req_key derivation, and combo
        validation in doubao/kling/jimeng/hailuo/vidu/sunoapi now key on
        ctx.upstreamModel || ctx.model; render/echo paths keep ctx.model.
      CaIon committed
  2. 29 Aug, 2026 9 commits
  3. 27 Aug, 2026 3 commits
  4. 26 Aug, 2026 3 commits
  5. 21 Aug, 2026 1 commit
  6. 18 Aug, 2026 5 commits
  7. 15 Aug, 2026 5 commits
  8. 14 Aug, 2026 7 commits