Repository navigation
Added Part Templates - #10
Merged
Merged
Conversation
1 task done
Lowkey-wizard
added a commit
to EQUA-AI/InvenTree
that referenced
this pull request
Aug 18, 2026
…(dark) R0 foundations: attachment/media RAG config plane (4 fail-closed FEATURE_* flags + 2 bridged Django flags in the aimms_flags registry), Cohere Embed v4 client (azure-ai-inference, index-ordered responses, resolved-model pin), Gemini Embedding 2 client (explicit WIF/SA-key credentials, no os.environ mutation, auth mode enforced against the credential JSON type), pgvector registry (AttachmentIngest / AttachmentChunk vector(1536) / MediaSegment vector(3072); migrations 0018-0020, vendor-guarded CREATE EXTENSION), and create_rag_search_indexes (both Search schemas as code, HNSW cosine m4/efC400/efS500, governed-index alias refusal). R1 dark doc ingestion: fork-owned receivers (flag-gated, stamp-deduped, recorded decision-inventree#10 skips for workorder/step/repairpacket owners), sniff- first router (1024-byte head, WEBP/WAVE/junk-PDF aware, UTF-8 window trim), DI prebuilt-layout markdown extraction with page mapping (no silent pypdf fallback; explicit --allow-pypdf override only), existing deterministic chunker, client_codes scope derivation (MachinePart walk, fail-closed for clientless machines), zero-gap supersede (upsert -> is_current:false merge -> per-sha purge), purge/re-stamp receivers, docs-only backfill command with shared clients and --limit/--sleep. Hardening (post adversarial review, all 16 findings fixed; 13/13 bug probes flipped): atomic claim protocol with claimed_at fence + stale takeover (RAG_STALE_CLAIM_S) and fenced terminal writes; winner/loser by claim time with loser self-cleanup; attempts cap in every non-indexed state; stamp contract v2 (versioned, read-time mtime, flag-aware skip revival gated on MEDIA_ROUTER_HONORS_FLAG until R3); alias guard whitespace-proof across all three layers; value-free log_fault at every provider boundary; ready() config probe; page-cap exhaustion raises; scheduled sweep_attachment_rag (stale resume, ATTACHMENT_INGEST_STALLED, orphan purge) + reconcile_attachment_rag; size-gate before read with streamed skip shas; Client.code immutable at serializer/admin/ORM; boot probes cover the attachment embedding plane. Tests: ingestion 65, projection 15, embedding clients 18, config 16, pins 17, all-44-bool-flag env round-trip (companion map), flag-bridge pins, migration 0018-0020 round-trip, index-command schema/alias/dry-run suite, Client immutability, live backfill, DI success leg with page numbers, real pypdf. Verified: aichat+assets+common 448 passed, ai/core 1591 passed (only the two documented pre-existing failures), fresh sqlite migrate green, ruff clean on all touched files. Everything ships dark behind default-false flags. Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.