Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#1,777 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
22/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
azure, python

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
157
フォーク
117
平均マージ
4時間 3分
マージ済み PR(30日)
217

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/simplechat のほかの issue

microsoft/simplechat の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。