Ask the client library not to narrate every login - #14
Merged
Conversation
Each GciTsLogin wrote a line to the process's real stdout --
gcits login: session 0xb4b518000 lgc 0xb4b518008 rpc gem processId 84970
-- with a matching one at logout, from inside the C library. In the
extension host that is only noise in a log, but the GemDB Shell's stdout
IS the user's terminal, so it landed between the banner and the first
prompt; `gemdb -c` output that a script pipes somewhere is the same
hazard.
GciTsLogin's loginFlags argument was passing 0. It now passes
GCI_LOGIN_QUIET (0x10, from the engine's include/gci.ht). The constant is
declared in session.ts rather than gci/gciConstants.ts because that
directory is vendored from Jasper byte-for-byte and carries no login
flags at all.
One call site, and the flag turns out to cover the session's whole
lifecycle: the logout line goes too.
repl.test.ts asserts the shell's pty transcript contains no 'gcits',
which is the one place the noise is visible to a user rather than to a
log. Confirmed it fails without the flag, printing the two lines above.
The whole integration run went from dozens of these lines to zero.
Co-Authored-By: Claude Fable 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 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.
Every
GciTsLoginwrote a line to the process's real stdout, from inside the C library:In the extension host that is only noise in a log. In the GemDB Shell stdout is the user's terminal, so it landed between the banner and the first prompt — and
gemdb -coutput that a script pipes somewhere has the same hazard.The change
GciTsLogin'sloginFlagsargument was passing0; it now passesGCI_LOGIN_QUIET. One call site, session.ts:410.The constant is declared in
session.ts, notgci/gciConstants.ts: that directory is vendored from Jasper byte-for-byte and must not be edited, and it carries no login flags at all. The value comes from the engine's owninclude/gci.ht:The flag turns out to cover the session's whole lifecycle, not just the login — the logout line goes with it.
Verified, not assumed
The header gives
GCI_LOGIN_QUIETno explanatory comment, so I measured rather than trusted the name. Counting the chatter in one integration file: 4 login lines before, 0 after, and 0 logout lines. Across the full suite: dozens before, zero after.repl.test.tsnow asserts the shell's pty transcript contains nogcits— deliberately placed there because the shell is the one context where this is visible to a user rather than to a log. Removing the flag fails it, printing exactly the two lines above:114 unit tests, 46 integration. Lint, format, both typechecks clean.
🤖 Generated with Claude Code