Compress .lapis-plugin bundles and verify installs in a worker #349
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#349
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The current
.lapis-pluginbundle format uses a hand-written stored-ZIP subsetand app-side verification runs on the installer thread. Large official plugins
therefore download as uncompressed bundles and web installs can spend noticeable
time parsing/verifying archive bytes on the main thread.
Goal
Use
fflatefor deterministic.lapis-pluginarchive creation/extraction,allow DEFLATE-compressed plugin file entries, and verify/extract bundles in a
web worker when available while preserving the signed-manifest security model.
Scope
tests, and specs.
/Users/stevejuma/code/lapis-plugin-registry.fflatedependencies where archive code imports it.Non-goals
buffer the downloaded bundle before verification.
Acceptance Criteria
.lapis-pluginbundles whoseroot
release.signed.jsonentry is stored and whose plugin file entries areDEFLATE-compressed with fixed options.
.lapis-pluginbundles and new compressed bundles both verifyand install through the same signed official path.
to main-thread verification; tests can force main-thread verification.
file bytes/size, unsafe path, duplicate path, missing signed file, unsigned
extra file, encrypted entries, and unsupported methods.
bundles, and records compressed bundle
sha256andsize.new
verifying-bundleprogress phase.Implementation Notes
fflate@^0.8.3as a direct dependency for app API runtime, root releasescripts, and registry archive tooling.
fflate.Zip, usingZipPassThroughforrelease.signed.jsonandZipDeflatelevel6forplugin files.
fflate.Unzipbased extractor thataccepts only stored or DEFLATE entries and preserves the current path,
duplicate, missing-file, extra-file, size, hash, and signature checks.
bundleVerification: "auto" | "worker" | "main-thread", defaulting to"auto".Suggested Files or Specs To Inspect
scripts/plugin-release.mjspackages/api/src/lib/plugin-distribution/packages/workspace/src/lib/components/configuration/plugins-registry-panel.sveltespec/src/30-cross-package-contracts/plugin-registry.md/Users/stevejuma/code/lapis-plugin-registry/scripts/Validation Commands
pnpm test:scriptspnpm --filter @lapis-notes/api check:allpnpm --filter @lapis-notes/api testpnpm --filter @lapis-notes/workspace check:allpnpm --filter @lapis-notes/workspace testpnpm check:allpnpm testpnpm test:smokemdbook build specpnpm testpnpm checkRelated Issues
Follow-up Tasks
Implementation Summary
Implemented fflate-based deterministic .lapis-plugin compression, shared bundle verification with web worker support and abort handling, updated installer progress and specs/tests, and updated registry validation/sync tooling to accept stored or DEFLATE bundle entries.