Skip to content

Commit e1fa2b4

Browse files
Kasper JungeRalphify
authored andcommitted
workspace: record _format_params simplification + verified-live audit
- iterations.md: log 4ccfa9a - backlog.md: note vulture false-positives confirmed live; add two future-win candidates to triage - coverage/_console_emitter.md: first coverage note for this module Co-authored-by: Ralphify <noreply@ralphify.co>
1 parent 4ccfa9a commit e1fa2b4

3 files changed

Lines changed: 47 additions & 0 deletions

File tree

β€Žworkspace/ralphs/improve-codebase/backlog.mdβ€Ž

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ only when they land in a commit.
1212
- Check `cli.py` validators for unreachable error branches after recent
1313
TypedDict refactors.
1414
- Confirm every `from typing import ...` import in `src/ralphify/` is used.
15+
(Checked 4ccfa9a β€” all six modules import only what they use.)
16+
- vulture 60% flags that were verified as live: `clear_scroll`,
17+
`_SinglePanelNavigator`, `_stop_live`, `serialize_frontmatter`,
18+
`to_dict`, `_atexit_hook`, RunManager public methods β€” all used in tests,
19+
docs, or scripts/. TypedDict field "unused" warnings are spurious.
20+
- Consider inlining `_validate_name` into `_check_unique_name` in `cli.py`
21+
(the former has exactly one caller). Tradeoff: the split doc-strings
22+
document the two concerns (format vs uniqueness) cleanly.
23+
- `_is_claude_command` (`_console_emitter.py`) and `_supports_stream_json`
24+
(`_agent.py`) both check `Path(parts[0]).stem == CLAUDE_BINARY` but on
25+
different inputs (string vs list). Consolidating would cross module
26+
boundaries for modest payoff β€” revisit only if a third caller appears.
1527

1628
## Phase 2 β€” duplication
1729

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# `_console_emitter.py` coverage
2+
3+
Valid at: 4ccfa9a
4+
5+
## Recent changes
6+
7+
- 4ccfa9a β€” dropped `if parts else ""` branch in `_format_params`.
8+
`" Β· ".join([])` returns `""`, so the guard was dead.
9+
10+
## Verified live (grepped, confirmed used)
11+
12+
Private helpers and constants that look unused but are legitimately used:
13+
14+
- `_ICON_SUCCESS`, `_ICON_FAILURE`, `_ICON_TIMEOUT`, `_ICON_ARROW`,
15+
`_ICON_DASH`, `_ICON_PLAY` β€” all referenced in handler print strings.
16+
- `clear_scroll` β€” used by test_console_emitter tests.
17+
- `_SinglePanelNavigator` β€” used by tests and `scripts/tui_dev/snapshot.py`.
18+
- `_stop_live` (the locked wrapper) β€” used only in tests for cleanup
19+
between test cases. Production code uses `_stop_live_unlocked` inside
20+
an existing lock.
21+
- `_format_params`, `_extract_file_path`, `_extract_key`, `_extract_params`
22+
β€” all referenced in the `_TOOL_REGISTRY` table (`"Read"`, `"Glob"`,
23+
`"Grep"`, `"Edit"`, `"Write"`, `"Bash"`, `"WebFetch"`, `"WebSearch"`, etc.).
24+
25+
## Potential future wins (not yet taken)
26+
27+
- `_IterationPanel._build_footer` and `_IterationSpinner._build_footer` both
28+
start with `Text(no_wrap=True, overflow="ellipsis")` and use
29+
`_footer_grid(summary)` β€” the `Text(...)` construction repeats, but only
30+
twice. Not worth extracting unless a third subclass appears.
31+
- `panel_for` / `is_live` share the guard
32+
`self._current_iteration == iteration_id and self._active_renderable is not None`.
33+
Two call sites; extracting would be premature.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# Iterations
22

33
One line per iteration: `<sha> <summary>`.
4+
5+
4ccfa9a refactor: drop redundant `if parts else ""` in `_format_params` (empty join already returns "")

0 commit comments

Comments
Β (0)