Skip to content

ci(codex): update search index and block tags - #14

Merged
jddunn merged 1 commit into
masterfrom
ci/codex-index
Oct 21, 2026
Merged

jddunn merged 1 commit into
masterfrom
ci/codex-index

Conversation

@jddunn

@jddunn jddunn commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

The search index files built from 8041bea by run https://github.com/framerslab/codex/actions/runs/39584174987: codex-index.json, codex-search.json, codex-report.json and codex-blocks.json.

master is protected, so the index reaches it through this pull request. The Build and Publish Codex Index workflow opens and updates it with FRAMERS_BUMP_TOKEN, so its Test Suite and rename-guard run; landing-follows-the-bump-checks.yml labels it landing once both pass on its head, and it lands after its review comments are read, answered and resolved. A later run replaces this branch with its own build, and closes the pull request when the index no longer differs from master's.

Summary by Sourcery

CI:

  • Refresh the generated Codex search index and report artifacts.

@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Sorry @jddunn, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 16 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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
📝 Code Review ✅ Completed 2026-10-21T08:27:03.606452Z 3167841 PR opened
ℹ️ 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.

@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This CI-generated pull request refreshes the Codex index artifacts from commit 54c66d9, changing indexed content and report metadata while removing one search entry; review should focus on whether the generated outputs match the source revision and workflow expectations.

File-Level Changes

Change Details Files
Regenerate the Codex search/index artifacts from the specified source revision, updating indexed content and generated reporting metadata.
  • Refresh the main Codex index data.
  • Update generated search and report artifacts, including removal of one search entry.
  • Review the generated JSON as build output rather than hand-authored logic.
codex-index.json
codex-report.json
codex-search.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 3 billable files and costs up to $0.75.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 47 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 94 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 5add5cdd-c757-45b4-960f-c2d6dfca4e86
📥 Commits

Reviewing files that changed from the base of the PR and between 8041bea and 4901545.

📒 Files selected for processing: 3
  • codex-index.json
  • codex-report.json
  • codex-search.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Refresh Codex search artifacts and block-tagging metadata

✨ Enhancement 🕐 10-20 Minutes

Grey Divider

AI Description

• Refresh generated search artifacts so published results reflect the latest indexed content.
• Update tutorial tags and category scores, including new test and branch skill tags.
• Carry the artifacts through a PR because master is protected.
Diagram

graph TD
  Docs["Indexed content"] --> Indexer(["Codex indexer"]) --> Index["Codex index"] --> SearchBuilder(["Search builder"]) --> Search["Search artifact"]
  Indexer --> Report["Analytics report"]
Loading
High-Level Assessment

Publishing the existing generated artifacts through a PR fits protected master and permits the required checks and review. Rebuilding only one artifact would risk inconsistency with the index; no generator or publishing-strategy change is warranted by this diff.

Files changed (3) +115 / -103

Other (3) +115 / -103
codex-index.jsonRefresh indexed metadata and document search text +78/-76

Refresh indexed metadata and document search text

• Advances indexing timestamps and recalculates metadata for indexed documents. The block-tagging tutorial gains test and branch skill tags, while indexed development and re-catalog guides reflect their PR-based publishing instructions.

codex-index.json

codex-report.jsonRefresh category and skill scoring report +36/-26

Refresh category and skill scoring report

• Updates category scores for the block-tagging tutorial and two guides, and adds test and branch skill entries for the tutorial. The recorded indexing duration also changes.

codex-report.json

codex-search.jsonRegenerate the static search artifact +1/-1

Regenerate the static search artifact

• Replaces the single-line generated search JSON with the build output accompanying the refreshed Codex index.

codex-search.json

@github-actions github-actions Bot added the landing Checks and guards passed; lands after the comment pass label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Guards passed on 4901545:

  • Test Suite, run 39584473337
  • rename-guard, run 39584473529

Labelled landing: this pull request lands after its review comments are read, answered and resolved. No workflow merges it.

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Two guides lose keyword search matches ✓ Resolved
Description
The updated content for the development guide ends at SQL Cache Arch because auto-index.js
keeps only the first 5,000 characters, and the search builder tokenizes that truncated field rather
than the source document. The re-catalog guide likewise ends at Only auto-gener, so this build
drops the previously indexed architecture and generated terms from those guides' keyword-search
postings.
Code

codex-index.json[53049]

+    "content": "# Frame Codex Development Guide\n\n## Initial Setup & Cataloging\n\n### First-Time Setup\n\n1. **Install Dependencies**\n```bash\ncd apps/codex\nnpm install\n```\n\n2. **Run Initial Catalog** (categorizes ALL existing content)\n```bash\nnpm run index -- --validate\n```\n\nThis will:\n- Scan all markdown files in `weaves/`, `docs/`, `wiki/`\n- Extract keywords using TF-IDF\n- Auto-categorize using NLP (no LLM, pure statistical)\n- Generate `codex-index.json` (searchable index)\n- Generate `codex-report.json` (analytics)\n- Output validation errors/warnings/suggestions\n\n**First run takes ~30 seconds for 100 files**\n\n### How It Works Subsequently\n\n**Automatic on Every PR Merge:**\n\n1. GitHub Actions triggers `build-index.yml` on push to `main`\n2. Runs `npm run index -- --validate` (static NLP only)\n3. Generates updated index files\n4. Pushes to `index` branch for consumption\n5. **No AI/LLM calls** - pure TF-IDF, n-grams, vocabulary matching\n\n**Static NLP Tools Used:**\n- **TF-IDF**: Keyword extraction (no external API)\n- **N-gram extraction**: Common phrases (local computation)\n- **Vocabulary matching**: Controlled taxonomy (regex/string matching)\n- **Readability scoring**: Flesch-Kincaid (formula-based)\n- **Sentiment heuristics**: Simple keyword patterns\n\n**Cost: $0** - All processing is local/in-CI\n\n---\n\n## Environment Variables & Secrets\n\n### Required GitHub Secrets\n\nAdd to `framerslab/codex` repository settings:\n\n```bash\n# Required for the Trusted Weavers workflow (approves validated PRs)\nGH_PAT=ghp_xxxxxxxxxxxxxxxxxxxx  # GitHub Personal Access Token (repo scope)\n\n# AI Enhancement (OPTIONAL - only if you want AI-powered PR analysis)\nOPENAI_API_KEY=sk-x*****************xx\n\n# Configuration (optional)\nAI_PROVIDER=disabled  # Set to 'disabled' to skip AI entirely\n```\n\n### Secret Configuration\n\n**To enable AI enhancement:**\n```bash\nOPENAI_API_KEY=sk-...\n```\n\n**To label re-catalog PRs for landing** (exported in the shell that runs the re-catalog script):\n```bash\nexport AUTO_CATALOG_LAND=true\n# Default: false. The label marks the PR as checked; it lands after its review comments are read.\n```\n\n**To disable AI enhancement:**\n```bash\nAI_PROVIDER=disabled\n# Or just don't set OPENAI_API_KEY\n```\n\n### Local Development\n\nCreate `.env` in `apps/codex/`:\n\n```bash\n# Optional - only for testing AI enhancement locally\nOPENAI_API_KEY=sk-...\n# or\nANTHROPIC_API_KEY=sk-ant-...\nAI_PROVIDER=openai\n```\n\n**Note:** The indexer and validator work WITHOUT any API keys. AI is only for optional PR enhancement.\n\n---\n\n## Triggering a Full Re-Catalog\n\n### Method 1: Automated Script (Recommended)\n\n```bash\ncd apps/codex\nchmod +x scripts/retrigger-full-catalog.sh\n\n# Dry run first (see what would change)\n./scripts/retrigger-full-catalog.sh --dry-run\n\n# Create PR with changes (requires manual approval)\n./scripts/retrigger-full-catalog.sh\n\n# Label the PR for landing (one-time override)\n./scripts/retrigger-full-catalog.sh --land\n```\n\n**What it does:**\n1. Runs full static NLP analysis on ALL files\n2. Creates branch: `catalog/full-reindex-{timestamp}`\n3. Commits updated index files\n4. Creates PR with detailed summary\n5. **Waits for review**: with `AUTO_CATALOG_LAND=true` or `--land`, and when the indexer skipped no file, it adds the `landing` label and one comment; a maintainer lands it after its review comments are read\n\n**Requirements:**\n- `GH_PAT` environment variable\n\n### Method 2: GitHub Actions Trigger\n\n```bash\n# Via GitHub CLI\ngh workflow run build-index.yml --repo framerslab/codex\n\n# Or via web UI\n# Go to: https://github.com/framerslab/codex/actions/workflows/build-index.yml\n# Click \"Run workflow\" → \"Run workflow\"\n```\n\n**What it does:**\n- Runs indexer in CI\n- Pushes directly to `index` branch (no PR)\n- Updates live immediately\n\n### Method 3: Local Re-Index\n\n```bash\ncd apps/codex\nnpm run index -- --validate\n\n# Review changes\ncat codex-report.json | jq '.summary'\n\n# Commit on a branch and open a pull request: master is protected, so a change reaches it\n# through a pull request whose Test Suite and rename-guard checks pass\ngit switch -c chore/re-index\ngit add codex-index.json codex-report.json\ngit commit -m \"chore: re-index all content\"\ngit push -u origin chore/re-index\ngh pr create --base master --fill\n```\n\n**See full guide:** [RECATALOG_GUIDE.md](./RECATALOG_GUIDE.md)\n\n---\n\n## Search Artifacts (BM25 + MiniLM embeddings)\n\nFrame.dev’s advanced search UI consumes a separate static artifact, `codex-search.json`, which contains:\n\n- BM25 postings (term → docId, term frequency)\n- Document metadata (path, weave, loom, summary, doc length)\n- Packed Float32 embeddings (all-MiniLM-L6-v2, mean pooled, normalized)\n\nGenerate it after the main index:\n\n```bash\ncd apps/codex\nnpm run build:search\n\n# Commit alongside codex-index.json to publish updated search data\ngit add codex-search.json\n```\n\nThis command uses `@xenova/transformers` entirely in Node.js (no Python, no API keys) and produces a fully static JSON blob that can be hosted on GitHub Pages or any CDN.\n\n---\n\n## SQL Cache Arch",
Evidence
The changed index entries now stop inside the only occurrences of these words in their respective
source guides. The indexer imposes the 5,000-character cutoff, and the search builder constructs
term frequencies and postings from that already-truncated content.

codex-index.json[53049-53049]
codex-index.json[53457-53457]
docs/DEVELOPMENT.md[189-189]
docs/RECATALOG_GUIDE.md[205-205]
scripts/auto-index.js[862-862]
scripts/build-search-index.mjs[157-176]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The updated documentation crosses the index's 5,000-character content cutoff in the middle of searchable words. The generated search artifact consequently loses keyword postings for two guides.
## Fix Focus Areas
- scripts/auto-index.js[862-862]
- scripts/build-search-index.mjs[157-176]
- codex-index.json[53049-53049]
- codex-index.json[53457-53457]
## Recommended Fix
Give the search builder enough source text to index these terms, preferably by using the source documents rather than the display-content excerpt. Apply any remaining length limit at a word boundary, regenerate the affected artifacts, and check that both guides retain their expected term postings.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread codex-index.json Outdated
jddunn added a commit that referenced this pull request Oct 21, 2026
The postings came from the index's content field, a document's first 5,000 characters, so a term past that point never
found its document, the cut kept a fragment of the word it fell in as a term, and an edit near a guide's top pushed terms
out of search: the index of #14 no longer finds docs/DEVELOPMENT.md by architecture or sqlite3, nor
docs/RECATALOG_GUIDE.md by generated or reviewing. buildPostings reads each listed document under the root as
scripts/auto-index.js parses it, the body after the frontmatter for Markdown and the whole file for YAML. A document it
cannot read there, or whose path leads outside the root, keeps the content field's postings, with a warning naming it.
The embeddings read the same text as before.
@github-actions github-actions Bot added landing Checks and guards passed; lands after the comment pass and removed landing Checks and guards passed; lands after the comment pass labels Oct 21, 2026
@jddunn
jddunn merged commit efee4af into master Oct 21, 2026
12 checks passed
@jddunn
jddunn deleted the ci/codex-index branch October 21, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

landing Checks and guards passed; lands after the comment pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant