Skip to content

feat(cli): accept text knowledge-base files with any extension - #924

Merged
kmbroai merged 2 commits into
mainfrom
fix/text-knowledge-base
Sep 14, 2026
Merged

kmbroai merged 2 commits into
mainfrom
fix/text-knowledge-base

Conversation

@kmbroai

@kmbroai kmbroai commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

--knowledge-base rejects JSON, SARIF, and other text files solely because of their extension. Accept UTF-8 text files with any extension, including extensionless files, through the existing CLI option and shared SDK loader.

Changes

  • Probe additional files discovered in directories for UTF-8 text; skip unsupported binary content and reject it when supplied explicitly.
  • Preserve PDF/DOCX extraction, errors for malformed document formats, symlink handling, deduplication, and cleanup.
  • Update documentation, and cover direct files, recursive discovery, binary inputs, and preflight validation.

Testing

Validation before the help-text-only revert:

  • bun test --timeout 30000 tests-ts/knowledge-base.test.ts: 16 passed.
  • pnpm run types: passed.
  • pnpm run format: passed.
  • Full pnpm run test: 2,996 passed, 50 skipped, 12 local environment failures. The failures came from unrelated parent-directory Git metadata in authentication tests and a Git-version difference in a malformed-config policy test; both reproduced on unchanged main. The two affected files passed on targeted reruns with system Git and separate working and temporary directories (60 authentication tests and 60 policy tests).
  • Hosted CI passed on 4846c02, including Linux, macOS, Windows, installed-package checks, and security review.

The follow-up restores src/cli.ts exactly to the base version; its formatting check passed.

Risk and rollout

Existing directory inputs will include text files that were previously ignored. No new commands, flags, or defaults are introduced. The shared loader also supplies policy generation and severity-classification context.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the enhancement New feature or request label Sep 14, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-14T13:59:34.157144Z d23aa87 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kmbroai
kmbroai merged commit b215a25 into main Sep 14, 2026
99 of 116 checks passed
@kmbroai
kmbroai deleted the fix/text-knowledge-base branch September 14, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants