fix(repl): the bring-up build's prompt waits for a line instead of answering itself without end
Built with EMERGENCY_CONSOLE_ENABLED=1 and booted with no identity logged
in, the prompt printed "ok> ok" without end, 1.4 million times in 200
seconds (logs/20261013-210442). sk_console_readline() gave up at once
whenever no identity was present. The production build answers that by
going silent until a login; the bring-up build, which needs no login,
took it as an empty line and asked again. The give-up is now the
production build's only.
Found rehearsing boards/BRINGUP.md; it predates the console change of
c9519173 (the image built from the commit before that did the same).
The riscv64 bring-up build, no thumbdrive, three lines typed
(logs/20261013-235129): one prompt that waits, and 3, 56 and 81.
Acceptance of the production build, one QEMU at a time: amd64
(-235255), aarch64 (-235411), riscv64 (-235620) to the zuse prompt, no
unknown word, hash 0x08873e0f44b7cb2a on all three.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c95191736e
commit
9772ee8b68
@@ -1283,9 +1283,16 @@ int sk_console_readline(char* buf, int size, VM* active_vm, int reanchor_prompt)
|
||||
* before this fix (a bare, unauthenticated prompt stayed on
|
||||
* screen after every logout for the rest of the boot). n == 0
|
||||
* only: never abandon a line the user is actively typing. */
|
||||
#if !EMERGENCY_CONSOLE_ENABLED
|
||||
if (reanchor_prompt && n == 0 && !sk_console_identity_present()) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
/* Not in the bring-up build (EMERGENCY_CONSOLE_ENABLED): its prompt
|
||||
* needs no login, and sk_repl_run() takes this return as an empty
|
||||
* line there -- with no identity attached the prompt answered " ok"
|
||||
* and asked again without end, 1.4 million times in 200 seconds
|
||||
* (found 2026-10-13 rehearsing boards/BRINGUP.md; logs/20261013-210442). */
|
||||
|
||||
if (reanchor_prompt && n == 0 &&
|
||||
console_tx_count() != prompt_tx_mark)
|
||||
|
||||
Reference in New Issue
Block a user