Skip to content

Ask the client library not to narrate every login - #14

Merged
jgfoster merged 1 commit into
mainfrom
feat/quiet-login
Aug 27, 2026
Merged

Ask the client library not to narrate every login#14
jgfoster merged 1 commit into
mainfrom
feat/quiet-login

Conversation

@jgfoster

Copy link
Copy Markdown
Member

Every GciTsLogin wrote a line to the process's real stdout, from inside the C library:

gcits login: session 0xb4b518000 lgc 0xb4b518008 rpc gem processId 84970
gcits logout: nbExecInProg 0x0 session 0xb4b518000 rpc gem processId 84970

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 -c output that a script pipes somewhere has the same hazard.

The change

GciTsLogin's loginFlags argument was passing 0; it now passes GCI_LOGIN_QUIET. One call site, session.ts:410.

The constant is declared in session.ts, not gci/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 own include/gci.ht:

GCI_LOGIN_QUIET          = 0x10,

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_QUIET no 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.ts now asserts the shell's pty transcript contains no gcits — 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:

AssertionError: expected 'spawn /var/folders/…' not to contain 'gcits'
+  gcits login: session 0xb4b518000 lgc 0xb4b518008 rpc gem processId 84970
+  gcits logout: nbExecInProg 0x0 session 0xb4b518000 rpc gem processId 84970

114 unit tests, 46 integration. Lint, format, both typechecks clean.

🤖 Generated with Claude Code

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>
@jgfoster
jgfoster added this pull request to the merge queue Aug 27, 2026
Merged via the queue into main with commit 805be7c Aug 27, 2026
5 checks passed
@jgfoster
jgfoster deleted the feat/quiet-login branch August 27, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant