🔥 Gremlins MVP: cut unrequested surface per keep/cut calls
This commit is contained in:
@@ -23,3 +23,29 @@
|
||||
| 25 | stderr to `raw/<J>.err` | keep | Cheap debugging aid. |
|
||||
| 26 | Reader join timeout 10 s | keep | Without it an orphan holding stdout hangs the helper (spec §7 leftover). |
|
||||
| 28 | Unused `ss=None` injection parameter in `call.py` | cut | Used by no caller. |
|
||||
|
||||
## Result
|
||||
|
||||
Premises checked in the code before each cut. Tests: `uv run --no-project --python 3.12 python -m unittest discover -s tests` gave **24 tests, OK** (run twice).
|
||||
|
||||
| File | Added | Removed |
|
||||
|---|---|---|
|
||||
| `grm/stream.py` | 9 | 39 |
|
||||
| `grm/call.py` | 4 | 4 |
|
||||
| `grm/cli.py` | 2 | 4 |
|
||||
| `grm/launch.py` | 1 | 1 |
|
||||
| **Total** | **16** | **48** |
|
||||
|
||||
Net code: 32 lines removed (16 added, 48 deleted); no test was removed or changed (none existed only for a cut item).
|
||||
|
||||
## Kept against the call
|
||||
|
||||
- **#4 `threading.Lock` around ledger append: kept.** Premise half true: in production each spawn is its own process, so no two threads of one process append. But with the lock removed `test_store.test_parallel_appends_give_whole_lines` (96 of 100 lines) and `test_cli.test_parallel_spawns` (2 of 3 ledger lines) fail, on every run. Appends from separate handles on Windows lose lines. The lock only makes those B3 tests pass in-process; across real processes the same race is unguarded either way (the review's open "Windows append atomicity" item). Cutting it would mean weakening two B3 tests, which the call forbids. Needs a decision: either keep the lock as is, or replace it with a cross-process append (for example a lock file or an `msvcrt` byte-range lock) in a separate change.
|
||||
|
||||
## Notes on the cuts
|
||||
|
||||
- #12: `session_id` from the `init` event is now taken only while unset (`self.session_id is None`), which matches the old "first init wins" behaviour.
|
||||
- #28: `StreamState` is now imported at the top of `call.py` instead of lazily inside the `ss is None` branch.
|
||||
- #17: premise holds. `spawn` refuses an existing `jobs/<J>.json` (`cli.py:255`) and `_execute` writes that file before the call starts, so a note that exists afterwards was written by this job.
|
||||
- #11: nothing outside `stream.py` read `refused` or `model_refused` (code, tests, SKILL.md, templates).
|
||||
- #8, #13, #14, #22: no reader in code, tests, SKILL.md or templates. SKILL.md and templates mentioned none of the cut items, so they are unchanged.
|
||||
|
||||
Reference in New Issue
Block a user