Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Motivation
test_status清理/回写行为。CONTENT_FILTER(大小写无关)时,从该关键词开始到末尾全部截断以匹配线上策略并避免泄露敏感后缀。Description
internal/config/store.go中增加loadConfigFromFile(path string)并在loadConfig()中于解析 env JSON 失败且非 Vercel 且写回开启时尝试回退到持久化文件,从而返回 file-backed 模式而不是早退。test_status清理与可能的回写集中到loadConfigFromFile中,并修复路径写入点为传入的path。internal/sse/content_filter_leak.go中将stripLeakedContentFilterSuffix改为大小写不敏感地查找CONTENT_FILTER并从该位置开始截断余下文本(删除了针对特定签名的判定)。internal/config/config_test.go与internal/sse/line_test.go)以反映回退行为和新的截断语义。Testing
go test ./internal/sse ./internal/config,所有测试均通过(测试套件通过并返回 ok)。TestEnvBackedStoreWritebackFallsBackToPersistedFileOnInvalidEnvJSON验证写回+错误 env JSON 时回退到文件,以及多个ParseDeepSeekContentLine相关测试验证对CONTENT_FILTER的截断行为。Codex Task