Skip to content

fix: resolve TODO/FIXME markers across tool handlers and providers - #74

Merged
AnzoBenjamin merged 2 commits into
mainfrom
feat/task-memory-evidence-pipeline
Sep 6, 2026
Merged

fix: resolve TODO/FIXME markers across tool handlers and providers#74
AnzoBenjamin merged 2 commits into
mainfrom
feat/task-memory-evidence-pipeline

Conversation

@AnzoBenjamin

@AnzoBenjamin AnzoBenjamin commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Addresses TODO/FIXME markers across the codebase:

  • find-files.ts: made COLLECT_FULL_FILE_CONTEXT configurable per-repo via env var or openbuff.json; renamed incomplete upload function with documenting TODO
  • spawn-agent-inline.ts: clarified context-pruner onResponseChunk comment
  • tool-executor.ts: extracted git-committer gate filter into filterSpawnAgentsGate + resolveSpawnGateAbort helpers
  • openai-compatible-chat-language-model.ts: restored Chunk type safety in stream transform
  • openrouter-ai-sdk/chat/index.ts: added provider-defined tool support

This change is Reviewable

… refusals

Widen the OS-temp exception from an openbuff-owned name gate to any path strictly inside a temp root (os.tmpdir() plus /tmp on POSIX), reads AND writes, and close the gaps that widening opens.

- Owned-temp write exemption for file-changing tools via OWNED_TEMP_WRITE_EXEMPT_TOOLS in tool-executor.ts; external-read allowlist stays read-only and code_search/glob/find_files_matching_content temp cwds stay hard-blocked because their handlers do not contain.

- New fail-closed mandatory-sensitive refusal (lexical + dereferenced + Win32-aliased, both scopes) keeps <tmp>/.env, credentials.json, private keys, and path-aware carriers like .aws/config unreachable for reads and writes.

- Win32 trailing dot/space alias guards in all four resolvers and in ownedTempMutationRefusal: a lexical payload.sh (trailing space/dot) whose raw extname misses OWNED_TEMP_REFUSED_EXTENSIONS can no longer stage an executable, clobber openbuff-*.log job artifacts, or forge tmux-captures-* evidence on Windows.

- ownedTempMutationRefusal now also refuses interpreter-executed extensions (.js/.mjs/.cjs/.jsx/.ts/.tsx/.mts/.cts/.py/.pyw/.pl/.rb/.lua/.php/.r/.jl/.tcl) so write_file /tmp/x.js followed by node /tmp/x.js cannot execute staged code under terminal profiles that permit node <file> (create/overwrite/move refused; delete stays allowed for cleanup).

- Fix findOutsideAbsolutePath false positive where a bare / inside a quoted sed/awk expression delimiter ('s/^/X /') was treated as an absolute path operand; re-refuse quoted root-only operand of filesystem-mutating executables (rm -rf '/', cp x '/').

- Consolidate duplicated containment fixtures (makeOutsideRoot/outsideRootsUsable/removeScratchParentIfEmpty) into common/src/testing/fixtures/containment-fixtures.ts, re-export from common/src/testing/index.ts, rewire six consuming suites, add ./testing and ./testing/* export-map entries in common/package.json, and gitignore .containment-test-scratch/ so escape-target fixtures sit outside both boundaries.

- Drop dead OWNED_TEMP_SEGMENT_PATTERNS_FS_AWARE re-export alias; import OWNED_TEMP_SEGMENT_PATTERNS directly from common and reuse isOwnedTempPathForFileSystem instead of a private fs-aware duplicate.

- Add truthful knowledge-refresh entries documenting the widening and the quoted-slash terminal fix.
Make COLLECT_FULL_FILE_CONTEXT configurable per-repo via OPENBUFF_COLLECT_FULL_FILE_CONTEXT env var or openbuff.json, and rename the upload stub to prepareExpandedFileContextForTraining with a documenting TODO about the missing upload mechanism. Extract the git-committer gate filter into filterSpawnAgentsGate/resolveSpawnGateAbort so it is unit-testable and reusable. Restore Chunk type safety in the OpenAI-compatible stream transform by capturing this.chunkSchema in the closure. Add provider-defined tool support in the OpenRouter mapping. Clarify context-pruner onResponseChunk comment.
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openbuff Ready Ready Preview, v0 Sep 6, 2026 2:14pm UTC

@AnzoBenjamin
AnzoBenjamin merged commit cb151bf into main Sep 6, 2026
16 checks passed
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