Chat-linked workspace documents use conversation IDs as source scope, breaking Analyze and Compare
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- azure, python
- Ambito
- authorization, backend, databases
Direzione di ricerca
Start with application/single_app/functions_search_service.py::get_document_chunks_payload, then trace how its scope identity reaches functions_document_analysis.py, functions_document_comparison.py, and content_screening/access.py. Read the regression coverage in functional_tests/test_orchestration_internal_analysis.py and run the comparison tests after resolving the noted local OpenSSL setup issue. Done when real-boundary tests cover personal, group, public, and chat sources across Analyze, Compare, and dependency execution while preserving authorization and no-file checks.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Issue
Workspace documents uploaded through a chat can carry a conversation_id. The shared ordered-chunk payload incorrectly prefers this conversation ID over the document's authorized workspace scope ID. Downstream Analyze/Compare consumers consequently receive an inconsistent (scope, scope_id) identity.
The failure was observed in FED-04 on the React V2 application, then reproduced offline with the real shared retrieval, document analysis, comparison, and content-screening code. This is a shared product-source contract defect, not a FED-04 selector or model-specific problem.
Steps to Reproduce
- Independently upload two narrative policy revisions through a chat backed by a group workspace.
- Request a document comparison, review the
document_compareand dependent composition steps, and approve once. - Both per-document analyses complete, but the comparison source guard rejects the malformed group identity before the pairwise model call.
- Observe the comparison step as Failed and dependent composition as Skipped.
The reported scenario requested thresholds 125000 → 150000, review days 10 → 7, unchanged owner, and exact markers/citations for both revisions, without agents, actions, web, workflows, or file creation.
Expected Behavior
- Workspace scope is determined by the authorized source context: personal owner, group, or public workspace. A conversation association remains separate metadata.
- Only actual chat-scoped sources use a conversation ID as their scope ID.
- Authorized comparison and downstream composition complete with both revisions grounded and cited.
- Current authorization, screening, revision, completeness, and no-unrequested-file checks remain enforced.
Actual Behavior
In application/single_app/functions_search_service.py, get_document_chunks_payload() builds scope_id with a fallback chain that puts context/document conversation_id before public_workspace_id, group_id, or owner identity.
functions_document_analysis.py carries that scope into its raw window and document-analysis items. Its coverage entries also contain correct provenance, so their checks can pass. functions_document_comparison.py subsequently traverses the full source results using guard_model_callable; the malformed items then fail authorization in content_screening/access.py.
The explicit Analyze result path also compares this payload identity against its authorized source manifest in functions_document_analysis_results.py::build_analysis_source, so a shared boundary fix is required rather than bypassing comparison's guard.
Impact
- Offline reproduction: a group document without chat association compares successfully; the otherwise identical chat-linked group document fails with
PermissionErrorafter both summary model calls. - Chat-linked public workspace documents reproduce the same failure.
- Chat-linked personal documents also emit the wrong scope metadata, even when the legacy comparison's owner check happens to allow execution.
- Callers of the shared retrieval service, including orchestration and workflow document processing, can inherit this inconsistent identity.
Notes
Live evidence
- FED-04 attempt
repair2-20261017; failure at 2026-10-17 21:54:44 UTC. - Application telemetry reports version 0.261.344; investigation checkout is 0.261.346 and still contains the defective boundary.
- Both uploads completed, and both document analyses processed one window with zero failed windows.
- Application Insights exception stack:
run_document_compare→run_document_comparison→_run_internal_document_comparison→ guarded model callable →assert_evidence_available→_read_authorized_document→_authorize_document→PermissionError. - Executor reports
capability_id=document_compare,failure_code=result_unavailable; the run later recordscontext_unavailable. The generic retained-result message does not identify the source-scope mismatch. - The UI's Failed/Skipped states match backend telemetry; increasing the UI timeout or relaxing acceptance would hide the defect.
Validation so far
A read-only, socket/DNS-blocked probe using the existing test_support.document_analysis.document_analysis_runtime and real comparison code produced:
| Source | Conversation association | Returned scope ID | Outcome |
|---|---|---|---|
| Group | Absent | Group ID | Complete |
| Group | Present | Conversation ID | PermissionError before comparison model call |
| Public | Present | Conversation ID | PermissionError before comparison model call |
| Personal | Present | Conversation ID | Complete, but malformed scope identity |
Existing-test command, with application and functional test directories on PYTHONPATH:
python -m pytest -p test_support.cosmos_network_guard -p no:cacheprovider .\functional_tests\test_orchestration_internal_analysis.py -k comparison -q
Result: 7 passed, 56 deselected, 1 setup error. The setup error is a local dependency incompatibility: OpenSSL.crypto raises AttributeError: module 'lib' has no attribute 'GEN_EMAIL' during the Semantic Kernel import chain. It is not evidence that the product fix is validated.
Agreed scope and acceptance
- Fix source-scope construction at the shared owner and cover personal, group, public, and actual chat sources, including chat-linked workspace documents and approved shared-group access paths.
- Add real-boundary regression coverage for Analyze, Compare, and dependency execution; do not replace authorization checks with permissive mocks.
- Preserve denied/changed/held source behavior and no-file output policy.
- Leave UI-test qualifications, timeouts, retry behavior, and model/provider selection unchanged.
- Include fix documentation and an application patch-version increment; no deployment or production mutation is part of this investigation.
Triage: P1, size M, assigned to paullizer. Related orchestration work: #1509. Duplicate searches found similar generic error reports but not this source-scope defect.
- Lingua principale
- Python
- Stelle
- 157
- Fork
- 117
- Merge medio
- 4h 15m
- PR unite (30g)
- 208
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/simplechat
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/simplechat#1491 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/simplechat#1370 ·
I maintainer di solito rispondono entro 1 giorno
-
Simple Chat - NLRAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
microsoft/simplechat#1804 ·
I maintainer di solito rispondono entro 1 giorno
-
Simple Chat - NLRAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
microsoft/simplechat#1803 ·
I maintainer di solito rispondono entro 1 giorno
-
V2: triage multi-turn UI failures and make saved-memory orchestration validation reliableForse già presa @paullizer l’ha presa 1 giorno fa. Apertabug P1
microsoft/simplechat#1785 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/simplechat
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
521xueweihan/HelloGitHub#4063 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Vanilla-OS/apx-gui#112 ·
-
Devstral and Voxtral: section 5 fails in us-east-1 with 400 "Model does not support audio modality"Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws-samples/sample-per-model-bedrock#409 ·
I maintainer di solito rispondono entro 1 giorno
-
DuckDB 2.0 breaks to_pyarrow_batchesForse già presa @DG47 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ibis-project/ibis#12196 ·
I maintainer di solito rispondono entro 1 giorno