Fix remaining PTY and bundle watch races
Keep inherited child prompt markers bounded by the normal silence fallback. Stage web-plugin rescans atomically and retain missing watch state until a successful rebuild.
This commit is contained in:
@@ -328,13 +328,11 @@ export class LocalPtySession implements PtyBackendSession {
|
||||
return
|
||||
}
|
||||
}
|
||||
// A complete owned marker is stronger evidence than silence, but can race
|
||||
// the kernel's foreground-PGID handoff. Once it is pending, wait for bash
|
||||
// ownership (or the absolute timeout) instead of misclassifying that race
|
||||
// as inferred idle.
|
||||
if (!(this.promptSeen && this.promptTextSeen)
|
||||
&& startupHasOutput
|
||||
&& Date.now() - this.lastOutputAt >= this.config.idleSilenceMs) {
|
||||
// A prompt candidate can race bash's foreground handoff, but an interactive
|
||||
// child also inherits PROMPT_COMMAND. Silence therefore remains the bound
|
||||
// on waiting for shell ownership instead of letting a child marker suppress
|
||||
// readiness until the absolute timeout.
|
||||
if (startupHasOutput && Date.now() - this.lastOutputAt >= this.config.idleSilenceMs) {
|
||||
this.settleActive('inferred_idle')
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user