Repository navigation
字节码文件后缀 .bin 改为 .jsb(tinyui 0.9.0) - #7
Conversation
与 tiny-ui/tinyui#29 同步:manifest 派生的页面文件路径由 `<files[module]>.bin` 改为 `<files[module]>.qjsb`,上传校验与发布前核对随之。已存储的旧版本按路径原样投递不受影响; 部署后只有 tinyui-cli 0.9 起能发新包,旧 CLI 的 .bin 上传会被判为缺文件。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's Guide本 PR 将 manifest 派生的页面字节码文件后缀从 Sequence diagram for qjsb package publishing and legacy deliverysequenceDiagram
participant CLI as tinyui-cli
participant Server as PackageServer
participant Storage as ObjectStorage
CLI->>Server: upload .qjsb page files
Server->>Server: parseManifest
Server->>Server: payload
Server->>Server: isObjectPath
Server->>Storage: store new version with .qjsb paths
Note over Storage,Server: Existing versions keep their stored .bin paths
CLI->>Server: request published version
Server->>Storage: deliver stored paths unchanged
Storage-->>CLI: page bytecode
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
CodeSeer 审查
结论:批准
摘要
本次改动将由 manifest 的 files 派生出的页面产物后缀统一从 .bin 切换为 .qjsb,并同步更新了校验、测试辅助代码和中英文文档。现有代码中发布前完整性核对通过 payload() 使用新后缀,而内容读取仍按请求路径进行,不会改变已存储对象的路径。给出的改动范围内未发现会导致错误行为的问题。
整个 PR 至 375d00d · gpt-5.6-terra
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
tinyui-updates | cfd8f9c | Oct 07 2026, 04:15 AM |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="test/publish.test.ts" line_range="96" />
<code_context>
expect(again.status).toBe(200);
expect(await again.json()).toMatchObject({ existing: true });
- const other = await request(`/${app}/${pkg}/1/${p.version}/pages/home.bin`, { method: "PUT", token, body: "something else" });
+ const other = await request(`/${app}/${pkg}/1/${p.version}/pages/home.qjsb`, { method: "PUT", token, body: "something else" });
expect(other.status).toBe(409);
- const tooBig = await request(`/${app}/${pkg}/1/${p.version}/pages/big.bin`, { method: "PUT", token, body: new Uint8Array(1048577) as BodyInit });
</code_context>
<issue_to_address>
**Unauthenticated uploads fail assertions**
When the test reaches the two PUT requests, `keeps a version immutable` sends the PUTs at lines 96 and 98 without a token, so the upload route returns 401 before checking immutable content or size; the test expects 409 and 413, and fails.
Pass `token` in both request options so the route reaches the immutability and size checks.
Also at `test/publish.test.ts:99`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and changing the artifact suffix changes the package protocol: clients or tooling still requesting .bin will fail to fetch newly published pages, while .qjsb objects and caches can outlive a revert. The impact is bounded and can be repaired by republishing compatible artifacts or clearing affected versions, but reverting alone does not undo already uploaded or cached files.
Blocking findings: test/publish.test.ts:96
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
与 tiny-ui/tinyui#29 同步:manifest 派生的页面文件路径由
<files[module]>.bin改为<files[module]>.jsb,上传校验、发布前核对、测试与 README 随之。.bin会被判为缺文件pnpm typecheck与pnpm test(22 个用例)全绿🤖 Generated with Claude Code
Summary by Sourcery
Adopt the
.jsbsuffix for manifest-derived page bytecode assets while preserving delivery of previously stored versions.Enhancements:
.binsuffix to.jsbthroughout validation, upload, publication checks, and delivery.Documentation:
.jsbsuffix.Tests:
.jsbpage assets.