Skip to content

Promote GT-541 to main — RAG grounding + delta-sync workflow (board 529/551)#193

Merged
beyondnetPeru merged 2 commits into
mainfrom
develop
Jul 14, 2026
Merged

Promote GT-541 to main — RAG grounding + delta-sync workflow (board 529/551)#193
beyondnetPeru merged 2 commits into
mainfrom
develop

Conversation

@beyondnetPeru

Copy link
Copy Markdown
Contributor

GT-541 (P2) — closes the RAG operational loop:

  • .github/workflows/rag-index-sync.yml: a reference/**/*.md commit triggers the delta re-embed (upsert only changed chunks + prune stale → receipt), masked provider credentials, dry-run unless a durable provider is configured.
  • The runtime now grounds before recommending: queries IKnowledgePort with the request intent and records trace.groundedBy { corpusVersion, citations }, so a recommendation is traceable to the exact indexed corpus release. KnowledgeChunk carries corpusVersion (pgvector returns rag_chunks.corpus_version). Best-effort — a corpus outage never blocks the run.

Verified: agent-runtime 123/123 (+2 grounding tests); a reference/ commit → the sync detects 2 changed files + emits a delta receipt. Guard 08 green (551/511). Board 528→529.

🤖 Generated with Claude Code

beyondnetPeru and others added 2 commits July 14, 2026 08:41
Closes the RAG operational loop:
- .github/workflows/rag-index-sync.yml: a reference/**/*.md commit triggers the delta
  re-embed (14-rag-index-sync.mjs: HEAD~1..HEAD diff → upsert only changed chunks + prune
  stale → receipt), with masked provider credentials (dry-run unless a durable provider
  is configured).
- The runtime now GROUNDS before recommending: it queries IKnowledgePort with the request
  intent and records trace.groundedBy { corpusVersion, citations }, so a recommendation is
  traceable to the exact indexed corpus release. KnowledgeChunk carries corpusVersion (the
  pgvector adapter returns rag_chunks.corpus_version). Best-effort — a corpus outage never
  blocks the governed run.

Verified: agent-runtime 123/123 (+2 grounding tests); a reference/ commit → 14-rag-index-sync
detects 2 changed files + emits a receipt (delta re-embed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…529/551)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

📊 Bilingual Coverage Impact

PR Changes

  • Paired EN/ES files modified: 2
  • New EN files needing ES translation: 0

Repository Coverage

Metric Value
Total EN files 545
Total ES files 508
Paired files 0
Coverage 0%

Good: All EN changes have ES counterparts.


Generated by GitHub Actions

@beyondnetPeru beyondnetPeru merged commit deca626 into main Jul 14, 2026
22 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ada5db663f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

node-version: '22'

- name: RAG delta sync (dry-run unless a durable provider is configured)
run: node .harness/scripts/ci/14-rag-index-sync.mjs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install pg before enabling live sync

When EVOLITH_RAG_SYNC=true and EVOLITH_RAG_PROVIDER=pgvector, the pgvector adapter lazy-imports pg, but this job runs the script immediately after setup-node with no dependency install, and pg is not declared in the lockfile. On a clean Actions runner the live path fails closed before any upsert, so the new workflow can only dry-run unless the job installs/bundles the Postgres client or injects a client.

Useful? React with 👍 / 👎.

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # HEAD~1..HEAD delta

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Diff the full pushed range

This fetches only enough history for the script's HEAD~1..HEAD diff, so a push containing multiple commits to main/develop is reduced to the last commit. If an earlier commit in the same push changes or deletes a reference/**/*.md file, the path filter still triggers the workflow, but those chunks are never upserted or pruned; fetch and diff the full ${{ github.event.before }}..${{ github.sha }} range instead.

Useful? React with 👍 / 👎.

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