Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Chat-linked workspace documents use conversation IDs as source scope, breaking Analyze and Compare

Aperta
#1,777 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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

  1. Independently upload two narrative policy revisions through a chat backed by a group workspace.
  2. Request a document comparison, review the document_compare and dependent composition steps, and approve once.
  3. Both per-document analyses complete, but the comparison source guard rejects the malformed group identity before the pairwise model call.
  4. 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 PermissionError after 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 records context_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

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/simplechat

Tutte le issue di microsoft/simplechat

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.