Skip to content

docs(sie): apply superlinked/sie#241 review fixes across codebase - #234

Merged
neomatrix369 merged 3 commits into
mainfrom
docs/sie-setup-pr241-amendments
Oct 7, 2026
Merged

neomatrix369 merged 3 commits into
mainfrom
docs/sie-setup-pr241-amendments

Conversation

@neomatrix369

@neomatrix369 neomatrix369 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Applies all actionable review comments from superlinked/sie#241 to rag-params-finder.

  • 504 retryable error: added "504" and "gateway timeout" patterns to _is_retryable_sie_error() in sie_embedder.py so gateway timeouts are retried rather than treated as terminal failures
  • HF_TOKEN optionality: documented as Docker path only, optional for ungated models (BGE-M3, Stella-v5), required for gated models (naver/splade-v3) across sie-setup.md, .env.example, and configuration.md
  • Poll loop subshell wrapping: verified ( ... ) wrapper present in sie-setup.md poll block so exit 1 does not close interactive terminals; documented in-line
  • Both SIE deployment paths (remote gateway + self-hosted Docker) covered in README.md and sie-setup.md
  • MongoDB index scope: vector_index_1024 + text_search_index on chunks collection confirmed in sie-setup.md and mongodb-setup.md
  • MONGODB_ATLAS_LOCAL_URI (not MONGODB_URI) — project already uses the correct split variable names
  • Test coverage: added test_embed_documents_retries_on_504_like_errors to match the existing 503 retry test (flagged by nw-software-crafter-reviewer)

Test Results

Backend

888 tests, 0 failures — coverage 75.8% (floor 70%)

All 11 quality-gate steps passed (./scripts/ci/quality-gates.sh): repo lint, ruff, mypy, bandit, pytest + coverage, pip-audit, xenon complexity, frontend lint/test/typecheck/build.

Pre-push gates passed on 386794a.

Quality Gates

Gate Status
Repo lint (shellcheck, actionlint, markdownlint) ✅
Backend lint (ruff) ✅
Backend format (ruff) ✅
Backend type check (mypy) ✅
Backend SAST (bandit) ✅
Backend tests + coverage (888 tests, 75.8%) ✅
Python dependency audit (pip-audit) ✅
Complexity (xenon) ✅
Frontend lint (eslint) ✅
Frontend tests (vitest) ✅
Frontend typecheck + build ✅

Reviewer verdicts

  • nw-documentarist-reviewer: PASS — HF_TOKEN optionality consistent across 3 surfaces, 502/503/504 prose and code aligned, subshell wrapping correct, DIVIO classification sound
  • nw-software-crafter-reviewer: PASS (after adding 504 test) — retry logic correct, 502 exclusion correct, exponential backoff sound

🤖 Generated with Claude Code

Complexity

Automatically refreshed by CI for product-code changes.

Scope Tool Result
Python Radon highest CC 40 (rank E), 856 blocks
JS/TS ESLint 15 function(s) above CC 10
JS/TS ESLint sonarjs 5 function(s) above cognitive 15
Functions above the JavaScript threshold
  • ExperimentDetailScreen.tsx:45 — CC 118
  • SearchExplorerScreen.tsx:35 — CC 38
  • labels.ts:35 — CC 29
  • ExplorePanels.tsx:391 — CC 29
  • LoadingFeedbackPanel.tsx:41 — CC 28
  • ExperimentsScreen.tsx:67 — CC 20
  • VectorDbStatsPanel.tsx:83 — CC 18
  • ExplorePanels.tsx:226 — CC 15
  • ExperimentsScreen.tsx:516 — CC 15
  • ExperimentControlButtons.tsx:54 — CC 14
Functions above the cognitive-complexity threshold
  • ExperimentDetailScreen.tsx:45 — cognitive 63
  • LoadingFeedbackPanel.tsx:41 — cognitive 27
  • labels.ts:35 — cognitive 25
  • ExplorePanels.tsx:391 — cognitive 23
  • SearchExplorerScreen.tsx:35 — cognitive 17

Two amendments from the upstream SIE PR #241 review (code-owner @fm1320
and CodeRabbit) that were missing from the project's own user-facing guide:

1. Bounded poll loop: replace unbounded `until` loop in Step 3 with a
   60-attempt cap (40 s × 60 ≈ 40 min). 502 exits immediately as a terminal
   load failure; 503/504 are treated as retryable. Loop wrapped in a subshell
   so that `exit 1` does not close an interactive terminal when pasted.

2. HF_TOKEN optionality: soften "required for model downloads" to "optional
   for ungated models (BGE-M3, Stella-v5); required for gated models such as
   naver/splade-v3" — updated prerequisites table, Path B summary row, Step B
   note, and Path B setup checklist.
…504 retryable

Apply remaining gaps identified by post-merge sync-docs audit against superlinked/sie#241:

- .env.example: mark HF_TOKEN optional for ungated models (BGE-M3, Stella-v5);
  required for gated models (e.g. naver/splade-v3); harmonise "Docker path only"
  wording across both comment lines
- docs/user-guide/configuration.md: same optionality note at the commented env block
  (line 558) and the env-var reference table (line 665)
- server/core/embedding/sie_embedder.py: add "504" and "gateway timeout" to
  _is_retryable_sie_error() — 504 was documented as retryable but missing from code

Reviewed and approved by nw-documentarist-reviewer (PASS) and
nw-software-crafter-reviewer (PASS) before commit.
@neomatrix369 neomatrix369 changed the title docs(sie): apply superlinked/sie#241 review fixes to sie-setup.md docs(sie): apply superlinked/sie#241 review fixes across codebase Oct 7, 2026
nw-software-crafter-reviewer flagged that the 504 addition in
_is_retryable_sie_error() had no test proving the path executes.
Mirrors test_embed_documents_retries_on_503_like_errors exactly,
using "504 Gateway Timeout" as the transient error.
@neomatrix369
neomatrix369 merged commit 6faf438 into main Oct 7, 2026
7 checks passed
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