Skip to content

--no-cache on a directory serves stale HTML when a source grows #254

Description

@cboos

Summary

claude-code-log <projectdir> --no-cache does not regenerate combined_transcripts.html when a session .jsonl grows between runs — it serves stale HTML.

Repro

claude-code-log <projectdir> --no-cache        # writes combined_transcripts.html
# ... a session in <projectdir> progresses (its .jsonl grows) ...
claude-code-log <projectdir> --no-cache        # prints "is current, skipping regeneration"
# combined_transcripts.html still lacks the new content

Cause

With --no-cache, cache_manager is None, so the directory falls into the
single-file/no-cache fallback branch in convert_jsonl_to. That branch's
freshness check (source_is_newer) is deliberately scoped to file sources
(input_path.is_file()), because a directory has no single mtime. With no
cache to track per-source mtimes either, should_regenerate is driven only by
the embedded tool version (is_outdated), which an unchanged-version regrow
does not trip → skip → stale output.

The normal (cached) directory path is unaffected: it tracks source mtimes in
its DB (is_html_stale) and regenerates correctly.

Scope / relationship

Pre-existing; it is the directory-source analogue of the single-file staleness
fixed in #221 / PR #253 (which is scoped to file sources). Filed so it isn't
forgotten. A fix would need a directory-wide freshness signal for the no-cache
path (e.g. max source mtime vs. output mtime).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions