Skip to content

feat: declare ingested content as internally authored (DeclaresProvenance) - #2

Merged
lopadova merged 2 commits into
mainfrom
feat/declare-provenance
Aug 29, 2026
Merged

feat: declare ingested content as internally authored (DeclaresProvenance)#2
lopadova merged 2 commits into
mainfrom
feat/declare-provenance

Conversation

@lopadova

Copy link
Copy Markdown
Contributor

Adopts DeclaresProvenance from connector-base v1.5.0. Phase 1 of AskMyDocs ADR 0028.

Why

Ingestion records what a document is and nothing about who wrote it. That is invisible until you line up what connectors actually do: this one reads a Jira site the organisation administers — a system whose write access the organisation grants, so whoever authored a document had to be given the ability to author it. The IMAP connector's mailbox accepts a message from anyone who knows the address.

Both became documents, then chunks, then retrieval grounding on a platform that also exposes tools an agent can call — stored as the same kind of fact, with nothing marking the difference. No deployment could answer "how much of our corpus is externally authored?".

Change

public function provenanceTier(int $installationId): ProvenanceTier
{
    return ProvenanceTier::TrustedInternal;
}

Plus the ^1.5 constraint bump, a README bullet, and three tests.

"Trusted" means authored internally, not correct

Worth being explicit, because the word invites the wrong reading. An internal Jira page can be wrong, stale, or never reviewed by anyone. Whether a human vouched for a document is the Auto-Wiki curation tier's question — a separate axis that already exists. Provenance records authorship origin. A human-accepted page summarising an external email is high-curation and externally authored at once, and collapsing the two would lose the half that matters for trust decisions.

Enforcement

None yet, by design. The tier is a label: enforcement is only testable against a corpus that is already labelled, which is why ADR 0028 ships labelling first.

Adopts DeclaresProvenance from connector-base v1.5.0, labelling everything
this connector ingests ProvenanceTier::TrustedInternal.

The connector reads a Jira site the organisation administers — a system whose write access the
organisation grants. Whoever authored a document had to be given the ability
to author it, and that property is exactly what the tier records. It is the
counterpart to the IMAP connector, whose mailbox accepts a message from
anyone who knows the address; until now both were ingested as the same kind
of fact, so no deployment could say how much of its corpus was written by
outsiders.

"Trusted" is a statement about authorship, not about correctness or
curation. An internal page can be wrong, stale or unreviewed — that is the
Auto-Wiki curation tier's question, and deliberately a different one.

The tier is a label; nothing enforces on it yet. Requires connector-base
^1.5 for the capability interface.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QPJodaHYMJ3wppek7aYTBX
@lopadova
lopadova requested a lite review from Copilot August 29, 2026 01:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T01:25:58.791481Z 7c911eb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c911ebdd8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/JiraConnector.php
*/
public function provenanceTier(int $installationId): ProvenanceTier
{
return ProvenanceTier::TrustedInternal;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Do not mark customer-authored Jira content as internal

For Jira Service Management installations where portal customers create issues or comments—or projects permit anonymous/external contributors—this unconditional tier labels their content TrustedInternal. The connector synchronizes every accessible project and includes issue descriptions and all returned comments without checking their authors, so the provenance report cannot reliably distinguish externally authored material and any downstream trust policy will treat it as internal; use a conservative tier for mixed installations or derive provenance from the actual authors/access model.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adopts the DeclaresProvenance contract from askmydocs-connector-base and declares Jira-ingested content as ProvenanceTier::TrustedInternal, enabling downstream provenance labeling (Phase 1 of ADR 0028) without enforcement changes yet.

Changes:

  • Implement DeclaresProvenance on JiraConnector and return ProvenanceTier::TrustedInternal from provenanceTier().
  • Bump padosoft/askmydocs-connector-base dependency constraint to ^1.5.
  • Add unit tests and README documentation describing the connector’s provenance stance.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/JiraConnector.php Implements provenance declaration via DeclaresProvenance and returns TrustedInternal.
tests/Unit/ProvenanceDeclarationTest.php Adds coverage asserting the connector declares provenance and returns a stable tier.
README.md Documents the new provenance declaration behavior.
composer.json Updates dependency constraint to padosoft/askmydocs-connector-base: ^1.5.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +11 to +12

final class ProvenanceDeclarationTest extends TestCase
Comment thread README.md
- 🏢 **Per-tenant isolated** — every credential read and ingestion dispatch is scoped to the active `TenantContext`.
- 🧪 **Test-friendly** — pure-PHP unit tests for the ADF converter + JQL builder, `Http::fake()` feature tests for the connector, opt-in live test against a real Atlassian sandbox cloud when `CONNECTOR_JIRA_LIVE=1`.

- **Provenance declaration** — implements `DeclaresProvenance` (connector-base ^1.5), labelling ingested content `TrustedInternal`: a Jira site the organisation administers, so whoever wrote a document had to be granted the ability to write it. A statement about *authorship*, not about correctness — see the IMAP connector for the contrasting case.
Comment thread composer.json
"illuminate/http": "^12.0|^13.0",
"illuminate/contracts": "^12.0|^13.0",
"padosoft/askmydocs-connector-base": "^1.3"
"padosoft/askmydocs-connector-base": "^1.5"
Pint's ordered_imports fixer flagged the two `use` lines added with the
provenance declaration: they were written with LF into a file the checkout
keeps as CRLF, so the run reported them as mis-ordered. No code change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QPJodaHYMJ3wppek7aYTBX
@lopadova
lopadova merged commit 24b76d2 into main Aug 29, 2026
7 checks passed
@lopadova
lopadova deleted the feat/declare-provenance branch August 29, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants