mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-28 21:46:15 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - Provider data crosses workspace, event, trace, and tool-result boundaries > - Codex payloads can contain large or protected values > - The runner also needs to reject unsafe working directories > - This pull request adds pure boundary helpers before the full driver > - A later pull request will use these helpers for Codex event handling > - The benefit is bounded and redacted provider data with focused tests ## Linked Issues or Issue Description **Subsystem affected** `packages/paperclip-runner` Codex value and workspace boundaries. **Problem or motivation** Raw provider payloads can exceed durable limits or contain credentials. An invalid working directory can expose host state or escape the assigned workspace. **Proposed solution** Validate the workspace against host and assignment roots. Bound retained values by depth, count, string length, and byte size. Redact protected keys and diagnostic credentials. **Alternatives considered** Keeping these checks inside the driver would make them harder to review and reuse at every provider-data boundary. **Roadmap alignment** This supports the Codex-first experimental runner. It does not enable the runner adapter. ## What Changed - Added assigned-workspace validation. - Added host home and Codex home overlap checks. - Added retained payload bounds. - Added recursive protected-value redaction. - Added semantic completion tool disposition checks. - Added focused security and bounds tests. ## Verification - `pnpm --filter @paperclipai/paperclip-runner test:typescript` - `pnpm -r typecheck` - `pnpm build` - The focused boundary test has 3 passing cases. ## Risks The main risk is accepting an unsafe workspace or retaining sensitive provider data. Tests cover root escape, host overlap, size limits, credential redaction, and completion-tool separation. ## Model Used OpenAI Codex with GPT-5.6 and repository tool use. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge