Validate Content product impact in pull requests - #2520
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Here's a visual recap of what changed: Open the full interactive recap |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Code Review Summary
This revision fixes the remaining fork pull-request reliability issue by adding a dedicated step that fetches the exact upstream target SHA into the candidate repository before the trusted controller computes the merge base. The workflow now separates the immutable controller from inert candidate data, uses pinned actions and a hosted runner, enforces read-only permissions and exact revisions, and validates the new fetch command through the workflow guard. The snapshot checker continues to validate isolated base/head materializations and clean them up reliably. Risk: High, due to CI execution and revision-boundary security, but no confirmed high- or medium-severity issues remain.
Review Result
- ✅ Previous fork base-revision finding is fixed; its stale review thread was resolved.
- ✅ Four independent agents found no additional confirmed issues.
- ✅ The concern about iterating all files returned by
git ls-treeis not a confirmed vulnerability: Git tree paths are repository-controlled valid paths, snapshot files are intentionally materialized for linked assets, and the temporary destination is isolated.
🧪 Browser testing: Skipped — PR only modifies backend/config/docs/tests, no UI impact.

Problem
PR #2511 gave Content a repository-native product graph: stable Feature and Capability IDs, explicit lifecycle states, and deterministic catalog validation. Future pull requests still have no consistent way to say which of those accepted contracts they affect or whether they also change a product record.
Inferring impact from transitive imports would make ordinary framework, dependency, CI, and infrastructure work look like Content work. Leaving the question entirely to prose or an agent verdict would be inconsistent and too subjective to enforce. Contributors need a small deterministic declaration and reviewers need exact, repairable findings before any stronger policy is considered.
Approach
Add a two-week advisory pull-request check that asks materially Content-affecting changes to declare their product lane, exact Feature and Capability IDs, record obligation, and proof. The check validates those references against the product graph, compares Feature and Capability state across the pull request's merge base and exact head, and reports deterministic findings without blocking the pull request.
Applicability is intentionally bounded. Direct changes to Content-owned product surfaces enter automatically. Shared-framework changes remain quiet unless they include direct Content evidence, introduce a deterministic Content contract failure, or carry a valid declaration naming a real Content contract.
This is declaration and graph validation, not a semantic merge judge. It never edits the roadmap, writes back to the pull request, tags product owners, or makes an LLM verdict blocking.
What changed
content_product_impactdeclaration, including exact lane, ID, record-change, proof, and rationale validation.roadmap_statusand Capabilitystatetransitions.pull_requestworkflow that executes an immutable checker revision and treats the exact candidate checkout only as data. It fetches the exact upstream base revision for fork pull requests and receives no secrets, environment, persisted Git credentials, or write permission.pnpm guardsthat pins the runner, actions, permissions, GitHub expressions, checkout topology, upstream fetch, install command, and checker entrypoint.Product impact declaration
Safety and operations
Calibration should record which pull requests were applicable or quiet, each deterministic finding and repair, unexplained false positives or misses, and the share of findings that remained reproducible. Promotion to blocking requires a separate change after the window and only for rules with deterministic inputs, exact repairs, and no unexplained observed false positives.
Verification
Evidence on exact head
bd308501ea468d0f55b1b72aaf61a3bb87935c3a:pnpm test:content-product-impact— 30/30 tests passed, covering declaration parsing, bounded applicability, exact transitions, isolated revision snapshots, merge-base selection, fork base-fetch policy, loud input failures, and workflow trust-boundary regressions.pnpm test:content-product-docs— 14/14 tests passed, confirming the reused product graph remains valid.pnpm typecheckpassed across the workspace.pnpm guardspassed all 37 checks, including the independently registered Content conformance workflow guard.template materialize --out#2451, Restore exact-PR builds in trusted acceptance #2456, and chore: version packages [skip netlify] #2518 stayed quiet without a hand-authored valid declaration.Manual product browser QA was skipped because this PR changes repository validation, CI, and developer guidance rather than Content UI or runtime behavior.
Review focus
Follow-ups
This PR is intentionally separate from #2511 and remains unmerged until a later Land decision.