Repository navigation
feat: cut the write read-back wait to 5s and make it configurable - #281
Merged
Merged
Conversation
Add --verify-timeout, $THINGS_CLI_VERIFY_TIMEOUT and the verify_timeout config key, with precedence flag > env > config > default. The env var goes through the config resolver rather than kong's env tag, which kong applies before resolvers and so would lose to the file. Zero, negative and unparsable values are refused with an error naming the source and pointing at --no-verify. Every read-back (complete, cancel, edit, project edit, import status items, tag add) now uses the configured value.
No other setting has its own environment variable, so verify_timeout keeps the same precedence as every other key: flag > config file > default. The test harness now gives a run that leaves --verify-timeout at its default the package fallback, which fastVerify shrinks.
The poll slept a full interval between reads, so a read-back could run up to 100ms past --verify-timeout while its error reported the configured value. Also list --verify-timeout in the README flags table and drop its stale 10-second figure.
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.
Cuts the write read-back wait from 10s to 5s and makes it configurable, because 10s is too long to wait on every write that is dropped or changes nothing.
What changes
--verify-timeout DURATION(Go duration such as5sor2500ms), default5s.verify_timeout = "5s", included in theconfig inittemplate andconfig show.--no-verifyfor skipping the wait:--verify-timeout: must be a positive duration such as "5s" or "2500ms", got "0s" — to skip the read-back entirely, use --no-verifyconfig file <path>: key "verify_timeout" must be a positive duration such as "5s" or "2500ms", got "soon" — to skip the read-back entirely, set no_verify = truecomplete,cancel,edit,project edit, status items inimport, andtag add. Their errors print it (for example "not modified within 1.5s").configuration.md(key table, template, error example),commands.md, the README flag and key tables, andSKILL.md.Testing
make testandmake lintpass.config show, and a read-back per write path showing the configured value reaches the wait.open/osascripton PATH so nothing reached Things. An edit that could not land failed after 5.1s by default, 3.1s withverify_timeout = "3s", 1.5s with--verify-timeout 1500ms, and 1.0s with the flag at 1s overriding a 3s config.