Skip to content

一键登录卡在 authority_snapshot:science_data 单文件超 512MB 上限(authority_snapshot_file_limit) #86

Description

@ZhangJinian

现象

一键登录(one_click_login)卡死在 authority_snapshot(prepare 阶段):

code=authority_snapshot_file_limit scope=science_data category=other observed_bytes=2818778662 file_limit=536870912(阶段:prepare)

日志(~/.csswitch/logs/operation.log)连续多次:phase=capture_end outcome=error prior_science=restart_required

原因

一键登录前会对整个 science_data 做快照备份,其中单文件上限 512MB(536870912 字节)为硬编码,无环境变量 / 配置可调。

触发文件位于 science_datacategory=other(orgs 下的 artifacts / workspaces),为单细胞分析产物 .h5ad(约 2.6GB),超过 512MB 即被拦截,快照失败导致登录无法继续。

复现条件:science_data~/.csswitch/sandbox/home/.claude-science)内存在任一 >512MB 文件。

建议

  1. 调高或开放 file_limit:改为可配置(config.json / 环境变量),或对 other 类目提高上限(如 4GB),因为 .h5ad / .h5 等单细胞数据产物动辄数 GB 是正常情况。
  2. 错误提示更明确:当前只给 code + 字节数,建议在报错里带上触发文件的具体路径,便于定位和清理。
  3. 若暂时不改代码,用户侧解决办法:把 science_data 内 >512MB 的文件移出沙箱(登录成功后可放回),或删除不再需要的超大文件。

环境

  • macOS(Apple Silicon)
  • CSSwitch 0.8.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions