Skip to content

[BUG][Low] Docs Search Sync fails in forks without a Mixedbread key #128

Open

Description

@arthurianresolve

Summary

The Docs Search Sync workflow runs on a push to main in every fork. A fork without MXBAI_API_KEY reaches search_docs.py sync with an empty key and fails. The failed fork job shows this exact failure.

Why the sync is necessary

The sync is needed on upstream main: search_docs.py keeps the dsrs-docs and dsrs-code Mixedbread stores current with published documentation and Rust source, uploading changed files and removing deleted ones. The docs chat Worker uses store_search and store_grep against those stores to ground its answers. Without the upstream sync, the chat can search outdated content after docs or code changes.

Affected code

  • Docs Search Sync workflow triggers on main pushes and manual dispatches without restricting the repository, then passes secrets.MXBAI_API_KEY to the sync command.
  • search_docs.py names the two stores and exits when the key is missing. Its sync logic uploads changed files and deletes stale ones.
  • The docs chat Worker searches those stores when answering chat requests.

Suggested resolution

Add a job-level condition so the sync runs only when github.repository == 'krypticmouse/DSRs' and github.ref == 'refs/heads/main'. Fork pushes and manual runs from other branches should skip the job. Keep the existing missing-key failure on upstream main, where an absent credential means the production search index cannot be refreshed.

Acceptance criteria

  • A fork push to main skips Docs Search Sync instead of failing on an empty API key.
  • An upstream main run with the configured key continues to sync both stores.
  • An upstream main run without the key still fails visibly.
  • A manual dispatch from a non-main branch cannot update the production stores.

Validation performed

The failed fork job confirms MXBAI_API_KEY was empty. A local workflow change adding the repository and branch condition passed actionlint .github/workflows/docs-search-sync.yaml and git diff --check. No live store sync was run.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions