Repository navigation
Conversation
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-11-27 07:17:50.135148611 +0000
+++ /tmp/pyrefly_pr.txt 2026-11-27 07:17:38.826994926 +0000
@@ -2441,27 +2441,27 @@
ERROR Cannot index into `object` [bad-index]
--> tests/unit_tests/controllers/service_api/test___init__.py:775:12
ERROR Argument `() -> Session` is not assignable to parameter `session_factory` with type `sessionmaker[@_]` in function `sqlalchemy.orm.scoping.scoped_session.__init__` [bad-argument-type]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:121:27
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:123:27
ERROR Missing argument `app_model` in function `protected_view` [missing-argument]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:291:36
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:293:36
ERROR Missing argument `app_model` in function `protected_view` [missing-argument]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:366:61
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:368:61
ERROR Missing argument `end_user` in function `protected_view` [missing-argument]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:366:61
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:368:61
ERROR Missing argument `app_model` in function `protected_view` [missing-argument]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:523:36
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:525:36
ERROR Object of class `NoneType` has no attribute `last_used_at` [missing-attribute]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:527:16
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:529:16
ERROR Argument `Literal['abnormal']` is not assignable to parameter `value` with type `AppStatus | SQLCoreOperations[AppStatus]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:562:28
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:564:28
ERROR Object of class `NoneType` has no attribute `tenant_id` [missing-attribute]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:995:16
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:997:16
ERROR Object of class `NoneType` has no attribute `dataset_ids` [missing-attribute]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:996:16
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:998:16
ERROR Object of class `NoneType` has no attribute `dataset_ids` [missing-attribute]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:1099:16
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:1105:16
ERROR Object of class `NoneType` has no attribute `last_used_at` [missing-attribute]
- --> tests/unit_tests/controllers/service_api/test_wraps.py:1101:16
+ --> tests/unit_tests/controllers/service_api/test_wraps.py:1107:16
ERROR Argument `list[Unknown]` is not assignable to parameter `llm_response` with type `Generator[LLMResultChunk]` in function `core.agent.output_parser.cot_output_parser.CotAgentOutputParser.handle_react_stream_output` [bad-argument-type]
--> tests/unit_tests/core/agent/output_parser/test_cot_output_parser.py:56:71
ERROR No matching overload found for function `str.join` called with arguments: (list[AgentScratchpadUnit.Action | str]) [no-matching-overload]
|
Contributor
Pyrefly Type Coverage
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #45247 +/- ##
==========================================
+ Coverage 90.55% 90.60% +0.04%
==========================================
Files 6615 6635 +20
Lines 411627 413534 +1907
Branches 82518 82674 +156
==========================================
+ Hits 372759 374678 +1919
+ Misses 32473 32463 -10
+ Partials 6395 6393 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
XiaoBa-Yu
force-pushed
the
codex/scoped-dataset-list
branch
2 times, most recently
from
November 1, 2026 10:54
93a2ae7 to
06699bf
Compare
XiaoBa-Yu
marked this pull request as ready for review
November 1, 2026 11:05
XiaoBa-Yu
requested review from
JohnJyong,
QuantumGhost,
crazywoola and
laipz8200
as code owners
November 1, 2026 11:05
XiaoBa-Yu
force-pushed
the
codex/scoped-dataset-list
branch
3 times, most recently
from
November 5, 2026 03:22
a3f71d8 to
2e60f77
Compare
XiaoBa-Yu
force-pushed
the
codex/scoped-dataset-list
branch
from
November 17, 2026 06:22
2e60f77 to
a5022e4
Compare
Allow legacy-only and mixed knowledge API keys to discover their authorized Classic dataset IDs through the collection read endpoint. Reuse the upstream DatasetServiceApiGrant query boundary before search, pagination and counting. Keep KnowledgeFS-only keys forbidden on the legacy collection, including mixed keys whose last Classic binding has been removed. Preserve workspace key visibility and all other operation/resource-token admission rules. Cover the registered route with SQLite regressions for tenant and resource isolation, member-private datasets, RBAC/include_all, mixed scopes, revoked bindings and empty search results. Update API and scope documentation.
XiaoBa-Yu
force-pushed
the
codex/scoped-dataset-list
branch
from
November 27, 2026 07:16
a5022e4 to
47ce11b
Compare
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.
Fixes #45246
Summary
Integrations holding a knowledge API key scoped to Classic datasets cannot discover their authorized dataset IDs:
GET /v1/datasetsreturns 403. This change lets a key with Classic bindings list only those datasets, reusing theDatasetServiceApiGrantquery boundary introduced by #44840.include_allcannot widen it.This intentionally revises collection rejection for keys with Classic dataset bindings from #37569. No migration, frontend behavior change or response-schema change is required. The API description and scope documentation are updated.
Validation
include_all, member-private authorized datasets, unbound Owner datasets, cross-tenant isolation, search and pagination.make type-check-core,make lint, staged test-double guard andgit diff --checkpassed.Tests use temporary SQLite resources, real tag queries and response serialization. Token identity lookup and external model configuration are replaced at test boundaries; scope resolution and query filtering are real. Production databases and running services were not used. Container integration tests are CI-owned; the latest revision's remote CI result must be checked separately.
Screenshots
N/A — backend authorization behavior only; the existing response shape is preserved.
Checklist
make lintandmake type-check-core). Frontend checks are N/A for this backend-only behavior change.From Codex