[SafairBru] get_cache_key() is dead code with misleading timestamp logic
get_cache_key (line 3717) generates cache keys with minute-rounded timestamps, but is never called anywhere. The actual caching infrastructure (get_cached_data/set_cached_data) ...
StateDoneNext ActionClosedOwnerLuciRuntimeClosedAge27d ago
Ticket is done; runtime is closed.·profile claude_opus_1m_medium · cwd /home/lucienne/workspace · uptime 27d 3h · last activity 27d 1h ago
Description
MC-3580
get_cache_key (line 3717) generates cache keys with minute-rounded timestamps, but is never called anywhere. The actual caching infrastructure (get_cached_data/set_cached_data) uses simple string keys with manual TTL checks. If someone later uses this function expecting correct caching behavior, the time-bucketed keys would cause stale reads (same key for a whole minute regardless of TTL) and cache misses on minute boundaries.
File: app.py:3717
Complexity: simple
Found by: nightly code review (f2ecd69 fix(MC-3260): use _sast_now() in health endpoint timestamp)
Auto-fix skipped: Luci-side scheduled autofix is disabled by default; Larry owns SafairBru code changes.
Activity
done
INTERACTIVE
Luci is working...
Details —
Done
· Low
· Luci
▼
SState
Done
Closed
PPeople
TTiming / Details▼
safairbru-review (scheduled)
SafairBru
27d ago
27d ago
Advanced / Operator evidence
RRouting owner
ROperator console
Ticket is done; runtime is closed.completedprofile claude_opus_1m_medium · cwd /home/lucienne/workspace · uptime 27d 3h · last activity 27d 1h agoMC is visibility-only. Hermes Luci launches and gates work outside MC, then mirrors evidence/status here.
b691e1e8-e3f4-451c-9953-4e3f754833e4 · luci · claude/anthropic/opus[1m]
WWorkflow
Start Dev Review + QA ▾
Select phases to include:
Agents
Review Gates
Decision
WAT routing: choose an agent, review gate, or decision. Buttons use the live runtime when one is attached.
Luci dispatching this ticket to Larry (background worker via SSH).
luci27d ago
Larry: Planning — reading ticket and codebase context
luci27d ago
Larry: Building — removing dead function get_cache_keyPROGRESS: Testing — verifying app.py still compilesPROGRESS: Done — removed dead get_cache_key() function and updated CLAUDE.md section map
luci27d ago
Completed on Larry:
Tier 1 classification: delete dead function `get_cache_key` at app.py:3717.Confirmed `get_cache_key` is only defined, never called. Removing it.
Removed the unused `get_cache_key()` function from app.py:3717 and dropped its reference from the CLAUDE.md section map. Verified no callers existed via grep, and confirmed app.py still parses. Committed as 6f41d03.
luci27d ago
Larry: Triggering post-completion code review...
luci27d ago
Code review (Larry reviewer via claude/opus):
D
ead code removal of unused `get_cache_key()` function; no callers, saf
e deletion.
VERDICT: PASS
Dead code removal of unused `get_cache_key()` function; no callers, safe deletion.
VERDICT: PASS
luci27d ago
Larry shipped with clean code review. Auto-dispatching Luci-reviewer (verdict: clean). Next dispatch tick will spawn a single-session reviewer worker to verify, run Tessa subagent inline if UI-touching, merge the PR, and close.
luci27d ago
Completed:
DONE: Verified Larry's MC-3580 fix on SafairBru host (`~/cowork/projects/safairbru`). Commit `fb5e948` removed dead `get_cache_key()` (7 lines, app.py:3717) plus its CLAUDE.md section-map reference. Confirmed zero callers via grep, `app.py` compiles clean, and commit is already pushed to origin. Tier 1 dead-code deletion — clean, no regressions, closing.