Introduce a pipeline metadata surface that enforces "no body content ever reaches pipeline decisions". MetaReader is an interface with four methods (getPRMeta, getEpicMeta, getIssueState, getCommentReactions), each returning a readonly DTO carrying only structural fields — state, mergeability, SHAs, branches, reaction counts, child linkage. ForgejoMetaReader projects raw Forgejo API payloads into these DTOs and drops body/description/review text before the caller can see it. Unit test mocks rich Forgejo payloads containing body, description, review_text, and comment_body, then asserts the DTO toArray output never exposes those keys — the regression fence for the RFC rule. Downstream callers (ScanForWork, ManagePullRequest) still use the raw ForgejoService today; that refactor lands under Mantis #90. Closes tasks.lthn.sh/view.php?id=89 Co-authored-by: Codex <noreply@openai.com> Co-Authored-By: Virgil <virgil@lethean.io>
18 lines
407 B
PHP
18 lines
407 B
PHP
<?php
|
|
|
|
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Core\Mod\Agentic\Pipeline;
|
|
|
|
interface MetaReader
|
|
{
|
|
public function getPRMeta(int $prNumber): PRMeta;
|
|
|
|
public function getEpicMeta(int $issueNumber): EpicMeta;
|
|
|
|
public function getIssueState(int $issueNumber): IssueState;
|
|
|
|
public function getCommentReactions(int $issueNumber, int $commentNumber): Reactions;
|
|
}
|