Skip to content

docs: consolidate storage key metadata and layout docs - #912

Open
pelumixxril wants to merge 1 commit into
BlockDash-Studios:mainfrom
pelumixxril:fix/issue-335-consolidate-data-key-metadata-and-storage
Open

pelumixxril wants to merge 1 commit into
BlockDash-Studios:mainfrom
pelumixxril:fix/issue-335-consolidate-data-key-metadata-and-storage

Conversation

@pelumixxril

Copy link
Copy Markdown

Overview

This PR consolidates the storage key layout and metadata documentation for the Folder contract so that key definitions, storage schema notes, and their corresponding tests live in one coherent place. Previously, key layout comments were scattered across storage.rs, types.rs, and separate upgrade-safety docs, making it hard to verify that documented layouts matched the actual storage implementation. This change centralizes that metadata, links it to the tests that exercise it, and updates the affected docs to point at the single source of truth.

Related Issue

Changes

🗂️ Storage Key Metadata Consolidation

  • [MODIFY] app/contract/contracts/Folder/src/storage.rs

    • Consolidated the key layout comments into a single, structured storage schema reference covering each key's purpose, encoding, and value type.
    • Cross-referenced each documented key with the test that validates it.
  • [MODIFY] app/contract/contracts/Folder/src/storage_test.rs

    • Added/updated assertions that verify the documented key layout matches the keys actually written and read by the contract.
    • Linked test cases back to the consolidated storage schema so layout drift is caught by tests.
  • [MODIFY] app/contract/README.md

    • Replaced scattered storage notes with a pointer to the consolidated schema in storage.rs and the corresponding tests.
  • [MODIFY] app/contract/docs/UPGRADE_SAFETY_GATE_IMPLEMENTATION.md

    • Updated storage layout references to link to the consolidated schema instead of duplicating key metadata.
  • [MODIFY] app/contract/docs/UPGRADE_SAFETY_GATE_QUICK_REFERENCE.md

    • Updated the quick-reference key table to reference the single consolidated source.

🔑 API Key Type Metadata Alignment

  • [MODIFY] app/backend/src/api-keys/api-keys.types.js
  • [MODIFY] app/backend/src/api-keys/api-keys.types.ts
    • Aligned API key type metadata comments with the consolidated storage documentation so key/type descriptions stay consistent across contract and backend.

Verification Results

cargo test -p Folder storage_test
✅ storage_test suite passed

Docs check:
✅ storage.rs schema references resolve to existing tests
✅ README and upgrade-safety docs link to consolidated schema
✅ No duplicated key layout definitions remain in docs
Acceptance Criteria Status
Storage key metadata is consolidated into a single documented location ✅ Key layout and schema notes centralized in storage.rs
Storage layout docs are linked to tests ✅ Each documented key references its validating test in storage_test.rs
Scattered metadata across modules is removed or redirected ✅ README and upgrade-safety docs now link to the consolidated schema
Backend API key type metadata stays consistent with contract docs ✅ api-keys.types.js / .ts comments aligned

Closes #335

@drips-wave

drips-wave Bot commented Sep 30, 2026

Copy link
Copy Markdown

@pelumixxril 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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

consolidate data key metadata and storage schema documentation

1 participant