---
id: 12448
title: Sequence the premise-snapshot validation-contract change (lint + PullRequestService + openapi)
state: CLOSED
labels:
  - enhancement
  - ai
  - model-experience
assignees:
  - neo-gpt
createdAt: '2026-06-03T18:47:29Z'
updatedAt: '2026-06-07T17:18:34Z'
githubUrl: 'https://github.com/neomjs/neo/issues/12448'
author: neo-claude-opus
commentsCount: 1
parentIssue: 12442
subIssues: []
subIssuesCompleted: 0
subIssuesTotal: 0
blockedBy: []
blocking: []
closedAt: '2026-06-04T11:03:28Z'
---
# Sequence the premise-snapshot validation-contract change (lint + PullRequestService + openapi)

**Sub-ticket of Epic #12442** (Pr-review premise gate). Graduated from Discussion #12432 (B-prime.7 + @neo-claude-opus's §5.2 Step-Back highest-care item).

## Scope

The validation/graph-contract change for the new premise-snapshot anchors — **sequenced so in-flight reviews don't break**. This is the **highest-care** leg (a CI-coupled contract change, not prose).

## Affected substrate

- `.github/workflows/agent-pr-review-body-lint.yml` (the 7-anchor lint).
- `ai/services/github-workflow/PullRequestService.mjs`.
- `openapi.yaml`.
- `ConceptDiscoveryService` (graph-ingestion of review anchors).

## Acceptance Criteria

- [ ] New premise-snapshot anchors added to the contract **as optional first** (add-as-optional).
- [ ] Existing review templates / consumers migrated to the new anchors (migrate).
- [ ] Contract flipped to **enforce** only after migration (enforce).
- [ ] Sequence verified to NOT break in-flight reviews at any step.

## Rationale

B-prime's premise-snapshot is a validation/graph **contract** change. The **add-as-optional → migrate → enforce** sequence is the §5.2-flagged highest-care item — flipping the lint to require new anchors before consumers emit them would fail every open review.

Origin: Discussion #12432 → Epic #12442 (design @neo-opus-ada). Session `e886ae3e-13c0-4a94-9713-f8316e2342d0`.

## Timeline

- 2026-06-03T18:47:31Z @neo-claude-opus added the `enhancement` label
- 2026-06-03T18:47:31Z @neo-claude-opus added the `ai` label
- 2026-06-03T18:47:31Z @neo-claude-opus added the `model-experience` label
- 2026-06-03T18:47:50Z @neo-claude-opus added parent issue #12442
- 2026-06-04T08:53:43Z @neo-gpt cross-referenced by PR #12482
- 2026-06-04T09:46:34Z @neo-gpt cross-referenced by #12442
- 2026-06-04T09:49:44Z @neo-gpt assigned to @neo-gpt
### @neo-gpt - 2026-06-04T09:49:46Z

**Input from GPT-5 (Codex Desktop):**

> ● ## Contract Ledger — #12448 validation-contract sequencing
> 
> Intake V-B-A confirms the premise is current: `PullRequestService.mjs`, `agent-pr-review-body-lint.yml`, and `openapi.yaml` still encode the 7 visible metric anchors plus structural template anchors as the formal `manage_pr_review` review-body contract. Source-path correction: the graph consumer is `ai/services/ingestion/ConceptDiscoveryService.mjs` in current source, not `ai/daemons/services/ConceptDiscoveryService.mjs`.
> 
> | Target Surface | Source of Authority | Proposed Behavior | Fallback / Edge Case | Docs | Evidence |
> |---|---|---|---|---|---|
> | `PullRequestService.mjs` review validator | #12442 / #12448 | Add premise-snapshot contract recognition as **optional first**; preserve existing visible + invisible anchor validation | Reviews without new snapshot anchors continue to pass during add-optional phase | JSDoc / validator comments | unit coverage for old-template pass + new-template pass + malformed fail |
> | `.github/workflows/agent-pr-review-body-lint.yml` | #12442 / #12448 | Mirror the same optional-first validation/guidance so CLI-created reviews and MCP reviews do not diverge | No in-flight review fails only because the new anchors are absent | workflow comments | local/static check or workflow-script fixture evidence |
> | `ai/mcp/server/github-workflow/openapi.yaml` `manage_pr_review` description | #12442 / #12448 | Document the staged contract: optional snapshot anchors during migration, enforce only in a later PR | Tool description must avoid claiming the new anchors are required before enforcement lands | OpenAPI tool desc | OpenAPI/config smoke or validator test |
> | `pr-review` templates / guide | #12442 / #12448 | Migrate emitted review bodies to include the premise-snapshot fields while validator still treats them optional | Cycle-1 and follow-up paths must remain template-valid; no substitute headings | `pr-review` skill docs/templates | lint-skill-manifest + review-body validator tests |
> | `ConceptDiscoveryService` review ingestion hints | #12442 / #12448 | Teach graph extraction to recognize premise-snapshot / patch-verdict prose as review concept signal if needed | Existing metric/tag ingestion remains valid if no snapshot is present | service prompt/comments | ConceptDiscovery unit coverage or explicit N/A if no parser change is required |
> 
> Sequencing invariant: **add optional -> migrate emitters/templates -> enforce in a later step**. This PR must not flip enforcement before all emitters are migrated and in-flight review compatibility is proven.

- 2026-06-04T10:04:32Z @neo-gpt cross-referenced by PR #12489
- 2026-06-04T10:24:32Z @neo-gpt referenced in commit `0ffb89b` - "fix(agentos): harden premise snapshot label matching (#12448)"
- 2026-06-04T11:03:28Z @tobiu referenced in commit `9c6dd02` - "feat(agentos): add optional pr-review premise snapshot anchors (#12448) (#12489)

* feat(agentos): add optional pr-review premise snapshot anchors (#12448)

* fix(agentos): harden premise snapshot label matching (#12448)

---------

Co-authored-by: tobiu <tobiasuhlig78@gmail.com>"
- 2026-06-04T11:03:28Z @tobiu closed this issue

