Add hardening regressions and update operational docs
This commit is contained in:
parent
2b494851a6
commit
9c7d7b35b1
2 changed files with 14 additions and 0 deletions
|
|
@ -86,6 +86,8 @@ Create `~/.config/aman/config.json` (or let `aman` create it automatically on fi
|
||||||
|
|
||||||
Recording input can be a device index (preferred) or a substring of the device
|
Recording input can be a device index (preferred) or a substring of the device
|
||||||
name.
|
name.
|
||||||
|
If `recording.input` is explicitly set and cannot be resolved, startup fails
|
||||||
|
instead of falling back to a default device.
|
||||||
|
|
||||||
Config validation is strict: unknown fields are rejected with a startup error.
|
Config validation is strict: unknown fields are rejected with a startup error.
|
||||||
|
|
||||||
|
|
@ -97,6 +99,8 @@ Hotkey notes:
|
||||||
AI cleanup is always enabled and uses the locked local Llama-3.2-3B GGUF model
|
AI cleanup is always enabled and uses the locked local Llama-3.2-3B GGUF model
|
||||||
downloaded to `~/.cache/aman/models/` during daemon initialization.
|
downloaded to `~/.cache/aman/models/` during daemon initialization.
|
||||||
Model downloads use a network timeout and SHA256 verification before activation.
|
Model downloads use a network timeout and SHA256 verification before activation.
|
||||||
|
Cached models are checksum-verified on startup; mismatches trigger a forced
|
||||||
|
redownload.
|
||||||
|
|
||||||
Use `-v/--verbose` to enable DEBUG logs, including recognized/processed
|
Use `-v/--verbose` to enable DEBUG logs, including recognized/processed
|
||||||
transcript text and llama.cpp logs (`llama::` prefix). Without `-v`, logs are
|
transcript text and llama.cpp logs (`llama::` prefix). Without `-v`, logs are
|
||||||
|
|
@ -136,6 +140,7 @@ Service notes:
|
||||||
- Press it again to stop and run STT.
|
- Press it again to stop and run STT.
|
||||||
- Press `Esc` while recording to cancel without processing.
|
- Press `Esc` while recording to cancel without processing.
|
||||||
- `Esc` is only captured during active recording.
|
- `Esc` is only captured during active recording.
|
||||||
|
- Recording start is aborted if the cancel listener cannot be armed.
|
||||||
- Transcript contents are logged only when `-v/--verbose` is used.
|
- Transcript contents are logged only when `-v/--verbose` is used.
|
||||||
|
|
||||||
Wayland note:
|
Wayland note:
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,15 @@ class RecorderTests(unittest.TestCase):
|
||||||
):
|
):
|
||||||
recorder.start_recording("NotADevice")
|
recorder.start_recording("NotADevice")
|
||||||
|
|
||||||
|
def test_start_recording_invalid_explicit_index_raises(self):
|
||||||
|
sd = _FakeSoundDevice()
|
||||||
|
with patch("recorder._sounddevice", return_value=sd):
|
||||||
|
with self.assertRaisesRegex(
|
||||||
|
ValueError,
|
||||||
|
"did not match any input device; available inputs: 1:Laptop Mic, 2:USB Interface",
|
||||||
|
):
|
||||||
|
recorder.start_recording(99)
|
||||||
|
|
||||||
def test_start_recording_empty_input_uses_default(self):
|
def test_start_recording_empty_input_uses_default(self):
|
||||||
sd = _FakeSoundDevice()
|
sd = _FakeSoundDevice()
|
||||||
with patch("recorder._sounddevice", return_value=sd):
|
with patch("recorder._sounddevice", return_value=sd):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue