Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 13:30 UTC
fix(docs): make semantic artifact freshness advisory in PR checks (#4436)
## Summary Editing an indexed docs page makes the checked-in semantic artifact stale, causing `Docs - Tests` to fail until a credentialed rebuild commits new embeddings. Make freshness advisory in PR checks so docs changes can proceed while the existing refresh workflows rebuild the artifact. ## Changes - Add `--allow-stale` to the PR semantic check. Stale artifacts emit a warning; missing artifacts and integrity failures still fail the check. - Validate artifact integrity before reporting freshness mismatches, so stale content cannot hide corrupt vectors or invalid records. - Keep rebuild workflows and runtime validation strict. Search uses its existing keyword fallback until a fresh artifact is available. - Document the contributor workflow and add regression coverage for freshness, corruption, and CI wiring. ## Type of change - [x] Bug fix - [x] Documentation ## How Has This Been Tested? Run from `docs/` with Bun 1.4.2: - `bun test tests/static/kb-semantic-artifact.test.ts tests/static/kb-update-workflow.test.ts tests/static/knowledge-search.test.ts`: 72 passed. - `bun run test`: 567 passed; one analytics test could not open its local HTTP server in the sandbox. `bun test tests/static/kb-query-analytics.test.ts` passed all 14 tests when rerun with permission to listen. - `bun run types:check`: passed. - `bun run lint`: passed with existing warnings. - `bun run check:kb-semantic` and `bun run check:kb-semantic --allow-stale`: passed for the current artifact. - CLI smoke checks with temporary artifact changes confirmed that stale content exits 1 in strict mode and exits 0 with a GitHub warning in advisory mode. A stale artifact with corrupt vector data still exits nonzero. The original artifact was restored. ## Checklist - [x] Ran linters and tests locally, with results recorded above - [x] Updated documentation - [x] Added regression tests - [x] Changeset not required: docs-site and CI changes only ## Additional context Merging stale embeddings temporarily reduces search to keyword retrieval until a refresh lands. Embeddings are still generated by the existing background workflows, without adding API calls to ordinary PR checks or generating the corpus during search requests.
No changes.