[PR #280] [CLOSED] feat(validation): centralize identifier and metadata validation #313

Closed
opened 2026-10-29 14:22:06 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/280
Author: @yingjun8
Created: 9/12/2026
Status: ❌ Closed

Base: main ← Head: feat/identifier-validation


📝 Commits (1)

  • 811c7ef feat(validation): centralize identifier and metadata validation

📊 Changes

2 files changed (+163 additions, -0 deletions)

View changed files

📝 src/lib.rs (+1 -0)
➕ src/validation.rs (+162 -0)

📄 Description

Several entry points validate user-supplied identifiers inline and have drifted apart. Add a single validation module holding the project-wide identifier grammar ([a-z_][a-z0-9_-]*, already documented for setup runtime users), port and environment-entry checks, plus metadata normalization for sandbox creation.

Includes unit tests covering the accepted grammar, boundary length, port zero, KEY=VALUE environment entries and metadata normalization.

Note: cargo is not available in the environment this was authored in, so the crate has not been compiled locally.

What

Why

Closes #

Scope and non-goals

Design and behavior changes

Compatibility and operations

  • Public API or generated protocol:
  • Configuration or defaults:
  • Snapshot manifest, artifact layout, or storage format:
  • Upgrade and rollback:
  • Host requirements, permissions, ports, or dependencies:

Validation

  • make fmt
  • make clippy
  • make test-unit
  • Relevant Rust integration tests
  • make -C services test (required when services/ changes)
  • Generated clients/server regenerated with the documented make target
  • Documentation updated
  • Benchmarks or performance comparison completed

Commands and results:


Skipped checks and reasons:

Risks and reviewer notes

Checklist

  • The PR contains one coherent change and no unrelated formatting or refactoring.
  • New behavior is covered by tests, or I explained why testing is impractical.
  • Logs and examples contain no credentials, tokens, or private registry information.
  • I did not manually edit generated code without updating its source and regenerating it.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/280 **Author:** [@yingjun8](https://github.com/yingjun8) **Created:** 9/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/identifier-validation` --- ### 📝 Commits (1) - [`811c7ef`](https://github.com/kvcache-ai/AgentENV/commit/811c7ef1b1c4b86c8bbddd8f72904ef4752d805b) feat(validation): centralize identifier and metadata validation ### 📊 Changes **2 files changed** (+163 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/lib.rs` (+1 -0) ➕ `src/validation.rs` (+162 -0) </details> ### 📄 Description Several entry points validate user-supplied identifiers inline and have drifted apart. Add a single validation module holding the project-wide identifier grammar ([a-z_][a-z0-9_-]*, already documented for setup runtime users), port and environment-entry checks, plus metadata normalization for sandbox creation. Includes unit tests covering the accepted grammar, boundary length, port zero, KEY=VALUE environment entries and metadata normalization. Note: cargo is not available in the environment this was authored in, so the crate has not been compiled locally. ## What <!-- Summarize the change. Keep the PR focused on one problem. --> ## Why <!-- Explain the user or maintainer problem this solves. --> ## Related issue <!-- Use "Closes #123" for an issue resolved by this PR. Non-trivial changes should normally have an issue or prior design discussion. --> Closes # ## Scope and non-goals <!-- State what is intentionally included and excluded. Call out unrelated refactors. --> ## Design and behavior changes <!-- Describe important data flow, lifecycle, failure handling, concurrency, or operational changes. Include diagrams for substantial changes. --> ## Compatibility and operations <!-- Explain applicable compatibility and deployment impact. Write "N/A" with a reason where appropriate. --> - Public API or generated protocol: - Configuration or defaults: - Snapshot manifest, artifact layout, or storage format: - Upgrade and rollback: - Host requirements, permissions, ports, or dependencies: ## Validation <!-- Check only commands you actually ran. Add focused tests and exact commands below. --> - [ ] `make fmt` - [ ] `make clippy` - [ ] `make test-unit` - [ ] Relevant Rust integration tests - [ ] `make -C services test` (required when `services/` changes) - [ ] Generated clients/server regenerated with the documented `make` target - [ ] Documentation updated - [ ] Benchmarks or performance comparison completed Commands and results: ```text ``` Skipped checks and reasons: ## Risks and reviewer notes <!-- Identify correctness, security, compatibility, resource, and operational risks. Point reviewers to the most important files or commits. --> ## Checklist - [ ] The PR contains one coherent change and no unrelated formatting or refactoring. - [ ] New behavior is covered by tests, or I explained why testing is impractical. - [ ] Logs and examples contain no credentials, tokens, or private registry information. - [ ] I did not manually edit generated code without updating its source and regenerating it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:22:06 +00:00
Sign in to join this conversation.
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
kvcache-ai/AgentENV#313
No description provided.