Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

仓库根有一个被提交进来的截图:文件名 --full-page(68KB PNG),.gitignore 的 /*.png 锚点拦不住它 #3193

Closed

Description

@os-zhuang

现象

main 的仓库根目录里有一个 被 git 跟踪 的文件,名字就叫 --full-page:

$ file -- ./--full-page
./--full-page: PNG image data, 1280 x 577, 8-bit/color RGB, non-interlaced

$ ls -la -- --full-page
-rw-r--r-- 1 root root 68949 ... --full-page

$ git log --oneline -1 -- './--full-page'
07de839 fix(notifications): the config, position and action variant are read instead of forked or ignored (#3014 follow-up) (#3085)

它是一张 1280×577 的截图,显然来自某次截图命令 —— --full-page 这个 CLI 参数被当成了输出文件名(... > --full-page 或参数顺序写错),然后随 #3085 一起提交了。每个新建的 worktree 都会带上它。

为什么没被兜住

AGENTS.md「Housekeeping」写着「截图/trace 一律存 /tmp/,任务尾清理。禁止写入仓库根」,并说 .gitignore 已锚定 /*.png 防兜底。但这个文件没有 .png 扩展名 —— 它叫 --full-page —— 所以 /*.png 匹配不到,兜底在这个形状上是漏的。

以横杠开头的文件名还有个附带的坑:rm --full-page、git rm --full-page 都会被当成参数解析,得写 rm -- ./--full-page。

建议

  1. 删掉它(git rm -- './--full-page'),纯清理,一个独立的 PR。
  2. 顺带收紧 .gitignore 的兜底,让「按内容是图片但没有扩展名」的根文件也进不来 —— 例如显式忽略 /--*(以横杠开头的根文件几乎必然是参数解析事故),或在根级只允许白名单。方案由维护者定,这里只记录漏洞形状。

出处

在 #3118 的 worktree 里发现(git worktree add 后根目录多出这个文件)。按 AGENTS.md「越界发现立 issue、不就地扩大范围」处理,不塞进 #3118 的 PR。未指派。

🤖 Generated with Claude Code

Activity

  1. added
    bugSomething isn't working
    and removed
    bugSomething isn't working
    on Aug 2, 2026
  2. self-assigned this
    on Aug 2, 2026
  3. os-zhuang commented on Aug 2, 2026

    @os-zhuang
    ContributorAuthor

    认领:PM 循环第 1 轮(分片:objectui 整仓)
    会话:session_01PRJtkgUAaVG11FsJQbvZWA
    分支:claude/issue-3193-remove-root-screenshot
    Worktree:objectui-issue-3193

    分诊补充:.gitignore 兜底收紧按建议 2 执行——根级显式忽略 /--*(以横杠开头的根文件几乎必然是参数解析事故),此为技术判断,维护者可在 PR 上否决。


    Generated by Claude Code

  4. os-zhuang commented on Aug 2, 2026

    @os-zhuang
    ContributorAuthor

    验收:ACCEPT → PR #3195(draft,CI 尾部分片仍在跑,全绿后进合并流程)。

    交付内容:① --full-page 从索引删除;② .gitignore 新增根级 /--* 兜底(按形状拦截参数解析事故,嵌套路径不受影响,check-ignore 正/负例取证在 PR);③ AGENTS.md Housekeeping 条目改为如实描述新兜底 + 补「-- 断开参数解析」的坑;④ release-nothing 空 changeset。宽窄拦截(/--* vs /-*)的取舍已写在 PR 正文,维护者可一行否决。


    Generated by Claude Code

  5. added a commit that references this issue on Aug 3, 2026
    26196cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions