Skip to content

[pull] develop from bfenetworks:develop - #317

Merged
pull[bot] merged 50 commits into
iyangsj:developfrom
bfenetworks:develop
Aug 6, 2026
Merged

pull[bot] merged 50 commits into
iyangsj:developfrom
bfenetworks:develop

Conversation

@pull

@pull pull Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

mileszhang2016 and others added 30 commits July 20, 2026 15:50
- Add json:"-" to RouteRule.Cond to avoid unmarshaling interface field
- Provide Session in test requests so condition.Match() does not bail out
- Adjust ai_route.data test fixture: remove apikey default rule and entity
  from ak_user_a binding so global fallback can be reached as expected
- Update data_load_test to expect one apikey rule after fixture change
Introduce AiRouteDataFile/RouteTableFile/RouteRuleFile for JSON loading
and keep AiRouteData/RouteTable/RouteRule as runtime types with compiled
condition.Condition. This avoids unmarshaling into interface fields and
makes the data pipeline clearer.
Add .gitattributes to force LF for test fixtures whose byte-exact content
is compared in unit tests. Convert affected working-tree files from CRLF
back to LF and un-ignore .gitattributes in .gitignore.

Fixes:
- bfe_modules/mod_static: index.html size mismatch (59 vs 53)
- bfe_modules/mod_markdown: markdown renderer output mismatch due to CRLF
  input and expected-output files
Add integration tests under tests/integration/mod_ai_route/ covering:
- Multiple route tables search order (apikey -> entity)
- Entity fallback when apikey table has no match
- No-binding 404 handling
- Multiple targets weighted random selection
- Multiple fallbacks success and all-fail scenarios
- Model override through target and fallback

Includes testdata fixtures (bfe.conf, cluster_conf, host/route/vip rules,
ai_route.data) and a test harness that starts mock httptest backends,
constructs a lightweight BfeServer, and invokes ServeHTTPForAI directly.
Signed-off-by: liangchuan <liangchuan@yf-networks.com>
Signed-off-by: liangchuan <liangchuan@yf-networks.com>
Signed-off-by: liangchuan <liangchuan@yf-networks.com>
- 添加 AiRouteDataFile 自定义 UnmarshalJSON,支持 RouteRules 大写字段
- 将 api_key 字符串/对象统一归一化为 apikey,兼容 InnerAPI 导出
…works/proxy-wasm-go-host v0.0.1

- Replace github.com/baidu/go-lib imports with github.com/bfenetworks/go-lib
- Add HttpAddr/HttpsAddr/MonitorAddr to ConfigBasic for loopback binding
- Adapt log4go.NewTimeFileLogWriter call for updated fork API
- Update go.mod/go.sum to tagged releases
Make all primary clusters return 500 so the request always falls back
to cluster_fallback_1, ensuring deterministic target and fallback model
assertions.
…ntation

- Update configuration docs to match code
- Update condition docs to match code primitives
- Add missing module docs (mod_waf, mod_markdown, mod_ai_route, mod_ai_rate_limit, mod_access_pb3)
- Fix module doc inconsistencies (fields, types, metrics)
- Sync en_us modules with zh_cn
- Update monitor docs to match code state structs
docs: sync and supplement zh_cn/en_us documentation with code impleme…
…n tables

- Add 00-common.md with reusable types (Port, ListenAddr, FilePath, DirPath,
  Version, Hostname, IPAddr, Weight, HTTPStatusCodePattern) for both languages
- Convert core config docs (bfe.conf, tls, routing, cluster, gslb, etc.) to
  the six-column format: item | type | meaning | required | notes | validity
- Create per-module configuration directories under configuration/mod_*
  for 32 extension modules, migrating config sections from modules/mod_*
- Update module guide docs to link to the new configuration docs
- Update SUMMARY.md with Common Types and Module Configuration sections
- Fix relative links to 00-common.md from subdirectories
docs(configuration): unify zh_cn and en_us config docs with six-column tables
test(bfe_modules): add comprehensive unit tests
When an API-key enables quota but the Redis balance key does not exist yet,

HasBalance returned redis.ErrNil as INTERNAL_QUOTA_ERROR and rejected requests.

Fixes #1292

Changes:

- HasBalance treats redis.ErrNil as full quota.

- Deduct Lua script initializes the key to Quota on first deduction.

- Add unit tests for QuotaPlan.HasBalance and QuotaPlan.Deduct.

- Expand mod_ai_token_auth docs (zh_cn/en_us) with quota design details.
fix(mod_ai_token_auth): handle uninitialized quota redis key (#1292)
Use sync/atomic.Bool instead of plain bool for package-level openDebug,
so concurrent reads from WafClient.detect goroutines and writes from
ModuleWaf.Init() are properly synchronized. This fixes go test -race
failures in mod_unified_waf.
mileszhang2016 and others added 20 commits August 3, 2026 22:30
fix(mod_unified_waf): fix data race on openDebug
Revert "fix(mod_ai_token_auth): handle uninitialized quota redis key …
Revert "fix(mod_unified_waf): fix data race on openDebug"
merge new update from develop
Signed-off-by: zhangmiao <zhangmiao@yf-networks.com>
docs: update CHANGELOG for v1.8.4 release
fix(mod_unified_waf): make openDebug atomic to fix data race
Signed-off-by: xuleiming <leiming.xu@163.com>
fix data race in unit test in V1.8.4
bfe_server: fix AI gateway reverse proxy fallback and SSE timeout handling
feat(docker): add log-reader to image
@pull pull Bot locked and limited conversation to collaborators Aug 6, 2026
@pull pull Bot added the ⤵️ pull label Aug 6, 2026
@pull
pull Bot merged commit a8fed6e into iyangsj:develop Aug 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants