Add end-to-end coverage for LibreSign AI integrations

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
ai, testing

調査の方向性

Start by reading the AI foundation epic and the existing LibreSign Task Processing integration and tests; the issue names no specific files or test entry points. Map the shared AI path and existing Nextcloud AI test patterns, then add deterministic coverage first and assess whether provider-contract and local-model smoke tests add unique value. Done means normal PR CI covers stable shared-path and security contracts without paid APIs or assertions on generated prose.

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

説明

Goal

Add layered end-to-end and integration coverage that proves LibreSign AI features work through the real Nextcloud integration path without making ordinary CI depend on paid APIs or unstable generated prose.

This issue is part of the AI foundation epic.

Test layers

Use three complementary layers.

1. Deterministic pull-request coverage

Use the LibreSign deterministic Task Processing provider/test double for fast, exact and reproducible behavior.

Cover representative end-to-end flows such as:

  • capability unavailable;
  • capability available and policy allowed;
  • capability available and policy denied;
  • successful task/result;
  • failure and retry/recovery behavior;
  • invalid/hostile output;
  • relevant cancellation/asynchronous behavior;
  • frontend visibility/action state follows backend capability and policy.

This layer should be suitable for normal pull-request CI.

2. Provider integration contract

Where feasible, exercise LibreSign through an official Nextcloud provider integration against a deterministic local compatible endpoint/test backend.

The purpose is to cover:

LibreSign -> OCP Task Processing -> provider integration -> provider protocol -> Task Processing result

without paid/network-dependent model calls.

Only add this layer if it materially covers behavior that the deterministic provider cannot.

3. Real local-AI smoke coverage

Use a small number of real local-provider smoke tests where this adds confidence.

Follow the patterns used by Nextcloud AI applications such as llm2:

https://github.com/nextcloud/llm2

Use CPU execution/model caching where practical and avoid making generated wording an assertion.

Real-model tests should check stable invariants such as:

  • task completes successfully;
  • expected output shape is present;
  • file/document input reaches the supported task path;
  • structured output can be parsed/validated;
  • security/policy invariants remain enforced.

Initially this layer may run on relevant paths, main/nightly or a dedicated workflow if its runtime is not appropriate for every pull request.

Context Chat precedent

For future retrieval work, follow the ACL/lifecycle style of the official Context Chat integration tests:

https://github.com/nextcloud/context_chat

That includes proving content is unavailable without access and removed from retrieval after access/delete changes.

Do not implement future Context Chat tests in this foundation issue before that feature exists.

Flake/cost policy

  • No paid API requirement for required CI.
  • No assertion on exact natural-language output from a real model.
  • Pin/cache model/test infrastructure where appropriate.
  • Keep real-model smoke scenarios few and contract-focused.
  • A provider outage must not make normal pull-request CI nondeterministic.

Security scenarios

Ensure the layered test architecture can exercise:

  • prompt-injection-like document content;
  • malformed structured output;
  • unsafe generated markup where a feature consumes markup;
  • cross-user task/result access;
  • policy denial;
  • provider absence/failure.

Feature-specific adversarial cases remain the responsibility of the feature's implementation issues.

Done when

  • Normal PR CI has deterministic end-to-end coverage of the shared AI path.
  • The Task Processing boundary is exercised beyond unit mocks.
  • Provider integration is covered where it adds unique value.
  • A focused real local-AI smoke path exists where feasible and justified.
  • Required CI does not depend on paid external AI.
  • Tests assert stable contracts rather than exact real-model prose.
  • Security/authorization failure paths are represented in the test architecture.
主要言語
PHP
スター
844
フォーク
176
平均マージ
14時間 3分
マージ済み PR(30日)
344

環境構築

Codespaces で開く

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

はじめの一歩

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

LibreSign/libresign のほかの issue

LibreSign/libresign の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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