Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a3ebcd0
refactor(service): fold nativeapi and codexruntime into the service p…
Oct 5, 2026
dc14a85
refactor(settings): name the switch settings and their tests for what…
Oct 5, 2026
af8f366
refactor(admin): serve error diagnostics from OpsHandler; drop the ca…
Oct 5, 2026
066a909
refactor(accounts): drop the unread account_view_facts object from ac…
Oct 5, 2026
6ba5696
refactor(account-jobs): remove the job item action field that nothing…
Oct 5, 2026
e16d4af
refactor(account-tests): remove wire_platform and schema_version from…
Oct 5, 2026
573be10
refactor(accounts): name the protocol-mode retention for what it does
Oct 5, 2026
82583b6
refactor(backend): restore upstream comments, blank line and import o…
Oct 5, 2026
6b07852
refactor(codex): building an account's User-Agent cannot fail
Oct 5, 2026
1a63faf
refactor(accounts): remove two throws the protocol-mode edits can nev…
Oct 5, 2026
69aa750
refactor(comments): say what the code does, not what the plugin era left
Oct 5, 2026
22ecdbb
refactor(dto): put the account mappers' fields back where upstream ha…
Oct 5, 2026
7a167e1
refactor(account-tests): remove the plan's account guard that cannot …
Oct 5, 2026
b699710
refactor(accounts): drop the request decoder for a removed field; kee…
Oct 5, 2026
9ef3f82
fix(accounts): key the drawer's usage cache and usage cell by account id
Oct 5, 2026
4102424
refactor(accounts): drop late dialog answers with a local guard
Oct 5, 2026
ac0576e
refactor(accounts): delete the account-view skeleton
Oct 5, 2026
cf3c262
chore: restore upstream's bytes where the fork differed only cosmetic…
Oct 5, 2026
07f50b2
refactor(frontend): delete the orphan tasks page, unread locale keys …
Oct 5, 2026
962a8d3
refactor(accounts): read the OpenAI quota windows the server sends
Oct 5, 2026
92c9702
build(frontend): restore upstream's module resolution settings
Oct 5, 2026
c1d2934
refactor(router): delete the /admin/tasks and /admin/cindy-accounts e…
Oct 5, 2026
9f9bae5
refactor(select): restore upstream's handling of a disabled select
Oct 5, 2026
c21e090
fix(ops): describe reasoning recovery in the error details without "h…
Oct 5, 2026
6bbace0
test(frontend): name three specs after what they cover
Oct 5, 2026
6d108e0
refactor(prompt-audit): restore upstream's page, view model and spec
Oct 5, 2026
932d9c2
fix(theme): style the prompt audit save bar that upstream draws
Oct 5, 2026
4c49982
refactor(gateway): delete account traffic telemetry
Oct 6, 2026
d4d388f
refactor(settings): delete the telemetry switch, its stored key and i…
Oct 6, 2026
aa7ddc3
refactor(accounts): stop comparing the account id in the usage cell's…
Oct 6, 2026
64e2633
test(frontend): restore upstream's vitest config and plan card spec
Oct 6, 2026
82cce35
refactor(account-jobs): drop the kind filter and page size argument o…
Oct 6, 2026
0e4ba8f
refactor(accounts): delete duplicate account review
Oct 6, 2026
3c281d0
refactor(account-jobs): delete refreshDrawer; loadRecent takes a requ…
Oct 6, 2026
74609b9
refactor(account-jobs): delete the store's activeCount
Oct 6, 2026
3d51691
refactor(account-jobs): the job list filters by status only
Oct 6, 2026
96f74aa
fix(settings): the panel that holds the theme switch is titled Appear…
Oct 6, 2026
cb25ead
Merge remote-tracking branch 'origin/main' into refactor/remove-plugi…
Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .downstream/native-domains.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ authentication and the existing step-up policy.
| Interface | Contract |
| --- | --- |
| `GET/PUT /admin/settings/codex-runtime` | Codex request body compression switch (`request_zstd`; a missing key is on). |
| `GET/PUT /admin/settings/observability` | Telemetry and native theme switches. |
| `GET/PUT /admin/settings/observability` | Native theme switch (`theme_enabled`; a missing key is on). |

Each of the two is stored as one `settings` row holding a JSON object of
boolean switches; `GET` and `PUT` answer with the switches in the standard
Expand Down Expand Up @@ -128,6 +128,19 @@ Going back to an earlier release is therefore not an image change: it requires a
database dump taken before the migrations that release does not have. Such a
rollback has not been run and is not an automatic failure path.

Migration 273 removes the key `telemetry_enabled` from the stored
`admin_observability_config` row; `theme_enabled` keeps its value. The key
switched the per-account traffic counters, which are deleted with their route
`GET /admin/accounts/:id/traffic-telemetry`. The counters were the Redis keys
`account_traffic_observe:{<account id>}:<http|ws>` and the same with the
suffix `:minute`; each expires 24 hours after its last write and nothing
writes them any more. v0.2.13-codexrip.10 and .11 start on the migrated row and
take the missing switch as on. Saving the observability settings in one of
them stores the key again, and 273 is recorded by then: this release then
exits at start with `invalid setting admin_observability_config` until the key
is removed by hand
(`UPDATE settings SET value = (value::jsonb - 'telemetry_enabled')::text WHERE key = 'admin_observability_config'`).

## Verification

Normal required PR checks validate the native domain packages, account scope,
Expand Down
15 changes: 0 additions & 15 deletions .github/scripts/test_native_domains.sh

This file was deleted.

32 changes: 1 addition & 31 deletions .github/scripts/test_upstream_automation_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import json
import re
import shlex
import unittest
from pathlib import Path
from types import SimpleNamespace
Expand Down Expand Up @@ -83,51 +82,22 @@ def test_image_build_skips_validation_without_changing_daily_build(self):
vite = (ROOT / "frontend/vite.config.ts").read_text(encoding="utf-8")
package = json.loads((ROOT / "frontend/package.json").read_text(encoding="utf-8"))
self.assertIn("RUN SUB2API_ARTIFACT_BUILD=1 pnpm exec vite build", dockerfile)
self.assertNotIn("backend/pkg/extensionapi/ui/build.mjs", dockerfile)
self.assertNotIn("RUN pnpm run build", dockerfile)
self.assertNotIn("ENV SUB2API_ARTIFACT_BUILD", dockerfile)
self.assertIn("process.env.SUB2API_ARTIFACT_BUILD === '1'", vite)
self.assertIn("enableBuild: !artifactBuild", vite)
self.assertEqual(package["scripts"]["build"], "pnpm run check:i18n && vue-tsc -b && vite build")

def test_native_ci_preserves_required_checks_and_selects_existing_contracts(self):
def test_verify_workflow_keeps_required_checks_and_selects_existing_specs(self):
verify = (ROOT / ".github/workflows/downstream-verify.yml").read_text(encoding="utf-8")
for name in ("Downstream backend", "Downstream frontend", "Candidate OCI image"):
self.assertRegex(verify, rf"(?m)^ name: {re.escape(name)}$")
self.assertIn("run: bash .github/scripts/test_native_domains.sh", verify)
for retired in ("test_first_party_plugins.sh", "initialize_plugin_publisher",
"backend/pkg/extensionapi/ui/tsconfig.json", "../plugins/"):
self.assertNotIn(retired, verify)
specs = re.findall(r"(?m)^\s+(src/\S+\.spec\.ts)(?:\s+\\)?$", verify)
self.assertTrue(specs, "the frontend gate must select real spec files")
self.assertEqual(len(specs), len(set(specs)), "do not repeat identical frontend specs")
for spec in specs:
self.assertTrue((ROOT / "frontend" / spec).is_file(), spec)

script = (ROOT / ".github/scripts/test_native_domains.sh").read_text(encoding="utf-8")
self.assertNotRegex(script, r"package-plugin|generate-key|publisher\.key|plugins/\*")
commands = [shlex.split(line) for line in script.replace("\\\n", " ").splitlines()
if line.startswith("go -C backend test ")]
self.assertEqual(len(commands), 2)
for command in commands:
selector = command[command.index("-run") + 1] if "-run" in command else r"^Test"
packages = [arg for arg in command if arg.startswith("./")]
self.assertTrue(packages)
for package in packages:
path = ROOT / "backend" / package.removeprefix("./").removesuffix("/...")
self.assertTrue(path.is_dir(), package)
files = path.rglob("*_test.go") if package.endswith("/...") else path.glob("*_test.go")
names = []
for file in files:
source = file.read_text(encoding="utf-8")
# These commands select unit fixtures on the Linux PR runner.
build = re.search(r"(?m)^//go:build (.+)$", source)
if build and re.search(r"\b(integration|windows)\b", build.group(1)):
continue
names.extend(re.findall(r"(?m)^func (Test\w+)\(", source))
selected = [name for name in names if re.search(selector, name)]
self.assertTrue(selected, f"{package}: {selector} selected no unit tests")

def test_bot_chain_is_explicit_and_does_not_overwrite_manual_resolutions(self):
self.assertIn("upstream_tag:", self.sync)
self.assertIn("preserve manual resolutions", self.sync)
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/downstream-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
python3 .github/scripts/test_release_preflight.py
- name: Agent protocol contracts
run: bash .github/scripts/test_agent_protocol.sh
- name: Native domain contracts
run: bash .github/scripts/test_native_domains.sh
- name: Reasoning recovery contracts
run: bash .github/scripts/test_reasoning_recovery.sh
- name: Model context capacity contracts
Expand Down Expand Up @@ -110,14 +108,13 @@ jobs:
pnpm exec vitest run \
src/components/admin/account/__tests__/AccountTestModal.spec.ts \
src/components/admin/account/__tests__/AccountTestModal.displayContract.spec.ts \
src/components/admin/account/__tests__/AccountTestModal.policyPlan.spec.ts \
src/components/admin/account/__tests__/AccountTestModal.testPlan.spec.ts \
src/components/keys/__tests__/UseKeyModal.spec.ts \
src/views/admin/__tests__/SettingsView.spec.ts \
src/components/common/__tests__/VersionBadge.downstream.spec.ts \
src/components/common/__tests__/BaseDialog.spec.ts \
src/components/common/__tests__/Select.disabled.spec.ts \
src/views/admin/__tests__/PluginsView.spec.ts \
src/components/admin/codex/__tests__/CodexRuntime.native.spec.ts \
src/components/admin/codex/__tests__/CodexRuntime.spec.ts \
src/api/__tests__/downstreamStatus.spec.ts \
src/i18n/__tests__/accountConsoleLocales.spec.ts \
src/__tests__/integration/data-import.spec.ts \
Expand All @@ -141,7 +138,7 @@ jobs:
src/views/user/__tests__/StripePaymentView.spec.ts \
src/views/admin/__tests__/ReasoningRecoveryView.spec.ts \
src/components/account/__tests__/EditAccountModal.spec.ts \
src/utils/__tests__/accountEditCodec.spec.ts \
src/utils/__tests__/openaiProtocolModeEdits.spec.ts \
src/components/account/__tests__/ModelWhitelistSelector.spec.ts \
src/components/account/__tests__/ModelContextCapacityField.spec.ts \
src/utils/__tests__/modelContextCapacity.spec.ts \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Sub2API

[![Go](https://img.shields.io/badge/Go-1.26.6-00ADD8.svg)](https://golang.org/)
[![Go](https://img.shields.io/badge/Go-1.27.0-00ADD8.svg)](https://golang.org/)
[![Vue](https://img.shields.io/badge/Vue-3.4+-4FC08D.svg)](https://vuejs.org/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15+-336791.svg)](https://www.postgresql.org/)
[![Redis](https://img.shields.io/badge/Redis-7+-DC382D.svg)](https://redis.io/)
Expand Down Expand Up @@ -200,7 +200,7 @@ Community projects that extend or integrate with Sub2API:

| Component | Technology |
|-----------|------------|
| Backend | Go 1.26.6, Gin, Ent |
| Backend | Go 1.27.0, Gin, Ent |
| Frontend | Vue 3.4+, Vite 5+, TailwindCSS |
| Database | PostgreSQL 15+ |
| Cache/Queue | Redis 7+ |
Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Sub2API

[![Go](https://img.shields.io/badge/Go-1.26.6-00ADD8.svg)](https://golang.org/)
[![Go](https://img.shields.io/badge/Go-1.27.0-00ADD8.svg)](https://golang.org/)
[![Vue](https://img.shields.io/badge/Vue-3.4+-4FC08D.svg)](https://vuejs.org/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15+-336791.svg)](https://www.postgresql.org/)
[![Redis](https://img.shields.io/badge/Redis-7+-DC382D.svg)](https://redis.io/)
Expand Down Expand Up @@ -202,7 +202,7 @@ Sub2API 是一个 AI API 网关平台,用于分发和管理 AI 产品订阅的

| 组件 | 技术 |
|------|------|
| 后端 | Go 1.26.6, Gin, Ent |
| 后端 | Go 1.27.0, Gin, Ent |
| 前端 | Vue 3.4+, Vite 5+, TailwindCSS |
| 数据库 | PostgreSQL 15+ |
| 缓存/队列 | Redis 7+ |
Expand Down
4 changes: 2 additions & 2 deletions README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Sub2API

[![Go](https://img.shields.io/badge/Go-1.26.6-00ADD8.svg)](https://golang.org/)
[![Go](https://img.shields.io/badge/Go-1.27.0-00ADD8.svg)](https://golang.org/)
[![Vue](https://img.shields.io/badge/Vue-3.4+-4FC08D.svg)](https://vuejs.org/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15+-336791.svg)](https://www.postgresql.org/)
[![Redis](https://img.shields.io/badge/Redis-7+-DC382D.svg)](https://redis.io/)
Expand Down Expand Up @@ -201,7 +201,7 @@ Sub2API を拡張・統合するコミュニティプロジェクト:

| コンポーネント | 技術 |
|-----------|------------|
| バックエンド | Go 1.26.6, Gin, Ent |
| バックエンド | Go 1.27.0, Gin, Ent |
| フロントエンド | Vue 3.4+, Vite 5+, TailwindCSS |
| データベース | PostgreSQL 15+ |
| キャッシュ/キュー | Redis 7+ |
Expand Down
6 changes: 2 additions & 4 deletions backend/cmd/server/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading