Repository navigation
Packs: repair older packs, plugin scope refs, OAuth tokens stay local - #351
Merged
Merged
Conversation
- A pack exported by an older version whose config does not read is repaired in memory by the one-click repair rules (unknown fields removed, unknown values back to the default) before preview and import; ImportPreview and RestorePreview list the repairs. A pack from a newer core is still too new. - A plugin's scope (match.upstreams) refers to the upstreams it names, so an export brings them, skipping one refuses the plugin on import, and a rename follows. Wildcard patterns are not references, and an upstream that is nowhere is not an error for a plugin. - OAuth upstreams: the refresh token rotates (the gateway writes back the new one), so the tokens stay on the device like a ChatGPT sign-in. They are not exported, an overwrite keeps the local ones when the token endpoint is the same, a new one arrives disabled and flagged missing_key, and a restore brings back the tokens of an upstream that is no longer here from the version restored. - control.config_not_repairable becomes control.config_unrepairable and points at restoring a backup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-ups to #348 and #349.
ImportPreview.repairsandRestorePreview.repairs(ConfigFix[]) list what was repaired; a backup kept before an upgrade gets the same treatment. A pack from a newer core is stillpack.too_new. The CLI prints the repairs too.match.upstreamsnames are references of the plugin. Exporting a plugin brings them, skipping one of them on import refuses the plugin (import.skipped_reference), renaming one rewrites the scope in the plugin file. Wildcard patterns (relay-*) are not references, and a named upstream that is neither here nor in the pack is not an error for a plugin.tw_gateway::oauth), so the same token on two devices invalidates the other.oauth.refresh,accessandexpires_atnow stay on the device, like a ChatGPT sign-in: they are not in a snapshot or an export (omitted_loginsnames the upstream), an overwrite keeps the local tokens when the token endpoint is the same, a new OAuth upstream arrives disabled and flaggedmissing_key, and a restore of an upstream that is no longer here takes its tokens from the restored version. A rotation no longer changes the content id.control.config_not_repairableis replaced bycontrol.config_unrepairable, which points at restoring a backup.Local runs:
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings(stable and 1.99),cargo test --workspace(3680 passed), the TypeScript export throughtsc --strict,scripts/smoke.sh(84 passed).🤖 Generated with Claude Code