Repository navigation
Packs: secrets stay with their destination; restore keeps what this machine needs - #359
Merged
Merged
Conversation
…achine needs
Import
- A pack without secrets reuses the keys here only when overwriting an item
whose destination is unchanged: same scheme, host and port, AWS region,
OAuth token endpoint, and proxy type and address. Otherwise the secret
stays blank, the row is flagged missing_key and the upstream comes in
disabled. An item imported under another name never takes the keys here.
- A proxy whose password is blank is flagged missing_key too.
Restore
- A route that names a group which is gone resolves to that group: kept
when it is being removed, brought back when only the route is chosen.
- Proxies used by this machine's own sections (the sync location's proxy)
are kept; a whole restore copies the proxy over when the version lacks it.
- Restoring a version from the sync location leaves the upstreams this
machine does not sync, and what follows them, out of the comparison.
- POST /backups/preview takes the chosen items and plans exactly what
POST /backups/restore writes; the restore now answers RestoreWritten
{ version, rows } with the rows it actually applied.
- Text that does not read as YAML is no longer kept as a version, and a
whole restore takes this machine's sections from the newest readable one.
Other
- Pinned keys no longer expire; a source replaces its own set, under one
lock, with limits on sources, names and lengths (backup.pinned.*). The
older file shapes read as the blank source.
- Plugin files put back at startup are reloaded by the gateway, and only
when neither the script nor its approved copy matches the approved hash.
- The 64 KiB preference limit applies to the preferences being written,
in every writer; a large one already stored does not block a restore.
- A passphrase-encrypted pack that asks for more work than allowed reports
pack.too_much_work instead of pack.corrupt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fylorn
force-pushed
the
feat/pack-fixes-2
branch
from
October 19, 2026 11:05
bcf0b57 to
7588d11
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review fixes for packs, import and restore on the sync-and-backup branch.
Import
missing_key, and the upstream comes in disabled. An item imported under another name never takes the keys here. Changing only the path keeps the keys.missing_key.Restore
referenced) when the group is being removed, brought back when only the route is chosen.sync-…) leavessync.excludeupstreams, and the items that follow them, out of the comparison; they keep their current place in the order.POST /backups/previewacceptsitemsand runs the same plan asPOST /backups/restore. The restore now answersRestoreWritten { version, rows }, whererowsare the rows actually applied (dependencies included,keptset for what stayed).Other
backup.pinned.source_too_long,backup.pinned.too_manyorbackup.pinned.name_too_long. The older file shapes (a plain array, or{"names": [...]}) read as the blank source.write_prefsrefuses oversized ones for every writer; a large one already stored no longer blocks imports and restores.pack.too_much_work(required,max) instead ofpack.corrupt.Tests
Regression tests cover each item: destination changes (host, port, scheme, AWS region, OAuth endpoint, proxy address) and rename, kept and chosen group routes, the sync proxy in partial and whole restores, excluded upstreams in a synced version, preview and write parity, readable versions, plugin healing and reload, pinned limits, concurrent reports and old files, stored oversized preferences, and the work-factor error.
🤖 Generated with Claude Code