docs(bridge): warn on run_lua that console commands are queued - #6
Merged
Conversation
run_console_command said commands are queued with ~0.25s of latency. run_lua said nothing, and run_lua is where the trap actually closes: a snippet that calls RunConsoleCommand and then reads the cvar back in the same RunString reads the old value. The command runs after the execution ends, so the read is not a failure, it is early -- and nothing in the output tells the two apart. The obvious conclusion, "the write was refused", is wrong. That cost a second session a wrong diagnosis today, reported to its own user before being retracted. Its report located the gap precisely: the existing note covered run_console_command followed by read_convars, and not run_lua doing both at once. The note had been read; it simply did not describe that case. run_console_command now also says the read-back must be a separate call rather than only quantifying the latency. No test: nothing here changes behaviour, and asserting that a description contains a sentence restates the diff rather than proving anything. This one rests on review.
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.
run_console_commandwarned that commands are queued with ~0.25 s of latency.run_luasaid nothing — andrun_luais where the trap actually closes.A snippet that calls
RunConsoleCommandand then reads the cvar back in the sameRunStringreads the old value. The command runs after the execution ends, so the read is not a failure; it is simply early. Nothing in the output distinguishes the two, and the obvious conclusion — "the write was refused" — is wrong.That cost a second session a wrong diagnosis today, reported to its own user before being retracted. Their words locate the gap exactly: the existing note covers
run_console_command→read_convars, and does not coverrun_luadoing both at once. They had read the note; it simply did not describe their case.run_console_commandalso now says the read-back must be a separate call, rather than only quantifying the latency.No test
Nothing here changes behaviour, and asserting that a description contains a given sentence is not a test — it restates the diff. Said plainly rather than dressed up: this one rests on review.
132 tests, unchanged.