Show real shell identity in Kandelo's default prompt - #1246
Open
brandonpayton wants to merge 14 commits into
Open
Show real shell identity in Kandelo's default prompt#1246brandonpayton wants to merge 14 commits into
brandonpayton wants to merge 14 commits into
Conversation
The uname nodename change alters kernel Wasm bytes, but revision 1 still allowed fetched localhost kernels under the current cache identity. Advance the kernel package revision, regenerate dependent projection keys, and protect the metadata contract with a focused regression test. Validated the uname unit test, rootfs contract, projection checker, ABI check, and changed-test formatting. Broader Task 5 suites remain outside this focused correction.
Remember how the existing shell prompt was recognized before starting a queued guide command. When that prompt ended with OSC 133 B, require the same boundary for completion so command output ending in `$ ` or `# ` cannot advance the queue early. Keep exact configured prompts and conservative fallbacks for shells that do not demonstrate marker support.
Accumulate synchronous PTY history before choosing the current prompt boundary. This prevents an older fallback or marker prompt from deciding the mode after the user changes prompt behavior. Classifying only after onData returns also ensures the replay-time wait has a real unsubscribe function, so completed guide commands do not leak listeners.
Contributor
Phase B-1 matrix build status —
|
| Package | Arch | Status | Sha |
|---|---|---|---|
| kernel | wasm32 | failed | — |
| rootfs | wasm32 | failed | — |
Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.
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.
Why
Kandelo's default shell prompt is currently a fixed
kandelo$. It doesnot show which account owns the shell or where that shell is working.
That makes sessions harder to understand today and will become
misleading as real login support introduces more than one user.
The kernel and root filesystem also report a generic hostname, while
the browser used to inject its own prompt. Shell identity should come
from the guest's real account, hostname, and working directory instead
of a presentation-layer substitute. Browser Guide commands also need
a reliable completion boundary because ordinary command output may
itself end in
$or#.This change gives users a compact prompt that exposes the state they are
actually operating in:
What changed
/etc/hostnamedefault tokandelo.\u,\h, and\wexpansions, so the user, real hostname, and current directory stay
dynamic.
glyph in green for ordinary users or red for root.
\u@\h \w \$prompt forTERM=dumband leave Dash andnoninteractive shells unaffected.
PS1and preserve exact configuredprompts and conservative custom-shell readiness paths.
proves marker support, Guide commands wait for the trailing
Bboundary instead of accepting prompt-looking command output.
synchronous replay. This also prevents completed readiness listeners
from leaking.
and regenerate the package projection so stale hostname or prompt
artifacts cannot retain a valid identity.
readiness contracts.
Node.js and browser hosts share the readiness implementation. The
Node.js source-image smoke test verifies the image-owned hostname and
profile. Chromium and WebKit exercise the visible prompt and terminal
command path.
This does not change the application binary interface (ABI), so
ABI_VERSIONis unchanged.Validation
Fresh final-tree checks through
scripts/dev-shell.sh:unamehostname unit: 1 passed, 1,248 filtered;130 passed;
git diff --check origin/main...HEAD: clean.Earlier validation on this branch also passed all 1,249 kernel unit
tests, the mandatory Node.js source-image smoke test, and manual
Chromium checks for the initial prompt,
/tmpdirectory update, colors,effective user, hostname, terminal focus, and Guide completion.
Two independent final reviews found no Critical, Important, or Minor
issues.
Known limitations
test failures and 21 collection failures. The recorded failures
concern package provenance, artifact closure, unavailable fixtures,
and existing runtime timeouts outside this prompt path.
timeout in the current artifact/runtime environment.
./run.sh browserlauncher stops before app launch becausethe Homebrew shell package still awaits its immutable bottle
selection. The focused Chromium and WebKit runs above use coherent
local artifacts.
measured.
USER=playerwhile theeffective account is
user. The prompt intentionally uses Bash's\u, which follows the effective account. Reconciling thatenvironment variable belongs to the upcoming login work.