Skip to content

Land the CLI samples, PATH and encoding work on main - #17

Merged
jgfoster merged 3 commits into
mainfrom
fix/restage-cli-when-stale
Aug 27, 2026
Merged

Land the CLI samples, PATH and encoding work on main#17
jgfoster merged 3 commits into
mainfrom
fix/restage-cli-when-stale

Conversation

@jgfoster

Copy link
Copy Markdown
Member

#16 merged into this branch rather than into main, because #15 was merged with its branch kept and GitHub only auto-retargets a stacked PR when its base is deleted. So the work sat two commits ahead of main, on a branch whose own PR was already closed. This is that work, aimed at main.

The diff against main is exactly #16's, since #15's content is already there:

  • The sample code says import gemdb — a new notebook's first cell, the walkthrough and the README.
  • gemdb is on the PATH of terminals opened in VS Code, via context.environmentVariableCollection — reverted by VS Code when the extension is disabled, and never touching a shell profile.
  • topaz no longer comments on an exit it was always going to ignoretopaz -h says -S exits when the script completes and ignores exit, silently on a pipe and out loud on a tty.
  • Non-ASCII survives gemdb file.py in both directions — the #GrailConsole box now names what the sink takes.

Plus one commit that is not from #16: the Unreleased sections reordered to Keep a Changelog's own order, Added before Changed.

The Grail dependency is discharged

GemTalk/Grail#701 merged as 5e8fc42. Rebuilt here from Grail's default branch — no grail-ref override — and the suite is green:

$ npm run bundle:grail        # Bundled Grail 5e8fc42
$ npm run bundle:extent
$ npm run test:integration
 Test Files  6 passed (6)
      Tests  48 passed (48)

Those are the two cases that were red on #16 (c^@a^@f^@?^@… and a six-character wörld), now passing against a payload built the way CI builds it. Lint, format, both typechecks and 122 unit tests green.

Delete this branch on merge — it has now been the base of one merged PR, which is how the work got stranded in the first place.

James Foster and others added 3 commits August 27, 2026 14:47
…rong

Four changes a user ran into in one sitting.

**The sample code says `import gemdb`.** A new notebook's first cell, the
walkthrough and the README all opened with `import gemstone` -- Grail's own
lower-level surface, inherited from Jasper. `gemdb` is the module a developer
should meet first: `gemdb.root` for the data that outlives the session,
`gemdb.commit()` for the moment it becomes everyone's.

**`gemdb` is on the PATH of terminals opened in VS Code.** The command is
generated into `~/GemDB/bin`, which is on nobody's PATH, so `which gemdb`
answered "not found" and the README's answer was a line the user had to add to
their own shell profile. VS Code contributes this per extension and reverts it
when the extension is disabled, which keeps it on the automated side of the
line; editing a shell profile would not be, so that stays an ask. Cleared
before every prepend, because the collection is persisted across window
reloads and re-applied before activation.

**topaz no longer comments on an exit it was always going to ignore.**
`gemdb file.py` from a real terminal ended with four lines about ignoring an
EXIT and a `Logging out session 1.`. `topaz -h` says of `-S` that topaz "exits
when the script completes" and that "exit and quit commands are ignored" --
silently on a pipe, which is every CI run and both suites, and out loud on a
tty. Exit codes never travelled through that line and still do not:
sys.exit(3) -> 3, an uncaught exception -> 1, a missing file -> 2, measured
again over a pty without it.

**Non-ASCII survives `gemdb file.py` in both directions.** The console this
mode installs is a GsFile, which takes BYTES: print() wrote a Unicode string's
code units, so a bullet in an ASCII-art rabbit came out as binary. The
#GrailConsole box gains a second slot naming what the sink takes, because the
sink cannot be asked -- the shell's is a ClientForwarder, and any send to one
forwards to the client as error 2336, uncatchable in the gem. Needs the
matching Grail change (GemTalk/Grail#701), which also decodes the mirror-image
fault on the read side: a line typed at the terminal arrived one character per
byte.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Start notebooks with import gemdb, and fix three things the CLI got wrong
Added before Changed, per the format the file's own header links to.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jgfoster
jgfoster enabled auto-merge August 27, 2026 22:34
@jgfoster
jgfoster added this pull request to the merge queue Aug 27, 2026
Merged via the queue into main with commit d5cf160 Aug 27, 2026
5 checks passed
@jgfoster
jgfoster deleted the fix/restage-cli-when-stale branch August 27, 2026 22:42
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