Skip to content

format code - #14

Merged
KevinHuSh merged 1 commit into
infiniflow:mainfrom
KevinHuSh:main
Dec 25, 2023
Merged

KevinHuSh merged 1 commit into
infiniflow:mainfrom
KevinHuSh:main

Conversation

@KevinHuSh

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Add corresponding issue link with summary if exists -->

Issue link:

What is changed and how it works?

Code changes

  • Has Code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

@KevinHuSh
KevinHuSh merged commit 9a003ec into infiniflow:main Dec 25, 2023
yingfeng pushed a commit that referenced this pull request Feb 5, 2024
yuzhichang added a commit to yuzhichang/ragflow that referenced this pull request Jun 16, 2026
The v3.5 commit closed 5 items in the gap analysis (§11.5.1) but
the closing tests were 'test passes, production not wired' false
positives. Post-commit review caught all 5. v3.5.1 wires them
end-to-end + 4 incidental false-positive closures that surfaced
while re-running the full suite.

Wired end-to-end (production-level):

  - service.AgentService.RunAgent: new signature
      (ctx, userID, canvasID, sessionID, version, userInput)
      <-chan orchestrator.RunEvent
    builds a RunFunc from the version DSL, drives
    orchestrator.Driver.Run. Replaces the 'Phase 5 wiring
    pending' string-channel stub.

  - handler.RunAgent: reads ?session_id= and ?user_input= (plus
    JSON body), emits one SSE frame per RunEvent.Type with a
    data: [DONE] tail on 'done'. Drops the event-clobbering
    'event: message' wrapper.

  - fixture_stubs.go:init() now registers
    newRetrievalComponent for Retrieval AND SearchMyDataset
    (OQ infiniflow#14 Python-typo alias) and newExeSQLComponent for
    ExeSQL. Replaces the stub-only path that v3.5 left in place.

  - newRetrievalComponent(params) parses the v1 DSL param
    surface (kb_ids, top_n, top_k, similarity_threshold,
    keywords_similarity_weight, rerank_id, empty_response) and
    folds them as defaults over per-call inputs in
    applyDefaults, matching Python's RetrievalParam semantics.

  - orchestrator Driver.Run: extracts the surfaceable answer
    from state.Snapshot() (answer > result > content precedence)
    instead of emitting a hardcoded 'hello' V1 placeholder.

  - LLMComponent.Invoke: re-wraps the default invoker in a
    fresh newRetryInvoker when MaxRetries or DelayAfterError is
    set on LLMParam. Honors literal MaxRetries=0 (1 attempt)
    when paired with non-zero DelayAfterError.

Incidental false-positive closures:

  - switch.go evaluateClause: added >=, <=, not contains, start
    with, end with, not empty operators + case-insensitive ==
    via equalFoldValues. The 7 TestSwitch_Operators_* tests
    were failing on v3.5.1 audit entry.

  - message.go splitSentences: changed text[prev:m[1]] to
    text[prev:m[0]+1] to stop BEFORE trailing whitespace.
    TestSplitSentences_DotBoundary / MixedPunctuation were
    failing because out[0] was 'first. ' with trailing space.

Gap analysis:

  - .claude/plans/agent-go-port-gap-analysis.md: new §11.6
    records the v3.5 false-positive audit and the v3.5.1
    production-wiring fix. v3.5.2 follow-ups (real canvas
    Compile/Invoke in RunFunc, TTS boot wiring, OQ infiniflow#6
    integration test, Phase 5d CodeExec) listed separately.

Test count delta: 1113 passed / 27 failed -> 1361 passed /
26 failed. The 26 remaining failures are pre-existing
TestDSLExamples_* fixture path errors that predate v3.5.

Co-Authored-By: Claude <[email protected]>
yuzhichang added a commit to yuzhichang/ragflow that referenced this pull request Sep 29, 2026
… and the measured query forms are named

Measured on q875/q25 (infiniflow#14 vs the successful runs): the planner's clue ran
grep and vector but never the plain bm25 keyword query that had hit the
answer document before; a bare-OR grep (Grammy|expelled|military) drowned
the answer document that a co-occurrence pattern (Grammy.*expelled)
surfaced; and an under-determined clue profile (several real people fit
the constraints) was answered by anchoring one world-knowledge candidate
instead of testing several side by side in one query. The locate section
now says the legs are complementary over one clue (two misses still owe
the third), names the conjunction form for grep against the bare-OR form,
and adds the multi-hypothesis keyword query for under-determined profiles.
Also repairs a duplicated sentence fragment in the Pattern Search entry.
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