Skip to content

perf(contract): define and test TTL bump budgets for instance and persistent storage #72

Description

@arisu6804

Problem

Storage costs and transaction failures can grow unpredictably when reads or writes extend TTL on every access.

Objective

Deliver a production-quality improvement to storage access patterns and lifecycle cleanup that creates measurable value for correctness, security, reliability, performance, or maintainability.

Implementation scope

  • Inventory hot and cold storage entries and define TTL bump rules per entry type.
  • Avoid redundant bumps within one invocation and keep cleanup bounded.
  • Document behavior when an entry expires or cannot be extended.

Acceptance criteria

  • A single invocation stays within the documented TTL and budget limits.
  • Expired data fails safely without corrupting accounting.
  • Tests verify no redundant writes for repeated reads.

Required validation

  • Storage instrumentation tests, expiration tests, and budget checks on representative workloads.
  • Existing tests and CI remain passing.
  • Add regression coverage for the original failure mode.
  • Do not weaken, delete, or skip unrelated tests to obtain a green build.

PR quality bar

  • Keep the PR focused on this issue and explain design tradeoffs.
  • Include test evidence, compatibility impact, and migration or rollout notes where relevant.
  • Avoid typo-only, documentation-only, cosmetic-only, or unrelated refactor submissions.

Out of scope

  • Broad rewrites not required by the acceptance criteria.
  • Changes to unrelated services, contracts, or user flows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GRANTFOX OSSOpen-source issue tracked by GrantFoxMAYBE REWARDEDThis issue may carry a rewardThird CampaignThird Campaign contributionenhancementNew feature or requestpriority:mediumMedium implementation priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions