Skip to content

Sync scoped uploads, skill publication, and sandbox provider fixes - #232

Open
Luhaozhu wants to merge 1 commit into
mainfrom
sync/ce-20261116-scoped-uploads
Open

Luhaozhu wants to merge 1 commit into
mainfrom
sync/ce-20261116-scoped-uploads

Conversation

@Luhaozhu

@Luhaozhu Luhaozhu commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Purpose and behavior

  • Before: A scoped API key could upload the first attachment before its chat existed, leaving the file detached from that chat. Skill publication errors provided little ownership information. Sandbox execution could encounter a provider without an explicit host execution flag.
  • After: A scoped upload with a chat ID establishes or validates the key's conversation and binds the attachment to it. Skill publication reports ownership and tolerates cleanup failures after the new tree is live. Sandbox providers declare their execution location explicitly.

Change walkthrough

  • Flow: src/backend/api/routes/v1/file_upload.py calls core/chat/public.py to validate the scope and associate the artifact with a chat. core/capabilities/skills/publication.py stages and replaces the skill tree. core/sandbox/protocol.py defines execution and read-only administration interfaces, and the session router exposes the selected provider's execution location.
  • Decisions: Use the existing request authorization and conversation setup for uploads. Surface filesystem ownership errors for the storage administrator. Keep the admin interface on ordinary providers and test the runtime contract against the shipped classes.

Risk and compatibility

  • Risk: high
  • Boundaries: Upload ownership and sandbox isolation are affected. Existing routes and response formats are retained. The generated CE sync contains 14 backend files and preserves public repository governance and workflow files. It includes no schema migration.
  • Human review: Maintainers should verify scoped upload ownership, including cross-scope denial, and the host versus container execution flag for supported providers.

Verification

  • Evidence: CE derivation passed runtime-file, excluded-artifact, branding, binary-asset, and license gates. All 33 selected CE provider, skill publication, and browser prewarm tests passed. All 78 selected upstream tests passed. Git diff whitespace checks passed.
  • Limits: Two API test modules fail collection in both the public base and generated CE because they reference an upstream-only fixture or team model. Scoped upload regression tests ran in the upstream suite. No full CE suite or native desktop test was used as PR evidence.

Recovery

  • Steps: Revert the generated sync and redeploy the previous backend. A revert does not remove chat or artifact records created while the updated backend was running.

Review follow-up

  • Disposition: Initial maintainer review is pending.

Community checklist

  • Maintainer review of this generated sync is pending.
  • Public bilingual documentation is updated in both languages where applicable.
  • CONTRIBUTING.md was read and referenced repository paths were checked.

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