Skip to content

feat(web): add bounded attachment admission rules - #365

Open
seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:feat/issue-344-attachment-admission
Open

feat(web): add bounded attachment admission rules#365
seekskyworld wants to merge 1 commit into
openpi-dev:mainfrom
seekskyworld:feat/issue-344-attachment-admission

Conversation

@seekskyworld

Copy link
Copy Markdown

Problem

Implements the admission-contract slice of #344. Web attachments had no shared, testable bounds for count, filename, MIME, per-file size, or aggregate size.

Value

Future file/image upload paths can fail closed before touching workspace or Session authority.

Approach

Add a pure protocol validator with explicit supported MIME types, filename traversal protection, count and UTF-8-independent byte limits. No upload storage or prompt behavior is changed.

Validation

  • node --test --experimental-strip-types tests/web/attachments.test.ts
  • npx tsc --noEmit
  • git diff --check

Impact

  • User-visible behavior: establishes bounded attachment admission errors for future UI.
  • Model-visible context/tools: none.
  • Runtime/lifecycle: none.
  • Persisted config/data: none.
  • Compatibility/risk: additive protocol utility; upload flow remains unimplemented.

Signed-off-by: seekskyworld <djh1813553759@gmail.com>
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.

1 participant