Skip to content

test: ingest workflow agent knowledge snapshots from SQLite - #44978

Merged
asukaminato0721 merged 1 commit into
langgenius:mainfrom
muzman123:test/knowledge-gateway-sqlite-snapshots
Oct 28, 2026
Merged

asukaminato0721 merged 1 commit into
langgenius:mainfrom
muzman123:test/knowledge-gateway-sqlite-snapshots

Conversation

@muzman123

Copy link
Copy Markdown
Contributor

Summary

Part of #44973.

Replaces fake _ScalarsSession in test_knowledge_gateway.py with real rows in the
SQLite test database, so collect_workflow_agent_knowledge_space_ids runs its actual query.

The new test saves not only two bindings but also two filters. One filter excludes a newer version of the same agent from being bound, while another filter excludes drafts with similar workflows but different knowledge spaces.

The decoy is a test case used specifically to determine whether any filters may have been compromised during the process of testing. If so, then clearly the test fails because the wrong knowledge space is returned.

Validation: all 25 tests in the file pass; ruff and pyrefly pass. Test-only change.

Screenshots

N/A (test-only change)

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've verified the change and added or updated tests where meaningful regression risk justifies coverage.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and vp staged (frontend) to appease the lint gods

@github-actions github-actions Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 28, 2026
@asukaminato0721 asukaminato0721 self-assigned this Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 79.89% 79.89% +0.00%
Strict coverage 79.58% 79.58% +0.00%
Typed symbols 76,613 76,615 +2
Untyped symbols 19,357 19,356 -1
Modules 3979 3979 0

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.53%. Comparing base (1f500e5) to head (7b4681b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #44978   +/-   ##
=======================================
  Coverage   89.52%   89.53%           
=======================================
  Files        6009     6009           
  Lines      376843   376837    -6     
  Branches    76238    76232    -6     
=======================================
+ Hits       337380   337385    +5     
+ Misses      33465    33455   -10     
+ Partials     5998     5997    -1     
Flag Coverage Δ
api 89.39% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asukaminato0721
asukaminato0721 added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 28, 2026
@asukaminato0721
asukaminato0721 added this pull request to the merge queue Oct 28, 2026
Merged via the queue into langgenius:main with commit e3d4280 Oct 28, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants