Skip to content

I3205 — A pull request's change is split into canonical, derived and incidental paths, and the drain shows each

Classify every path a pull request changes as a canonical input, a derived projection (what .gitattributes merge=derived and the generators declare) or incidental, carry the counts on the queue's assessment, and report change amplification: how many derived files one canonical change rewrote.

BLOCKED wave 0 · p2 · implementation profile · parallel safe

Part of delivery-flow-is-measured — The way from a pull request to a verified publication is measured per phase, and its bounds are read where work starts.

Blocked. This issue cannot start until milestone:delivery-flow-is-measured is done. The status is derived from that, not declared.

Objective

Classify every path a pull request changes as a canonical input, a derived projection (what .gitattributes merge=derived and the generators declare) or incidental, carry the counts on the queue's assessment, and report change amplification: how many derived files one canonical change rewrote.

Why

On 2026-10-10 large pull requests (#807 with 706 files, #292 with 499) were unreviewable and mergeable=false dominated (c207#6); the same day another review asked how many files of a pull request are canonical versus generated, and how many open pull requests rewrite the same outputs (c216#6). It supports delivery-is-measured-per-phase and serves no criterion of the intent. Sources: chatgpt-majordomus:c207#6, chatgpt-majordomus:c216#6.

Current state

The integration model knows a pull request's changed paths and the derived merge driver knows derived files (.gitattributes, test/cases/57_derived_merge_driver.sh); nothing classifies a pull request's paths or measures amplification.

Desired state

integration.queue and integration.explain carry canonical, derived and incidental counts per pull request, derived from the declarations already in the tree; the drain screen shows them; a pull request whose only canonical change is a record is told apart from a code change.

Scope

  • apps/majordomus-cli/src/integration/model.rs
  • apps/majordomus-cli/src/integration/classify.rs
  • docs/INTEGRATION.md
  • apps/majordomus-cli/src/ui/prs.rs
  • apps/majordomus-cli/src/integration/tests.rs
  • apps/majordomus-cli/src/capability/builtin/integration.rs
  • site/content/docs/integration.md
  • docs/generated/openapi.json

Out of scope

  • Changing what is derived
  • Ranking by the counts (a later decision)

Dependencies

None. This issue is a root of the graph.

Acceptance criteria

  • The derived set is read from the tree's own declarations; no path list is written in the code
  • A fixture pull request that changes one canonical file and its projections reports 1 canonical and N derived
  • The counts are the same on CLI JSON, HTTP and MCP

Validation

  • cargo test --manifest-path apps/majordomus-cli/Cargo.toml --lib integration::
  • majordomus plan validate

Evidence required

  • test_change_split_by_kind

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Timeline

started
—
verified
—
completed
—

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I3205.yaml. Read it back with majordomus plan show I3205.

Searches the titles and descriptions of every page this site publishes.