starkernel: color the console prompt (FABRIC.md item 4.4h)
console.c's emit_prefix() now wraps [VMName] (brackets included) in FABRIC.md 4.4's locked orange (0xFFA500), and repl.c's two "ok> " call sites send FABRIC.md 4.4's locked cyan (0x55FFFF), both as real SGR escape sequences through the existing font_8x16.c/vt100.c pipeline -- 4.4b already established this needs no dependency on TTF-TEXT/4.4j. Sent through both raw_putc() (serial) and vt100_putc() (framebuffer), matching the existing dual-path pattern, so an ANSI-aware serial terminal renders the same colors as the framebuffer. Three-arch verified: amd64/aarch64/riscv64 all reach ok>, POST Failed: 0, identical dict-hashes. Color applies correctly to any VM name (confirmed via the [Hermes]-prefixed PARITY:BIRTH line in all three logs, not just [Hera]). amd64 screendump confirms the rendered colors directly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
f33353430f
commit
ae7c9429b4
@@ -5225,13 +5225,33 @@ document and committing that amendment as its own item.*
|
||||
> [evidence/amd64/qemu-screenshot-20260811-171612-4.4g-landed.png](evidence/amd64/qemu-screenshot-20260811-171612-4.4g-landed.png)
|
||||
> — framebuffer now shows the full HADES/ECW/Stadium/self-test transcript, not just the tail.
|
||||
|
||||
- [ ] **4.4h — Apply color to the prompt.** Depends on 4.4d (coloring a bracket that isn't
|
||||
- [x] **4.4h — Apply color to the prompt.** Depends on 4.4d (coloring a bracket that isn't
|
||||
drawn on screen accomplishes nothing). Per 4.4b's finding: either an independent
|
||||
`TTF-TEXT` call with the color from 4.4, or gated on 4.4j completing first.
|
||||
*Done when:* three-arch screendump shows `[VM name]` and `ok>` in the colors locked at 4.4;
|
||||
three-arch QEMU boot + logs per CLAUDE.md.
|
||||
*Refs:* §27.8.
|
||||
|
||||
> **Done 2026-08-11.** Per 4.4b's finding, no dependency on 4.4j/TTF-TEXT was needed — sent
|
||||
> real SGR escape sequences through the existing `font_8x16.c`/`vt100.c` pipeline, which
|
||||
> already parses 24-bit color (`apply_sgr()`, `vt100.c:309-375`).
|
||||
> `console.c`'s `emit_prefix()` now wraps `[VMName]` (brackets included) in
|
||||
> `ESC[38;2;255;165;0m` ... `ESC[39m` (4.4's locked orange). `repl.c`'s two `"ok> "` call
|
||||
> sites (`sk_repl_step()`, `sk_repl_run()`) now send `ESC[38;2;85;255;255mok> ESC[39m`
|
||||
> (4.4's locked cyan) via a shared `SK_PROMPT_TEXT` macro. Both send the same escape bytes to
|
||||
> serial (`raw_putc()`) and framebuffer (`vt100_putc()`), matching the existing dual-path
|
||||
> pattern rather than adding a new mechanism — an ANSI-aware serial terminal renders the same
|
||||
> colors as the framebuffer, per 4.4c's "identical on both" goal.
|
||||
>
|
||||
> Three-arch verified: amd64 (`logs/20260811-172845/amd64/`), aarch64
|
||||
> (`logs/20260811-173135/aarch64/`), riscv64 (`logs/20260811-173331/riscv64/`) — all reach
|
||||
> `ok>`, POST `Failed: 0`, identical dict-hashes. Color applies correctly to any VM name, not
|
||||
> just Hera — confirmed via the `[Hermes]`-prefixed `PARITY:BIRTH` line in all three logs.
|
||||
> Screendump verification remains amd64-only, same accepted gap as 4.4c (no aarch64/riscv64
|
||||
> screendump tooling exists):
|
||||
> [evidence/amd64/qemu-screenshot-20260811-173006-4.4h-colored-prompt.png](evidence/amd64/qemu-screenshot-20260811-173006-4.4h-colored-prompt.png)
|
||||
> — `[Hera]` renders orange, `ok>` renders cyan, confirmed by direct visual inspection.
|
||||
|
||||
- [ ] **4.4i — Verify the VT100 CSI/SGR parser's glyph-draw call site is cleanly separable.**
|
||||
Verification only, no code change. `vt100.c`'s CSI/SGR state machine (escape parsing, cursor
|
||||
tracking, 16/256-color SGR) calls `draw_cursor_glyph()` from a single site in `put_char()` —
|
||||
|
||||
Reference in New Issue
Block a user