Skip to content

cache: runtime-built tiers take no limits or jitter #1178

Closed

Description

@sebyx07

Found in plan 101b sweep 8b-4. packages/cli/src/runtime-cache.ts (lines ~159 and ~172) builds lruTier() and redisTier() with no options, so maxBytes/maxEntries/jitterFraction cannot be configured for the tiers the runtime builds. X_CACHE_LIMIT_INVALID and X_CACHE_JITTER_INVALID used to name app.config.ts keys that do not exist; their fixes now say "a constructor option, never an app.config.ts key", which is the truth today.

Decide: a cache section in app.config.ts read by runtime-cache.ts, or the runtime.ts override.

🤖 Generated with Claude Code

Activity

  1. developerz-ai commented on Nov 17, 2026

    @developerz-ai
    Contributor

    Thanks for the write-up — a real gap, and worth fixing.

    buildTier() in packages/cli/src/runtime-cache.ts builds lruTier() and redisTier({ client }) with no options, so maxBytes/maxEntries/jitterFraction cannot reach the rungs a boot constructs — while @ultimat3/cache's LruOptions/RedisTierOptions already take them.

    Logged as an enhancement; the scope follows.

    🤖 Posted by developerz.ai — an automated agent, not a human.

  2. developerz-ai commented on Nov 17, 2026

    @developerz-ai
    Contributor

    Scoped: make the rungs the runtime builds configurable.

    Where the gap is. buildTier() (packages/cli/src/runtime-cache.ts) calls lruTier() and redisTier({ client }) with no options, so maxBytes/maxEntries/jitterFraction cannot reach the tiers a boot constructs. @ultimat3/cache already takes them (LruOptions.maxBytes/jitterFraction, RedisTierOptions.maxValueBytes/jitterFraction), and X_CACHE_LIMIT_INVALID/X_CACHE_JITTER_INVALID now correctly say "a constructor option" — so the options exist and nothing reaches them.

    The two paths the issue names.

    Path What it means
    A cache section in app.config.ts extend CacheConfig (today only defaultTtlMs + tiers) with per-tier limits/jitter, read by runtime-cache.ts and passed into buildTier()
    The runtime.ts override CacheTiersOptions.supplied already lets an app hand over whole CacheTiers; keep that as the only seam and document it

    Work either way. The chosen key/option carries maxBytes/maxEntries/jitterFraction; buildTier() passes them through to lruTier()/redisTier(); invalid values still raise X_CACHE_LIMIT_INVALID/X_CACHE_JITTER_INVALID and their fix: names the real key; supplied keeps working with a stated precedence over config; tests pin both the pass-through and the refusals.

    Open decision. Which of the two is the framework's one way is a config-surface call (axiom 1 — one way to do each thing), so it is flagged for the maintainer rather than handed to a coding agent as a coin flip.

    🤖 Posted by developerz.ai — an automated agent, not a human.

  3. developerz-ai commented on Nov 19, 2026

    @developerz-ai
    Contributor

    Let runtime-built cache tiers take limits and jitter

    • Picked up
    • Surveying the repo — 2026-11-19 00:33 UTC
    • Working
    • Pull request opened
    • Done

    Stopped — this needs a human. Nothing was merged.
    Reason: the run stopped on an error; its details are on the run in the developerz.ai dashboard.

    1m · 12 tool calls


  4. developerz-ai commented on Nov 19, 2026

    @developerz-ai
    Contributor

    Attempt 1 of 3 ended: the work ended failed with no change merged.

    It has been filed again as attempt 2 of 3, carrying what the last one hit.

    What stopped it:

    • evidence_blocked: The run recorded inaccessible evidence and stopped without shipping a change. It will not retry automatically: restore access to the recorded sources and rerun the task.
  5. developerz-ai commented on Nov 19, 2026

    @developerz-ai
    Contributor

    Tracking pull request #1261 for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions