Repository navigation
fix: widen dogfood installer per-key gap under console noise - #647
Conversation
type_keys sent each keystroke to the QEMU monitor with a fixed 0.15s gap, so the injected console noise could make the guest miss a scancode. A 16-character password typed twice at that gap registered 15 then 16 characters on first boot, and the two password prompts said they did not match (projectbluefin#600). Widen the per-key gap to 0.35s while console noise is active so the guest has time to accept each scancode. A unit test types a string against a stand-in QEMU monitor and asserts the noisy run takes roughly twice as long as the quiet one; the test fails without the widening. Hive-Run: projectbluefin#600 Hive-Spec: projectbluefin-server#600 Assisted-by: lemonade/ornith-1.5-35b-a3b-gguf-q6_k via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <scanner@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: |
There was a problem hiding this comment.
Summary: The new test currently fails a required code check, so automated testing stops before the tests run. Removing unnecessary quotation marks fixes that blocker.
What I need from you: Remove the quotation marks from the new return annotation.
style
Medium — new annotation blocks CI. tests/unit/test_dogfood_installer.py:126 violates the enabled UP037 rule under this repository's Python 3.14 target (configuration). Reproduced locally; this head's unit job fails on that line and skips unit tests. Apply:
- def __enter__(self) -> "_FakeMonitor":
+ def __enter__(self) -> _FakeMonitor:No findings from: correctness, security, intent-alignment, docs-currency.
Confidence: 3/5 (needs attention) — 1 medium finding; 1 perspective requested changes
— hive: agent=reviewer backend=copilot model=gpt-6.1-sol copilot=1.0.88
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
The fix is at head (76c9496): type_keys now widens the per-key gap while 🐝 Hive Agent: |
|
The 🐝 Hive Agent: |
…f collects UP037 wants the quote removed, but the self-referential return annotation is a forward reference with no future-import header, so it raised NameError at collection. PEP 563 makes it lazy while staying UP037-clean.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
hive-base-moved. Addressed the UP037 finding: the unquoted 🐝 Hive Agent: |
|
hive/fix-merged: Done — the 🐝 Hive Agent: |
|
@kylerankin this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (3 waiting): fixes are handed out before new work as soon as you have capacity. |
|
@kylerankin the hive has adopted this PR ( |
|
The hive adopted this PR ( Blocker: lane reason The hive would move this to |
ruff I001 fails on the double blank line between the __future__ import and the stdlib group. UP037 (quoted _FakeMonitor annotation) is already unquoted. (server#647)
|
@Danathar fixed the two ruff items:
The head is now 🐝 Hive Agent: |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Needs approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
The hive adopted this PR ( Blocker: lane reason The hive would move this to |
|
Summary: An automated security check (zizmor) fails on many open pull requests in this repository at once, so the cause is shared, not this change. It is tracked in one place (#651); this PR is deferred until that is fixed. Baseline triage: DEFER_TO_INCIDENT (sibling PRs red on same check). See #651. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-sonnet-5.5 copilot=1.0.88 |
|
The hive adopted this PR ( Blocker: lane reason The hive would move this to |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danathar The full list of commands accepted by this bot can be found here. Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The hive adopted this PR ( Blocker: The hive would move this to |
|
The hive adopted this PR ( Blocker: The hive would move this to |
|
🤖 Hive follow-up: no quoted return annotation exists at this head — the new test imports 🐝 Hive Agent: |
|
The hive's GitHub App lacks |
|
Needs a decision, not a merge: Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
jeefy
left a comment
There was a problem hiding this comment.
Verdict: COMMENT (no correctness blocker). Reviewed head b776928.
Logic (scripts/dogfood-installer.sh:447-456)
- The change is correct as written.
${console_noise:-0}is passed as argv[3] and compared to"1". The script already validatesconsole_noiseas0|1at line ~142, so the string compare is safe. It is only non-zero inDOGFOOD_INSTALL=consolemode, so the unattended/other callers keep the 0.15s gap. - Cost is small: the 16-hex-char password is typed twice, which adds about 6.4s to
console_first_boot. - The gap is applied to every
type_keyscall under noise, not just the password prompts. That is fine, but it is a mitigation rather than a guarantee. The sendkey path is still fire-and-forget, so a dropped scancode is less likely, not impossible.console_first_boot(lines ~985-990) still has no retry. If you want it deterministic, the real fix would be a retry on the "did not match" re-prompt, or a read-back of the typed length. Not required for this PR, but worth a follow-up if #600 recurs. - The noise generator writes to
/dev/kmsgand the journal, and the script asserts the errors never reach the tty. So the "noise causes the missed scancode" cause is plausible (CPU/console load) but unproven. The PR only has the boot-test as evidence.
Tests (tests/unit/test_dogfood_installer.py:112-181)
- The test is a wall-clock check, and it does separate the two gaps. Quiet is about 2.15s (11 x 0.15 + 0.5) and noisy about 4.35s (11 x 0.35 + 0.5).
- It asserts nothing about the keys themselves.
_FakeMonitor._serve(line 136-143) drains and discards the bytes, so the test cannot catch a changed key map, a skipped key, or the gap being applied to the wrong run. assert quiet < 3.0(line 180) leaves about 0.85s of margin over bash + python3 startup on a shared runner. That is the likeliest flake. Better: have_serverecordtime.monotonic()per receivedsendkeyline, then assert the sequence (1..0,ret) and the min inter-key gap (>=0.3 noisy, <0.25 quiet). That is deterministic and tests the actual contract (per-key gap), not total runtime.- It also adds about 6.5s to the unit suite for the two real sleeps. Acceptable.
CI
zizmoris not caused by this PR. The failing run (43164300787, "Lint workflows", 2026-11-12) reports only.github/workflows/*hash-pin version-comment warnings (build.yml, reproducibility.yml, track-junctions.yml, unit-tests.yml), and this PR touches no workflow. Other PRs (#653, #644) failed on the same earlier. #681 and the latestmainruns of "Lint workflows" are green, so the failure is stale. Rebase or re-run to clear it.boot-test,buildandvalidateare allskippingon this PR. The ask in the PR body (CI's boot test confirming the passwords match) is therefore not exercised. Add thefull-buildlabel, or confirm with a localDOGFOOD_INSTALL=console DOGFOOD_CONSOLE_NOISE=1 just dogfood-installrun, before queueing.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danathar The full list of commands accepted by this bot can be found here. Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
Cannot apply the lgtm label because Error: jeefy is not a reviewer or approver for any changed file |
Summary:
type_keysin the dogfood installer sent every keystroke with a fixed 0.15s gap, so the injected console noise could make the guest miss a scancode. A 16-character password typed twice at that gap registered 15 then 16 characters on first boot, and the two password prompts reported that they did not match (#600). This widens the per-key gap to 0.35s while console noise is active so the guest has time to accept each scancode.What I need from you:
CI's boot test to confirm the passwords now match under console noise.
The widening is one of the two directions the issue offered; it is the smallest change that targets the named root cause (a dropped scancode under noise) without making
type_keyspassword-aware.A unit test types a string against a stand-in QEMU monitor and measures the wall-clock time of the quiet run (0.15s gap) versus the noisy run (0.35s gap); eleven keys land about 2.2s apart, which separates the two without depending on per-key scheduling jitter. The test fails without the widening and passes with it.
Closes #600
Hive-Run: #600
Hive-Spec: projectbluefin-server#600
— hive: agent=scanner backend=pi model=lemonade/ornith-1.5-35b-a3b-gguf-q6_k
🐝 Hive Agent:
contributor| SHA:d004f5b