chore(gate): migrate .githooks from Python gh-gate to Rust gate - #6888
Closed
hathawayANdRX105 wants to merge 123 commits into
Closed
chore(gate): migrate .githooks from Python gh-gate to Rust gate#6888hathawayANdRX105 wants to merge 123 commits into
hathawayANdRX105 wants to merge 123 commits into
Conversation
- Replace 5 duplicate issue forms (zh/en) with 3 unified templates: Bug, Feature, Task/Refactor/Decision - Rewrite PR template with bilingual heading/content convention - Add .codegraph/ and .code-review-graph/ to .gitignore
…ocongyu66#10) recharts is referenced only by chart.tsx, which has zero consumers: ChartContainer/ChartTooltip/ChartLegend exports are imported nowhere (cg + grep confirmed; no barrel, story, or test references). The build output never contained recharts code (tree-shaking already eliminated it), so this is pure dependency hygiene, not a size win. - web/package.json: drop recharts 3.9.1 - web/bun.lock: lockfile updated (recharts + victory-vendor graph removed) - web/src/components/ui/chart.tsx: deleted
- replace docs/spike/ with todo/ (spike docs moved to todo/spike) - add .wt/ for temporary worktrees
- 9 test files: switch node:test to bun:test (after -> afterAll), avoiding Bun's node:test describe-inside-test limitation (bun#5090) that surfaced when files run together - api-key-group-cell.test.tsx: update 3 assertions to match current component behavior (AutoGroupBadge is disabled; only the ratio frame renders, and no frame when ratio is absent) - add @types/bun + tsconfig types entry so bun:test typechecks Result: bun test 155 pass / 0 fail / 0 errors (was 114/12/9). Fixes xiaocongyu66#9
Updated Dockerfile to improve dependency installation with retries and added comments for clarity.
* chore(frontend): remove io.net model settings * chore(frontend): remove scattered io.net references
Closes xiaocongyu66#33. AI-assisted implementation. Backend CI failure was unrelated to this seven-locale-only diff: TestDoTaskApiRequest_KeepsReplayableGetBody nil-pointer panic; frontend and pr-quality checks passed.
Closes xiaocongyu66#34. AI-assisted implementation. Backend CI failure matches the previously recorded unrelated TestDoTaskApiRequest_KeepsReplayableGetBody nil-pointer panic.
…itor across rerenders * chore(web): remove unused shiki dependency * refactor(web): replace BundledLanguage type with string * fix(web): preserve CodeMirror editor across rerenders
Closes xiaocongyu66#35. Local integrated verification passed: root and relaykit builds, frontend build, i18n sync, and 155 Bun tests. GitHub frontend/backend test jobs retain unrelated pre-existing failures documented in the PR and Issue.
* chore(web): lazy load katex rendering * feat(web): lazy load katex only when math syntax is present * fix(web): render escaped math fallback when katex lazy import fails * fix(web): render markdown while katex loads * feat(web): render Playground math with lazy KaTeX across Response nodes * fix(web): keep sanitized KaTeX inline without block wrapper
* chore(web): deduplicate react-is dependency * chore(web): unify react-is to 19.2.7 via overrides Add react-is 19.2.7 to overrides to deduplicate the four separate copies (18.3.1 root, 19.2.7 in @rc-component/util, 16.13.1 in hoist-non-react-statics and prop-types) into a single resolved version matching the app's react 19.2.7. This is the smallest safe change: only the override + lockfile collapse. No package versions other than react-is changed.
- k8s/new-api-master.yaml: 单副本后台任务节点,不设 NODE_TYPE - k8s/new-api-worker.yaml: 多副本 relay 节点,NODE_TYPE=slave,含 podAntiAffinity 分散到不同主机 - k8s/service.yaml: selector 只匹配 role=worker,master 不接外部请求 - k8s/postgres.yaml, k8s/redis.yaml: 集群内自建数据层,单一可写端点 - k8s/ingress.yaml: Nginx Ingress,关闭缓冲支持 SSE 与 WebSocket - .github/workflows/deploy.yml: 从 GitHub Actions Secrets 注入凭证并 apply - k8s/README.md: 运行约束、Secret 清单、部署与验证步骤 所有凭证仅通过 secretKeyRef 引用集群 Secret,清单与仓库中无明文。
…iaocongyu66#98) worker 启动时 casbin_rule 表还不存在(master 负责迁移),导致 FATAL 退出 并进入 CrashLoopBackOff,rollout 超时失败。 - worker 加 initContainer 轮询 postgres 探测 casbin_rule 表 - deploy 拉长 rollout 超时,master 先就绪 - 失败时输出 pod describe 与容器日志便于定位
…ocongyu66#99) 节点从 Docker Hub 拉 postgres:16-alpine 出现 TLS handshake timeout 导致 Init:ImagePullBackOff。改用与 postgres.yaml 相同的 17-alpine tag (节点已有缓存)并设 imagePullPolicy: IfNotPresent。
…66#100) 实机验证发现 agent 节点(136.0.34.25)kubelet 频繁掉线 (Kubelet stopped posting node status)。postgres/redis/master 被调度到该 节点时,节点一掉线整个服务立刻 503,且本地 PV 只存在于原节点。 将 postgres、redis、new-api-master 固定到 control-plane 节点: - 与 API server 同机,最稳定 - 本地 PV 绑定不会因 Pod 漂移失效 - worker 仍分散在所有节点,保留出口带宽均摊能力
…ency (xiaocongyu66#101) master 无 startupProbe,livenessProbe 在 ~60s 就杀掉容器(3×10s + initialDelay 30s),但跨节点数据库迁移耗时更长,导致永远起不来。 worker 同理,首次启动连接慢数据库时可能被误杀。
Closes xiaocongyu66#104 - Add Model Square sidebar entry under Personal group - Add Model Square mobile drawer entry - Replace profile dropdown System Settings with Model Square
…#133) Place the Model Square item after Task Logs instead of Personal.
Squash merge of feat/proxy-node-probe into main. 完成 xiaocongyu66#58 代理节点管理第一版:存储、解析、探测、CRUD、批量操作、前端 Tab 视图、七语言 i18n、UI 修复。xiaocongyu66#118-xiaocongyu66#122 UI 修复已包含。 Sub-issues: xiaocongyu66#59 xiaocongyu66#60 xiaocongyu66#61 xiaocongyu66#62 xiaocongyu66#63 xiaocongyu66#118 xiaocongyu66#119 xiaocongyu66#120 xiaocongyu66#121 xiaocongyu66#122 Closes: xiaocongyu66#58
* chore: clean up repo root and normalize module docs - Replace makefile with justfile (identical targets, just 1.52) - Drop CLAUDE.md, README translations (keep English README.md), sponsor sections/images - Restore web_tmp tool configs into app/web (fixes 'bun run lint' config-not-found) - Remove docs/specs (design merged into docs/plans), docs/ionet-client.md leftover - Prune stale .gitignore/.dockerignore entries, fix dead /web/ paths and plans-ignore footgun - Rename app/web/AGENTS.md to README.md; add app/api/README.md - AGENTS.md: correct pkg/ listing, backend i18n locales, module doc reference * docs: expand app/api/README.md to match web README quality * fix: restore README.en.md and sync with current README.md * docs: add PostgreSQL docker run example to README * fix: restore Star History/footer, dedup .gitignore, fix multi-language line - Restore Star History + Thank you footer (accidentally swept in earlier cut) - Remove duplicate .gomodcache/ entry in .gitignore - Update Multi-language feature line to match actual UI i18n locales (7 langs) - Unstage unrelated .agents/.github handbook files from this PR * chore: remove unrelated handbook files from cleanup PR * chore: merge app/web/.gitignore into root and delete it - Move frontend-specific entries (*.log, .tanstack/*) to root .gitignore - node_modules/dist/.env/.DS_Store/.idea already covered by root entries - Delete app/web/.gitignore (no longer needed)
* fix(proxy): clean up probe counters on node deletion * fix(proxy): restore DELETE route and add probe counter regression test
* docs(security): clean production IPs from issue xiaocongyu66#103/xiaocongyu66#108 (xiaocongyu66#139) (xiaocongyu66#188) Fixes xiaocongyu66#139 Tracking file for conyu security audit fixes xiaocongyu66#138. * fix(ci): remove actions:write from docker-build.yml (xiaocongyu66#140) (xiaocongyu66#189) docker-build.yml: replaced gh workflow run (needs actions:write) with workflow_run trigger + tag artifact upload. deploy.yml: added workflow_run trigger that downloads tag artifact; manual workflow_dispatch path unchanged. Fixes xiaocongyu66#140 * fix(security): encrypt proxy_config at rest and mask secrets in API response (xiaocongyu66#190) * fix(security): encrypt proxy_config at rest and mask secrets in API response (xiaocongyu66#141) - Add common.EncryptAESGCM/DecryptAESGCM reusable AES-256-GCM helpers - Encrypt the entire proxy_config JSON before writing to Option table - Decrypt on read with backward compatibility for legacy plaintext values - Mask Password, UUID, ObfsPassword in GetProxyConfig API response - All read paths (getGlobalProxyURL, GenerateProxyConfig) decrypt transparently Fixes xiaocongyu66#141 * fix(proxy): restore masked secrets on UpdateProxyConfig round-trip When GetProxyConfig returns ******** for Password/UUID/ObfsPassword, UpdateProxyConfig now detects the sentinel and restores the original value from the stored config instead of persisting the literal mask. Addresses CRG review inline comment on PR xiaocongyu66#190. * fix(relay): correct SSH outbound mapping in sing-box dialer ssh type was mapping cfg.Password to private_key, making password auth impossible and key auth incorrect. Also username was not being mapped to sing-box's "user" field at all. - Add PrivateKey field to outboundConfigFields struct - ssh: map username→user, password→password, private_key→private_key - Add regression tests for ssh (password/key auth), socks5, http Fixes xiaocongyu66#185
Sync 8 upstream QuantumNous bug fixes: concurrent quota hardening, async task refund, topup quota guard, Ali model mapping, Responses penalty preservation, OAuth state overwrite fix. Path-adjusted from upstream flat structure to fork's app/api/ structure.
…ngyu66#204) Agent 🤖 - Merge: Fixes xiaocongyu66#203,声明 packageManager bun + 新增 clean-web recipe,修复 fork 分支名校验 bug,减少 hook 日志噪音,移除已跟踪的 __pycache__
…ongyu66#226) Agent 🤖 - Merge: 用户已审查同意。Foundation Epic xiaocongyu66#216 全部 8 个子 issue 已实现、验证并通过 CRG+OCR 审查,整合 PR 交付路由 revision/outbox schema、wake-up dispatcher、Option/Channel/Ability/Model/Vendor revision 绑定、Rust config core 与 invalidation、auth fixture。squash 合并并删除分支。
Aggregates xiaocongyu66#206 channel, xiaocongyu66#207 catalog, xiaocongyu66#208 pricing, xiaocongyu66#209 device, xiaocongyu66#211 system, xiaocongyu66#212 admin, xiaocongyu66#213 token, xiaocongyu66#214 usage, xiaocongyu66#215 account into a unified Rust workspace CLI (apps/cli + crates/cli). Closes xiaocongyu66#205.
…cy (xiaocongyu66#229) Agent 🤖 - Merge: 代理节点批量探测串行改并发修复(xiaocongyu66#134 第 15 项),CRG risk 0.30 + OCR 审查通过
…sibles (xiaocongyu66#231) Agent 🤖 - Merge: 冲突已解决(rebase 到 origin/main 最新,PR 仅含 web 侧边栏变更);CRG + ocr 审查完成,1 条 high 判定误报已附分析,其余发现已在 503aec0/rebase 后等价 commit 修复并验证(typecheck/build 通过);issue xiaocongyu66#230 Done-when 全部勾选。
…ngyu66#232) Move app/api -> apps/api and app/web -> apps/web so all four modules (api, web, cli, gateway) live under apps/. Update go.work, justfile, Dockerfiles, CI workflows, gitignore, docs. Add apps/gateway to the Rust workspace. Fixes xiaocongyu66#232.
xiaocongyu66#234) Fix typo in actions/upload-artifact SHA pin (50769540e7f4bd5e21ca5a8e5e8d9ad4efaf8c00 -> 50769540e7f4bd5e21e526ee35c689e35e0d6874) that broke the Create multi-arch manifests job with "unable to find version". Fixes xiaocongyu66#234.
- Replace Python hooks (install_gh_gate.py, dev/, github/, tests/) with thin shell stubs delegating to vendored Rust gate binary (.githooks/gate) - Sync .githooks scripts (cleanup/, code/lint.py, workspace/, lib/_shared.py) and specs from omenic repo (Rust gate rewrite) - Adapt specs for Go/TS/JS monorepo: disable Rust lint, adjust tree depth to 8, add vendor/dist/.agents to ignore, remove Go _test.go forbidden pattern - Remove tracked __pycache__/*.pyc artifacts - Add .pytest_cache/ to .gitignore Verified: gate pre-commit exits 0 (ALL PASS)
Contributor
|
Important Review skippedToo many files! This PR contains 2089 files, which is 1789 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (23)
📒 Files selected for processing (2089)
You can disable this status message by setting the |
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.
What
合并后,
.githooks/从旧版 Pythongh-gate体系完整迁移到 Rust gate 二进制体系。旧 Python 脚本(install_gh_gate.py、dev/、github/、tests/)全部删除,替换为 omenic 仓库开发的 Rust 静态二进制gate(658KB)+ thin shell stubs。Spec YAML 适配 new-api 的 Go/TS/JS monorepo 结构。Why
omenic 仓库已完成 Rust gate 重写,new-api 仍使用旧版 Python gh-gate,两仓库
.githooks/结构不一致。旧版包含大量已废弃 Python 脚本和入库的__pycache__/*.pyc垃圾文件。迁移后统一 hook 管理方式,减少 ~3900 行 Python 代码维护负担。Issue
Fixes #239
Construction plan
git archive同步 34 个干净 .githooks 文件(scripts、specs、lib、docs)exec "$(dirname "$0")/../gate" pre-commit.githooks/gate.gitignore增加.pytest_cache/gate pre-commitexit 0Delivery record
gate pre-commit→ RESULT: ALL PASS, exit 0;gate --version→ gate 0.1.0How to test
预期输出末尾:
RESULT: ALL PASS,exit 0。预期:
gate 0.1.0Checklist
Fixes #239关联一个主 Issue。enhancement。