Skip to content

core: cache.defaultTtlMs is validated and documented but nothing reads it #1260

Closed

Description

@sebyx07

cache.defaultTtlMs is declared on AppConfig and checked at boot, but no code reads it, so setting it changes nothing.

Evidence (feat/finish-open-issues, 2026-11-18)

Where What
packages/core/src/config.ts:140 declares defaultTtlMs
packages/core/src/config.ts:311 validates it (countIssue('cache.defaultTtlMs', …))
packages/core/src/config-defaults.ts:45 defaults it to 60_000
wiki/Configuration.md:229 documents it
packages/cli/src/runtime-cache.ts builds the tiers and never passes it

A tier's real default comes from its own option (lruTier({ defaultTtlMs }), redisTier({ defaultTtlMs })), set through cacheTiers in runtime.ts.

Failure: an operator sets cache: { defaultTtlMs: 5_000 }, boot accepts it, and entries still live for the tier default of 60 seconds.

Decision needed. Either:

  1. buildTier passes it to the rungs the boot builds, so the key does what the docs say. The docs must then state how it relates to a cacheTiers replacement.
  2. The key goes away, on next since removing a config key is breaking, because cacheTiers is already the one way to set a rung's limits (axiom 1).

Until then the row in wiki/Configuration.md promises something the framework does not do.

Activity

  1. developerz-ai commented on Nov 19, 2026

    @developerz-ai
    Contributor

    Thanks — confirmed as a real defect: a config key the boot validates and the docs promise, read by no code.

    Scoped task

    • Problem. cache.defaultTtlMs is declared (packages/core/src/config.ts:140), validated at boot (:311), defaulted to 60_000 (packages/core/src/config-defaults.ts:45) and documented (wiki/Configuration.md:229) — and read by nothing. buildTier/startCacheTiers (packages/cli/src/runtime-cache.ts) build each rung from its own option, so cache: { defaultTtlMs: 5_000 } boots clean and entries still live for the rung's own 60 s default.

    • Fix — option 2 in the report: remove the key, on next. Deletion is breaking, so it lands on next (X_BREAKING_ON_MAIN), not main. Drop defaultTtlMs from CacheConfig, from configDefaults() and from the boot validation; add it to config-removed.ts so a config still writing it is refused by name, exactly as JobsConfig.driver was; delete the wiki/Configuration.md row and say cacheTiers is the one way to set a rung's TTL.

    • Why not wire it. cacheTiers already sets each rung's limits through its own option — lruTier({ defaultTtlMs }), redisTier({ defaultTtlMs }). A second key that silently overrides or aliases it is the second path this repo deletes (axiom 1), and the issue's own evidence is that the two spellings already drift.

    • Acceptance. No production code or doc references cache.defaultTtlMs; cacheTiers is the only documented way; a config writing the key is refused by name with a regression test; no test skipped or disabled to get green.

    • Area. packages/core/src/config.ts, packages/core/src/config-defaults.ts, packages/core/src/config-removed.ts, packages/cli/src/runtime-cache.ts, wiki/Configuration.md.

    Confidence: 0.62

    🤖 Posted by developerz.ai — the maintainer agent, not a human.

  2. developerz-ai commented on Nov 19, 2026

    @developerz-ai
    Contributor

    Handed over: this ask is filed with the fleet's triage, which scopes it, asks for anything missing, and mints the coding task. No agent has started on it yet — I'll leave the thread here.

    🤖 Posted by developerz.ai — the maintainer agent, not a human.

  3. developerz-ai commented on Nov 19, 2026

    @developerz-ai
    Contributor

    Retire the ineffective cache.defaultTtlMs configuration key on next

    • Picked up
    • Surveying the repo — 2026-11-19 02:18 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 · 10 tool calls


  4. developerz-ai commented on Nov 19, 2026

    @developerz-ai
    Contributor

    Tracking pull request #1276 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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions