Skip to content

fix: address issues #457, #458, #460, #461 — validation dedup, storag… - #541

Merged
usmanimamu17-create merged 1 commit into
ApexChainx:mainfrom
yashimamina6:fix/issues-457-458-460-461
Aug 31, 2026
Merged

fix: address issues #457, #458, #460, #461 — validation dedup, storag…#541
usmanimamu17-create merged 1 commit into
ApexChainx:mainfrom
yashimamina6:fix/issues-457-458-460-461

Conversation

@yashimamina6

Copy link
Copy Markdown
Contributor

…e estimation, and retention metrics

🤖 Generated with Codebuff

Description

Brief description of the changes in this PR.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Related Issues

Fixes #(issue number) or relates to #(issue number)

Changes Made

Testing

Describe the testing performed to validate these changes:

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented complex logic
  • I have updated relevant documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My changes do not introduce new warnings

Screenshots (if applicable)

Add screenshots or logs if applicable.

closes #461
closes #458
closes #457
closes #460

…pexChainx#461 — validation dedup, storage estimation, and retention metrics

- ApexChainx#457: Refactor validate_config to delegate general bounds to
  validate_general_bounds, eliminating duplicated threshold/penalty/reward
  range checks. The cross-parameter consistency check remains in
  validate_config to preserve error precedence (severity-specific checks
  before cross-parameter), verified by the fuzz_spec parity tests.

- ApexChainx#458: Replace hardcoded 1024/120/150 byte constants in
  storage_estimation with calibrated per-key constants. Byte sizes are
  documented as measured approximations with tested reasonable ranges
  (±50%) to guard against Soroban encoding changes.

- ApexChainx#460: Add per-key footprint model to get_storage_footprint_estimate.
  Each instance-storage key (CONFIG map, STATS, telemetry, pause info,
  etc.) is now counted individually with measured overhead. Lazily-created
  keys are only included when present in storage. The estimate now covers
  all fixed instance keys instead of lumping them into a single constant.

- ApexChainx#461: Add cumulative pruned/total_entries counters (TOTAL_PRUNED_KEY,
  TOTAL_ENTRIES_KEY) tracked in calculate_sla auto-trim, prune_history,
  and prune_history_by_age. Expose retention health via new
  get_retention_metrics endpoint returning HistoryRetentionMetrics.
  Updated public API descriptor (61→62 methods), storage key namespace
  test, and eagerly_written keys list.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@yashimamina6 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@usmanimamu17-create usmanimamu17-create left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@usmanimamu17-create
usmanimamu17-create merged commit a5ebb4f into ApexChainx:main Aug 31, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment