Repository navigation
Conversation
The off file listed whole entries, which can hold a key in env, headers, a URL or args. It now lists the names that are off and, for each, which switch backed the entry up. `on` takes the entry from that owner-only backup of the user file; if the backup is gone it says so and changes nothing. An off file from 0.9.7 or earlier is still read and is rewritten with names only by the next switch (the old file goes into the backup). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The manifest's name carries the clock's offset from UTC, so it has a "+" at or east of Greenwich. The check on the name in the off file allowed "-" only, so `connectors on` found no saved entry there. CI (UTC) caught it; the tests passed on a machine west of Greenwich. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Owner
Author
|
CI caught a real bug in the first commit: the backup's name carries the UTC offset, and my check on that name rejected "+", so |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 item 3, the part still open after #66 (backup and undo were fixed there).
What changes
~/.tokenstretch/connectors-off.jsonnow holds{"off": {"<name>": "<switch that backed it up>"}}. No entry, so noenvvalue, header, URL or argument is ever written to it. Before, the whole entry was moved into this file.connectors on NAMEtakes the entry from the owner-only (0600) backup of~/.claude.jsonmade by the switch that turned it off. The reference is a manifest name, checked against a strict pattern, never a path.onsays so, changes nothing, and the name stays listed as off.mcpServers) are still read. The next switch rewrites the file with names only; the old file goes into that switch's backup, andundoputs it back exactly.undoof a switch is unchanged, including the key-level undo when~/.claude.jsonchanged.Tests
tests/test_connectors.py: no secret-shaped word in the off file after any switch; exact restore from backup; refusal with backup gone; old-format file read, migrated, and undone; made-up references never read outside the manifests folder.sandbox-exec deny network*,-m 'not p00_outer'): 545 passed, 6 skipped (loopback-only tests), 1 deselected.Not sure about
~/.tokenstretch/backups/loses it; before, the off file still had it. Docs and theoffmessage now say to keep that folder. This follows from "names only".~/.claude.json(0600), as since connectors: a switch is backed up and recorded, so undo reverses it #66.tests/test_connectors.py:201: made-up canary values in the new test, same kind as the canaries intests/test_bench.py.🤖 Generated with Claude Code