docs(integration): remove Learning download size checks
This commit is contained in:
@@ -4,6 +4,13 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
|
||||
|
||||
## Integrated Through
|
||||
|
||||
- Learning archive size-validation source commit `8509084` from feature task
|
||||
`20260820-remove-download-size-check-4f8a2c1d` is integrated by task
|
||||
`20260820-integrate-download-size-6e3a91c2` through merge `0c1a360`.
|
||||
Electron Main no longer rejects a project ZIP because `Content-Length`,
|
||||
`archiveBytes`, actual streamed bytes, or the former 512 MiB ceiling differ;
|
||||
same-origin redirects, SHA-256, ZIP signature, temporary-file cleanup, and
|
||||
atomic save remain enforced.
|
||||
- Direct Learning README-image source commit `9956739` from feature task
|
||||
`20260820-direct-readme-client-a4d8e2c7` is integrated by task
|
||||
`20260820-integrate-direct-readme-client-b7e41c9d`. README Markdown image nodes now
|
||||
@@ -88,7 +95,7 @@ Canvas 侧栏提供“获取灵感”进入 Prompt Museum。列表、筛选、
|
||||
|
||||
Makelore 在会话恢复、登录和刷新后由 Electron Main 请求 Works `/api/auth/me`,Renderer 只获得 Code、Canvas、Learning、Robot 四个布尔权限。缺失 `module_access` 或任一字段时默认开启;服务端 `design` 显式映射客户端 `painting`。被关闭的模块卡片置灰且不可点击,根路由、深层路由和别名路由均在 `MainLayout` 或模块初始化前阻断。Code provider 等待认证权限加载完成;权限查询返回终止性 `401` 时同时清理 Main 和 Renderer 会话。`/settings` 是全局设置,不受 Code 入口策略阻断。该机制只是客户端入口策略,不代替服务端 API 授权。
|
||||
|
||||
AI 学习现在是已启用的运营精选项目目录,并继续受登录和 `module_access.learning` 控制。Renderer 通过 Main-owned Host API 获取分页项目卡片和 README 详情;Markdown 支持 GFM、禁用原始 HTML。服务端发布时只校验图片 URL 为无凭据、默认端口、无 fragment 且当前 DNS 结果全部为公网地址的 HTTPS URL,保留地址而不下载、识别格式、转码或镜像;客户端仅为 README 图片节点启用直连,因此 SVG 和 Electron 支持的其他格式可直接显示,单图失败不阻断详情。封面和历史发布媒体继续走受控路径。详情页的下载按钮打开系统保存对话框;Main 将最大 512 MiB 的 ZIP 流式写入临时文件,只允许最多五跳同 Works origin 重定向,校验声明字节数、SHA-256 和 ZIP 签名后原子保存,Renderer 只接收 `saved` 或 `cancelled`。课程生成、进度、本地课程库、OpenMAIC player、Agent、ASR、课堂 runtime、Learning IPC 和 player artifact 打包已删除且没有兼容读取路径;历史课程数据保留但不再读取。服务端和客户端源码契约已完成,不代表生产部署或真实账号安装包联调已经完成。
|
||||
AI 学习现在是已启用的运营精选项目目录,并继续受登录和 `module_access.learning` 控制。Renderer 通过 Main-owned Host API 获取分页项目卡片和 README 详情;Markdown 支持 GFM、禁用原始 HTML。服务端发布时只校验图片 URL 为无凭据、默认端口、无 fragment 且当前 DNS 结果全部为公网地址的 HTTPS URL,保留地址而不下载、识别格式、转码或镜像;客户端仅为 README 图片节点启用直连,因此 SVG 和 Electron 支持的其他格式可直接显示,单图失败不阻断详情。封面和历史发布媒体继续走受控路径。详情页的下载按钮打开系统保存对话框;Main 将 ZIP 流式写入临时文件,只允许最多五跳同 Works origin 重定向,不校验 `Content-Length`、`archiveBytes`、实际流字节数或客户端大小上限,校验 SHA-256 和 ZIP 签名后原子保存,Renderer 只接收 `saved` 或 `cancelled`。课程生成、进度、本地课程库、OpenMAIC player、Agent、ASR、课堂 runtime、Learning IPC 和 player artifact 打包已删除且没有兼容读取路径;历史课程数据保留但不再读取。服务端和客户端源码契约已完成,不代表生产部署或真实账号安装包联调已经完成。
|
||||
|
||||
AI 编程首次发送在新建 OpenCode session 已知为空时不再等待冗余历史读取,prompt 可直接进入 Host API;普通历史会话仍刷新消息。每个 Session 独立持有 run、loading、error 与内部队列;一个 Session 的回复或终止不会锁住、改写或重放另一个 Session。Host 接受或用户消息落库不算启动确认,只有明确 busy/retry、assistant、question、permission 或 typed terminal event 才确认/终结启动;独立的 10 秒 watchdog 到期时仅以 `SESSION_START_UNCONFIRMED` 终止该 Session。Main 以 runtime generation provenance、Agent 内容 fingerprint 和 live registry id 共同验证项目 Agent,provider/runtime 或 Agent 未应用时在执行前返回 typed `409` 且 `promptSent:false`。普通 message、command、summarize 和后台 provider sync 不自动重启、reload 或 dispose 共享 runtime;只有显式用户 apply/lifecycle 操作可以推进运行时刷新。Main AI proxy 只把明确的上游分组饱和投影为当前 OpenCode 的终止状态,配额耗尽保持独立终止态,通用限速继续保留 `429`。上下文压缩以每个 Session 的持久时间线事件呈现:自动与手动压缩使用不同文案,运行态原位弱化显示,完成后静态保留并可从历史恢复;`session.compacted` 只完成对应事件,只有真实 idle 才结束 run 和释放排队消息。
|
||||
|
||||
@@ -146,7 +153,7 @@ Robot 绑定设备默认先显示“引导配网 / 已有激活码”路径选
|
||||
|
||||
- 四模块权限只控制 Makelore 客户端入口和初始化,不是 API 授权边界。不得因卡片置灰或路由阻断而放宽 Works/模块服务端的身份与权限校验;旧服务端缺少对象/字段时默认开启是显式兼容策略。
|
||||
- Prompt Museum 相对媒体必须保持固定的服务端路径并由 Main 处理;如果服务端增加媒体变体,需同步维护 entry/path 语法、Works Bearer 所有权、单次刷新、10 MiB 限制、可信 raster MIME 白名单与 Renderer data URL 校验。HTTPS 直连媒体必须继续无凭据,图片失败必须局限在卡片/详情视图。
|
||||
- Learning 项目目录依赖真实 Works 运营发布和固定 API 契约;README 图片只允许服务端校验后的无凭据 HTTPS URL,并由 Markdown 图片节点直接加载,不得扩展为任意网络或归档代理。第三方 origin 的可用性、格式支持和请求隐私是已接受边界。Main 必须保持 Bearer 所有权、封面/历史媒体受控读取、一次 401 refresh、同源最多五跳、512 MiB ZIP、声明大小/SHA-256/ZIP 签名和原子保存;不得把上游错误、Token、对象存储 URL 或本地路径投影到 Renderer。历史课程数据不再读取但也不得被隐式删除。
|
||||
- Learning 项目目录依赖真实 Works 运营发布和固定 API 契约;README 图片只允许服务端校验后的无凭据 HTTPS URL,并由 Markdown 图片节点直接加载,不得扩展为任意网络或归档代理。第三方 origin 的可用性、格式支持和请求隐私是已接受边界。Main 必须保持 Bearer 所有权、封面/历史媒体受控读取、一次 401 refresh、同源最多五跳、SHA-256/ZIP 签名和原子保存;客户端下载明确不执行大小门禁,不得把上游错误、Token、对象存储 URL 或本地路径投影到 Renderer。历史课程数据不再读取但也不得被隐式删除。
|
||||
- Works Project 首次封面已由服务端源 `407c883`(本地 merge `0cedfc4`)提供单请求原子绑定与失败补偿,客户端源 `145a6ce` 因此要求首次发布上传 PNG/JPEG/WebP 封面;部署、安装包和真实账号/对象存储 smoke 仍未完成。服务端仍没有已有 metadata 的 revision/ETag 与 draft-only 条件写,因此已有 draft/published 继续只允许 version-only,客户端不得以无条件 PATCH 替代。
|
||||
- Guided Hotspot Binding 默认开启并提供未经认证的热点扫描/显式连接,但当前 Hotspot/portal 仍是开放 SoftAP + 明文 HTTP,且精确出货镜像、激活码发行契约、签名 macOS、Windows 真机与完整整链尚未验证。界面必须保留环境警告,异常发布可用精确环境值 `0` 回滚;不得把 SSID 前缀宣称为可信设备发现、自动认领或在线证明。
|
||||
- 一键提交已成功但本机 submission binding 落盘失败时必须保持提交成功、显示固定 `binding_warning` 并继续轮询,避免用户误判上传失败。
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
# Task: Integrate Learning download size removal
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260820-integrate-download-size-6e3a91c2
|
||||
- Mode: Integration
|
||||
- Branch: codex/20260820-integrate-download-size-6e3a91c2-integrate-download-size
|
||||
- Worktree: D:\Datas\OthersProjects\makelore-integrate-download-size-6e3a91c2
|
||||
- Base commit: 2168e291b2bf8ac8690c482f56400554a8d77531
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Merge verified source commit `8509084` into the integration branch.
|
||||
- Promote the accepted Learning download behavior into ADR-005, architecture,
|
||||
domain rules, success criteria, README, server contract, current state,
|
||||
evidence, and the pending production-smoke commitment.
|
||||
- Advance local `main` without overwriting its pre-existing untracked task
|
||||
record.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- Follow the user's explicit decision that project downloads must not perform
|
||||
archive-size validation.
|
||||
- Preserve Main ownership of authentication, fixed archive routes, same-origin
|
||||
redirects, native destination selection, SHA-256, ZIP signature, temporary
|
||||
files, cleanup, and atomic rename.
|
||||
- Keep the Works Square upload/storage size policy distinct from client download
|
||||
behavior: the service may retain an independent operations upload limit, but
|
||||
Makelore does not enforce it while downloading.
|
||||
- Do not modify, add, remove, or adopt the unrelated untracked record already in
|
||||
the canonical `main` worktree.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Merged source commit `8509084` through integration merge `0c1a360`.
|
||||
- Promoted the no-size-validation behavior into ADR-005, the decision index,
|
||||
system overview, module map, data flow, domain rules, glossary, success
|
||||
criteria, current state, evidence index, README, server collaboration
|
||||
contract, and Learning production-smoke commitment.
|
||||
- Kept the optional 512 MiB rule only as an independent Works Square operations
|
||||
upload/storage policy; Makelore does not enforce it during download.
|
||||
- Preserved SHA-256, ZIP signature, same-origin redirects, account binding,
|
||||
temporary-file cleanup, and atomic save.
|
||||
|
||||
## Verification
|
||||
|
||||
- Pinned pnpm 10.33.4 frozen install: passed.
|
||||
- Focused Learning tests: `2` files, `17 passed`.
|
||||
- Full unit suite: first run had one unrelated Robot async-loading test failure;
|
||||
that test passed immediately in isolation, and the complete rerun passed
|
||||
`176` files / `2061` tests.
|
||||
- `pnpm run typecheck`: passed.
|
||||
- `pnpm run lint:check`: passed with zero errors and six pre-existing warnings.
|
||||
- `pnpm run build:vite`: passed for Renderer, Main, Preload, and utility worker;
|
||||
existing dynamic-import and chunk-size advisories only.
|
||||
- Canonical size-rule scan and `git diff --check`: passed.
|
||||
- Independent sub-agent review was not run because the user explicitly required
|
||||
that no sub-agents be created; final integration review stayed in the primary
|
||||
task.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Package and smoke the merged client with a real archive response that omits or
|
||||
misreports `Content-Length`.
|
||||
- Monitor disk-space behavior for very large archives because the client now has
|
||||
no archive-size ceiling by explicit product decision.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- None; accepted source-task candidates were promoted in this Integration Gate.
|
||||
@@ -1,84 +0,0 @@
|
||||
# Task: Remove Learning archive size validation
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260820-remove-download-size-check-4f8a2c1d
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260820-remove-download-size-check-4f8a2c1d-remove-download-size-check
|
||||
- Worktree: D:\Datas\OthersProjects\makelore-remove-download-size-check-4f8a2c1d
|
||||
- Base commit: 2168e291b2bf8ac8690c482f56400554a8d77531
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Remove Learning project ZIP download checks that reject a response because of
|
||||
an archive byte limit, declared archive size, or `Content-Length` mismatch.
|
||||
- Keep the existing authenticated Main-owned download route, controlled
|
||||
same-origin redirects, SHA-256 verification, ZIP signature validation,
|
||||
temporary-file cleanup, and atomic final rename.
|
||||
- Add focused regression coverage proving a valid archive downloads even when
|
||||
its reported sizes are absent, inconsistent, or above the former limit.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- Follow the user's explicit direction to download without any size validation.
|
||||
- Do not expose Works credentials, upstream archive URLs, temporary paths, or
|
||||
final local paths to Renderer.
|
||||
- Do not weaken digest or ZIP-format integrity checks; those are independent of
|
||||
archive size validation.
|
||||
- Limit production changes to the existing Electron Main Learning download
|
||||
service and focused tests.
|
||||
- This is a feature task, so canonical project memory remains unchanged until a
|
||||
later Integration Gate.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Electron Main no longer reads or compares archive `Content-Length`, project
|
||||
`archiveBytes`, actual streamed bytes, or the former 512 MiB ceiling when
|
||||
saving a Learning project.
|
||||
- Learning project DTO projection accepts positive safe-integer archive sizes
|
||||
above the former client limit so those projects can reach the download flow.
|
||||
- SHA-256, ZIP signature, MIME, account-binding, redirect/origin, temporary-file
|
||||
cleanup, and atomic rename checks remain unchanged.
|
||||
- Added regressions for omitted `Content-Length`, inconsistent reported sizes,
|
||||
and metadata above the former limit.
|
||||
|
||||
## Verification
|
||||
|
||||
- Red phase: the two new size-removal regressions failed against the old
|
||||
implementation with `LEARNING_PROJECT_INVALID` and
|
||||
`LEARNING_INVALID_RESPONSE`.
|
||||
- Focused Learning tests: `2` files, `17 passed`.
|
||||
- Full unit suite via pinned pnpm 10.33.4: `176` files, `2061 passed`.
|
||||
- `pnpm run typecheck`: passed.
|
||||
- `pnpm run lint:check`: passed with zero errors and six pre-existing warnings.
|
||||
- `pnpm run build:vite`: passed; existing dynamic-import and chunk-size
|
||||
advisories only.
|
||||
- `git diff --check`: passed.
|
||||
- Independent sub-agent review was not run because the user explicitly required
|
||||
that no sub-agents be created; final review was performed in the primary task.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Integrate the source commit into `main`.
|
||||
- During Integration Gate, reconcile all canonical documentation and remove the
|
||||
obsolete size-failure smoke cases listed in the promotion candidate below.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Target: ADR-005, Learning system overview/domain/current state, `README.md`,
|
||||
`docs/learning-project-catalog-server-contract.md`, success criteria, and the
|
||||
Learning release commitment.
|
||||
- Proposal: remove the client download byte ceiling and all declared/
|
||||
transport size consistency requirements while retaining same-origin
|
||||
redirects, SHA-256, ZIP signature, temporary-file cleanup, and atomic save.
|
||||
- Evidence: explicit user direction and focused download regressions from
|
||||
this task.
|
||||
- Future impact: the desktop client may consume disk space according to the
|
||||
upstream archive size; server-side publication/storage policy may still set
|
||||
independent upload limits, but they are not enforced during client download.
|
||||
- Semantic conflicts: supersedes the 512 MiB and declared-size requirements
|
||||
in accepted ADR-005 and its derivative documentation and smoke checklist.
|
||||
- Human confirmation required: no; the user explicitly requested removal of
|
||||
download size validation.
|
||||
Reference in New Issue
Block a user