Skip to content

Commit b377fe3

Browse files
committed
fix: neutral attachment filenames for oversized init context
Attachment filenames are server-visible to the web AI platform, so the webcode-init-context- prefix was a residual identity leak from the 1.6.3 prompt scrub. Rename to init-context- and extend the identity gate to scan auto_init_prompt.ts, which owns the filename constant.
1 parent 934e5b4 commit b377fe3

8 files changed

Lines changed: 28 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
最新版本:
99

10+
- [v1.7.1(中文)](changelogs/zh/v1.7.1.md) · [v1.7.1 (English)](changelogs/en/v1.7.1.md)
11+
1012
- [v1.7.0(中文)](changelogs/zh/v1.7.0.md) · [v1.7.0 (English)](changelogs/en/v1.7.0.md)
1113
- [v1.6.4(中文)](changelogs/zh/v1.6.4.md) · [v1.6.4 (English)](changelogs/en/v1.6.4.md)
1214
- [v1.6.3(中文)](changelogs/zh/v1.6.3.md) · [v1.6.3 (English)](changelogs/en/v1.6.3.md)

‎bridge-browser/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr/Dq8HZWC/iTQjLSY7aijxZFNROrBVft2FG9GNitQk8SP0cNXD6pJlC4SBGrCjz9g/27bPdz0gxhMKm6qZYWPtpRkQr3tACiQfvOh8IUaPmvlAnyHDM0BYrYv1x3k1N8vssjvJ4jDFsXZ9wRxgxOZxmdW3V63R8ZFu1UPQkdTKn2RSXnGpBMaQEd3lP1BHZlFCARiou+cfZVK/tX0GL08IHk/sitULt/gnZl6/t4vvrqA/yiDDV2SAEgpEKEAJfz+J3YELz+H6PtnN0HX55f7mHQOBepeFHyLoGGwM99T/1Nk9pvk64uU0oK1PTaSGR1WV5w6im36Emqg6GoaUPIaQIDAQAB",
44
"minimum_chrome_version": "111",
55
"name": "__MSG_extensionName__",
6-
"version": "1.7.0",
6+
"version": "1.7.1",
77
"description": "__MSG_extensionDescription__",
88
"default_locale": "en",
99
"icons": {

‎bridge-browser/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bridge-browser",
33
"displayName": "webcode bridge",
4-
"version": "1.7.0",
4+
"version": "1.7.1",
55
"type": "module",
66
"scripts": {
77
"prebuild": "node -e \"const fs=require('node:fs');const pkg=JSON.parse(fs.readFileSync('package.json','utf8'));const manifest=JSON.parse(fs.readFileSync('manifest.json','utf8'));if(pkg.version!==manifest.version){console.error('manifest.json version ('+manifest.version+') does not match package.json ('+pkg.version+')');process.exit(1)}\"",

‎bridge-browser/src/content/auto_init_prompt.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ const AUTO_INIT_EVENT_TYPES = [
5252
"change",
5353
"focusin",
5454
] as const;
55-
const AUTO_INIT_ATTACHMENT_FILENAME_PREFIX = `${BRANDING.slug}-init-context`;
55+
// Neutral by design: attachment filenames are visible to the web AI
56+
// platform, so they must not carry the product name.
57+
const AUTO_INIT_ATTACHMENT_FILENAME_PREFIX = 'init-context';
5658

5759
export class AutoInitPromptController {
5860
private listenerStarted = false;
@@ -294,7 +296,7 @@ export class AutoInitPromptController {
294296

295297
if (UI.replaceInputBoxText(replacement.text, selectors.inputArea)) {
296298
this.lastPromptedText = replacement.text;
297-
Logger.log("Inserted webcode initialization prompt", "action");
299+
Logger.log("Inserted initialization prompt", "action");
298300
return { success: true, attached: replacement.attached };
299301
}
300302

‎bridge-browser/test/model_facing_identity.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function scanFile(absolutePath: string): void {
3838
function main(): void {
3939
const contentDir = path.resolve(here, "../../src/content");
4040
const targets = [
41+
"auto_init_prompt.ts",
4142
"auto_init_prompt_text.ts",
4243
"init_context.ts",
4344
"tool_call_tracker.ts",

‎changelogs/en/v1.7.1.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# v1.7.1 (2026-11-04)
2+
3+
## Improved
4+
5+
- De-identify attachment filenames: the oversized init-context attachment
6+
prefix changes from `webcode-init-context-` to the neutral `init-context-`.
7+
Attachment filenames are visible to the web AI platform server, making this
8+
a residual channel of the 1.6.3/1.6.4 de-identification; the identity gate
9+
now also scans `auto_init_prompt.ts` (which holds the filename constant)
10+
so this cannot drift back.

‎changelogs/zh/v1.7.1.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# v1.7.1 (2026-11-04)
2+
3+
## 改进
4+
5+
- 附件文件名去身份化:超大初始化上下文附件前缀由 `webcode-init-context-`
6+
改为中性的 `init-context-`。附件文件名对网页 AI 平台服务端可见,
7+
属于 1.6.3/1.6.4 去身份化的残余通道;身份闸扫描面扩展至
8+
`auto_init_prompt.ts`(含附件文件名常量),防止再漂移。

‎gateway-vscode/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"license": "MIT",
1515
"icon": "images/icon.png",
16-
"version": "1.7.0",
16+
"version": "1.7.1",
1717
"engines": {
1818
"vscode": "^1.106.1"
1919
},

0 commit comments

Comments
 (0)