Documentation Updates & KVS Key Spec Change (Dots Now Allowed) #5

Merged
mik-tf merged 4 commits from master-fixes into master 2026-01-02 23:24:23 +00:00
Contributor

Summary

This PR includes two main changes:

  1. Documentation updates - Fixed outdated README.md file tree and account count inconsistencies
  2. KVS spec change - Keys can now contain dots (.) for more flexible naming

Changes

📚 Documentation Updates

  • README.md - Updated project file tree/directory structure to match current codebase
  • docs/SETUP.md - Fixed account count from 14 to 15 (includes my_admin_x)
  • setup/README.md - Fixed account count consistency

🔧 KVS Key Specification Change

Breaking Change: Keys now allow dots (previously forbidden)

File Change
contract/kvs/src/error.rs Removed KeyHasDot error variant, renumbered codes 6-16
contract/kvs/src/validation.rs Updated key_fix() to preserve dots, removed dot rejection
contract/kvs/src/lib.rs Updated comment: "dots allowed"
contract/kvs/SPECIFICATION.md Updated key rules table, examples, and error codes
setup/src/bin/heronear.rs Updated CLI help text (line 768)
scripts/tests/test_full_system.rhai Added test for key with dots (config.v2.settings)

New Error Code Numbering

Code Name
5 KeyTooShort
6 KeyNotFound (was 7)
7 KeyDeleted (was 8)
... (all shifted down by 1)
16 TooManyKeys (was 17)

Valid Key Examples (New)

  • config.v2.settings
  • has.dot
  • node.ip.address

Testing

  • cargo check --target wasm32-unknown-unknown -p kvs - passed
  • cargo check -p setup - passed
  • Added integration test for dotted keys in test_full_system.rhai

Run Tests

heronear scripts/tests/test_full_system.rhai
### Summary This PR includes two main changes: 1. **Documentation updates** - Fixed outdated README.md file tree and account count inconsistencies 2. **KVS spec change** - Keys can now contain dots (`.`) for more flexible naming ### Changes #### 📚 Documentation Updates - **README.md** - Updated project file tree/directory structure to match current codebase - **docs/SETUP.md** - Fixed account count from 14 to 15 (includes `my_admin_x`) - **setup/README.md** - Fixed account count consistency #### 🔧 KVS Key Specification Change **Breaking Change**: Keys now allow dots (previously forbidden) | File | Change | |------|--------| | `contract/kvs/src/error.rs` | Removed `KeyHasDot` error variant, renumbered codes 6-16 | | `contract/kvs/src/validation.rs` | Updated `key_fix()` to preserve dots, removed dot rejection | | `contract/kvs/src/lib.rs` | Updated comment: "dots allowed" | | `contract/kvs/SPECIFICATION.md` | Updated key rules table, examples, and error codes | | `setup/src/bin/heronear.rs` | Updated CLI help text (line 768) | | `scripts/tests/test_full_system.rhai` | Added test for key with dots (`config.v2.settings`) | #### New Error Code Numbering | Code | Name | |------|------| | 5 | `KeyTooShort` | | 6 | `KeyNotFound` *(was 7)* | | 7 | `KeyDeleted` *(was 8)* | | ... | *(all shifted down by 1)* | | 16 | `TooManyKeys` *(was 17)* | ### Valid Key Examples (New) - `config.v2.settings` ✓ - `has.dot` ✓ - `node.ip.address` ✓ ### Testing - ✅ `cargo check --target wasm32-unknown-unknown -p kvs` - passed - ✅ `cargo check -p setup` - passed - Added integration test for dotted keys in `test_full_system.rhai` ### Run Tests ```bash heronear scripts/tests/test_full_system.rhai ```
mik-tf changed title from WIP:docs: Update README with 15 accounts, reorganize examples, and fix KVS key rules to Documentation Updates & KVS Key Spec Change (Dots Now Allowed) 2026-01-02 23:24:16 +00:00
mik-tf merged commit 1c4ad97d48 into master 2026-01-02 23:24:23 +00:00
mik-tf deleted branch master-fixes 2026-01-02 23:24:23 +00:00
Sign in to join this conversation.
No reviewers
No labels
urgent
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_research/hero_ledger!5
No description provided.