Commit Graph

6 Commits

Author SHA1 Message Date
Dery Ferdika
ca35748383 test(templates): verify entry.files against the source manifest (#564)
AGENTS.md and the template repository guide both require template.json entry.files paths, byte lengths and SHA-256 values to match the staged source. The check validated the shape of that record and verified source/manifest.json against the files on disk, but it never compared the two lists against each other. A stale entry.files block therefore passed CI while consumers read it as the published identity of a template: the onboarding preview builder and the template recommendation cards both take those paths and hashes as fact.

The per-template loop now walks entry.files and matches each path against the source manifest, failing on a path that is missing from the manifest or on a changed byte length or hash. Paths also pass through the existing safe-path check, so a traversal attempt in that block fails the check rather than the consumer.

Review follow-up: the stale-identity message pointed at templates:manifest, which only rewrites source/manifest.json and cannot repair entry.files. It now names template.json entry.files, which is the file that has to change.

Validation: npm run templates:check -- --final-tree passes. All nine editable templates carry entry.files, 116 entries in total, and every one already matches, so the check is green before it protects anything. tests/template-library.test.ts passes 18/18 and npm run check passes.
2026-11-18 17:02:15 +08:00
open-design-crew[bot]
843f14453c fix(storage): make aggregate checkout size advisory (#503)
* fix(storage): make aggregate checkout size advisory

* docs(storage): align contributor guides with advisory totals

---------

Co-authored-by: lefarcen <935902669@qq.com>
2026-11-17 12:27:23 +08:00
lefarcen
378f5d5ed1 feat: deliver npm template catalogs from OpenMotion CDN (#458)
* feat: read npm templates from latest GitHub main

* fix: satisfy backend type checks for GitHub catalogs

* fix: keep built-in template detail local for GitHub catalogs

Resolve built-in template IDs before refreshing the remote GitHub catalog so bundled
examples answer without any network request, matching the previous get() path.

Align the public openmotion_list_templates and openmotion_get_template descriptions
and the phase-one tool documentation with the NPM GitHub main source, and make the
new catalog test use oss tmpdir() like the rest of the suite.

Generated-By: looper 0.16.2 (runner=fixer, agent=pi)

* fix: address template catalog review feedback

* feat: serve npm templates through hosted main snapshots

* fix: verify installed template flows and hydrate optional project assets

* docs: authorize automatic main template synchronization

* test: align publication policy checks with automatic template sync

* fix: keep the released template catalog at a versionless URL

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>
2026-11-16 21:55:23 +08:00
open-design-crew[bot]
c7212ad343 [OPEND-5244] chore: slim clones and prepare final PR media before squash merge (#344)
Move optional repository media to LFS with downloads skipped by default.

Add trusted manual PR media preparation with immutable R2 uploads, public hash verification and cleanup commits on the original PR before Squash merge.
2026-11-13 09:17:05 +08:00
lefarcen
420b7c78af fix: support LFS contributions and published brand icons 2026-11-12 23:48:55 +08:00
lefarcen
c9f0aef965 feat(templates): load repository templates in local Studio and MCP 2026-11-12 23:06:32 +08:00