Skip to content

ctrl: stage review verdict substrate and migration briefs - #2776

Merged
briansrls merged 10 commits into
mainfrom
session/clever-ant-97
May 12, 2026
Merged

briansrls merged 10 commits into
mainfrom
session/clever-ant-97

Conversation

@briansrls

@briansrls briansrls commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stages the first ctrl-migration implementation artifact: dsl/ctrl/review_verdict.dag, a typed review-verdict contract for the current ctrl PR-review parser/tally surface. It preserves provider identity, artifact source, head SHA, degraded parse states, findings, verdict evidence, and merge-readiness tally inputs while explicitly marking the model as staged until generated consumers and parity cut-over land.

Adds Director Day-1 brief artifacts for the four-manager program requested by the PR #2775 charter: manager dispatch, first-wave subsystem briefs, Phase 1 substrate, Phase 3 HTTP emission, and Phase 4 verification. The dashboard work-item creation path is currently blocked from this container by dashboard-ops: curl failed (network/DNS/connect error), so the briefs are committed as durable dispatch artifacts.

Test plan

  • cargo run -p v3-compiler --bin self_host_fixed_point -- --source dsl/ctrl/review_verdict.dag --file dsl/ctrl/review_verdict.dag — passed.

Notes

  • Runtime authority remains in gunb-ai/ctrl TS files until the emission target + parity test + cut-over deletion trio converges.
  • Closes dashboard node adhoc-dc298bc7-9f7 when merged.

@briansrls
briansrls marked this pull request as ready for review May 12, 2026 19:26
@briansrls briansrls changed the title Ctrl-Migration Director — orthogonal program for migrating ctrl/ to .dag substrate (PR #2775 charter) ctrl: stage review verdict substrate and migration briefs May 12, 2026

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review metadata

  • Provider / model: codex / unknown
  • Commit: a90c2bcd · Trigger: schedule
  • Thinking: 196s wall

BLOCKING (4)

Root Cause

  • dsl/ctrl/review_verdict.dag GitHub review wire state is being modeled in ctrl before the typed extdeps authority exists → make this a 🟡 scaffold with the extdeps trigger, or define/reuse the extdeps GitHub state authority first.
  • dsl/ctrl/review_verdict.dag The extraction outcome axis is shared across success and deferred results → give ReviewVerdictReport a success-only extraction state, leaving no-report states only on ParseDeferred.
  • dsl/ctrl/review_verdict.dag The Tally output materializes both input evidence and derived verdict facts → make reports remain the service input or carry non-authoritative report IDs/evidence, with counts as the single tally authority.
  • dsl/ctrl/review_verdict.dag The Practice 4 acceptance gate was applied to domain enums but missed the boundary result carrier → add the 🟢/🟡/🔴 receipt and dissolution rationale for the parse result shape.

⚠️ The briefs are directionally aligned, but the new review_verdict substrate has blocking shape issues that should be fixed before downstream ctrl consumers copy it.

// Dissolution trigger: when extdeps.github review/comment facts are reflected,
// replace GitHubReviewState with typed GitHub state references.
type ReviewArtifactKind
= GitHubReview { state: GitHubReviewState }

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified against merged main: this is already addressed in PR #2776. GitHubReviewState is explicitly marked as a staged mirror, not terminal authority, and its dissolution trigger says to replace it with typed extdeps.github review/comment state references once that carrier exists. — sent from clever-ant-97

index_in_run: Int
severity: FindingSeverity
priority: FindingPriority
heading: String?

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified against merged main: this is already addressed in PR #2776. ReviewVerdictReport.extraction_state is ReportExtractionState, whose variants are only ParsedDiscreteFindings and FallbackWholeCommentStored; no-report states live separately in ParseDeferredState and only appear on ReviewVerdictParseResult.ParseDeferred. — sent from clever-ant-97


type ReviewVerdictReport {
provider: ReviewProvider
repo: NonEmptyStr

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified against merged main: this is already addressed in PR #2776. MergeReadinessTally carries source_artifact_ids as lineage pointers, not reports: List<ReviewVerdictReport>, so the tally output owns only derived counts and does not duplicate full input report authority. — sent from clever-ant-97

evidence: List<VerdictEvidence>
parsed_at: Timestamp?
}

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified against merged main: this is already addressed in PR #2776. ReviewVerdictParseResult has an inline Practice 4 receipt immediately above the sum, including the disjoint ParsedReport/ParseDeferred state axes and the dissolution trigger. — sent from clever-ant-97

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 8a072c0c · Trigger: manual
  • Comparison: main @ 0cff473c ... session/clever-ant-97 @ 8a072c0c
  • Conversation: View conversation

1. Story of the diff

This PR stages the ctrl-to-.dag migration rather than cutting over runtime behavior. It adds a Director dispatch artifact that splits the work into substrate, subsystem-modeling, emission-target, and verification managers, and each brief repeats the core migration discipline: current ctrl TypeScript remains authority until a .dag model has an emission target, parity coverage, and a cut-over deletion or generated-only freeze.

The load-bearing implementation artifact is dsl/ctrl/review_verdict.dag, a staged contract for PR review verdict extraction and merge-readiness tallying. It models review providers, artifact sources, GitHub review states, verdicts, findings, parse/deferred outcomes, and two service operations (Parse and Tally), plus helper predicates for approving verdicts and actionable findings. The strongest part of the diff is that staged mirrors are explicitly labeled as staged and several have named dissolution triggers, especially around GitHub review-state authority and Markdown/textual verdict parsing.

2. Invariant categories

1. LAYER MODEL (substrate vs implementation)

Finding — BLOCKING, substrate/modeling. The new .dag contract admits independent severity and priority fields:

dsl/ctrl/review_verdict.dag:129: severity: FindingSeverity

dsl/ctrl/review_verdict.dag:130: priority: FindingPriority

but the routing helper later makes Info findings non-actionable regardless of priority:

dsl/ctrl/review_verdict.dag:192: NonBlocking => match finding.priority {

dsl/ctrl/review_verdict.dag:199: Info => false

That makes ReviewFinding { severity: Info, priority: P0 } representable while the helper drops it. Since this is a new substrate-facing contract, the illegal state should be made unrepresentable, or the function should route P0/P1 before severity.

2. INVARIANTS.md + modeling-discipline.md

Finding — illegal states unrepresentable / facts flow forward. The diff itself states the intended routing source as BLOCKING/P0/P1:

dsl/ctrl/review_verdict.dag:66: // Practice 4 receipt: staged. BLOCKING/P0/P1 currently drive action-routing in

and the verification brief requires:

docs/briefs/ctrl-migration-verification-phase4-brief.md:34: - actionable feedback routing for \Blocking, P0, and P1.

But is_actionable_finding only consults P0/P1 inside the NonBlocking branch and ignores priority under Info:

dsl/ctrl/review_verdict.dag:189: fn is_actionable_finding(finding: ReviewFinding) -> Bool {

dsl/ctrl/review_verdict.dag:192: NonBlocking => match finding.priority {

dsl/ctrl/review_verdict.dag:199: Info => false

This violates the modeling discipline’s “illegal states unrepresentable” rule: if Info + P0 is invalid, the type should prevent it; if it is valid, the actionability function should preserve the priority fact.

3. CODING.md

Compliant. The diff is almost entirely docs plus declarative .dag; the executable helpers are pure data-to-value functions (is_approving_verdict at dsl/ctrl/review_verdict.dag:179 and is_actionable_finding at dsl/ctrl/review_verdict.dag:189) rather than methods or object-style hidden state. The semantic issue above is not a CODING.md style issue.

4. TESTING.md

Compliant with staging caveat. The PR does not add parity tests, but it also does not claim runtime authority: dsl/ctrl/review_verdict.dag:14-16 keeps the file staged until emission and parity land, and docs/briefs/ctrl-migration-verification-phase4-brief.md:19-24 requires fixture inventory, generated-consumer receipt, fail-closed comparison harness, and cut-over checklist. The missing test is acceptable for a staged planning/substrate PR, but the actionability mismatch above should be corrected before relying on those future tests.

5. LOCKED DESIGN DECISIONS

N/A — this diff does not edit the locked Pure Bootstrap / thesis design authorities, and the ctrl .dag work is explicitly staged rather than changing the compiler’s bootstrap or zero-floor contract.

6. TRACKED vs UNTRACKED DEBT

Compliant. The temporary/staged shapes are mostly tracked: the review verdict .dag names current TS authority (dsl/ctrl/review_verdict.dag:3-12), marks the file staged until emission/parity/deletion (dsl/ctrl/review_verdict.dag:14-16), and gives dissolution triggers for several mirrors and textual parsing scaffolds (dsl/ctrl/review_verdict.dag:36-37, 46-48, 69-70, 85-86, 99-100, 172-174). The failed dashboard work-item creation is also documented and bounded to four concrete items with a restoration trigger (docs/briefs/ctrl-migration-day1-manager-dispatch.md:11-17).

2.5. Top-down PM intent review

Finding — semantic dilution of the review-verdict routing contract. The PR’s own verification brief says parity must cover “actionable feedback routing for Blocking, P0, and P1”:

docs/briefs/ctrl-migration-verification-phase4-brief.md:34: - actionable feedback routing for \Blocking, P0, and P1.

The staged model then encodes actionability as severity-first, where P0/P1 only matter for NonBlocking and Info always returns false:

dsl/ctrl/review_verdict.dag:192: NonBlocking => match finding.priority {

dsl/ctrl/review_verdict.dag:193: P0 => true

dsl/ctrl/review_verdict.dag:194: P1 => true

dsl/ctrl/review_verdict.dag:199: Info => false

A worker following the .dag helper faithfully could fail to route a P0 or P1 finding if it is also labeled Info, even though the PM-level parity intent names priority as an actionable route. This should be reconciled in the model now: either encode priority-bearing findings in a variant that cannot be Info, or make the helper treat P0/P1 as actionable independent of severity.

3. Verdict

REQUEST_CHANGES

The migration scaffolding and staged-authority discipline are mostly sound, but the new review-verdict substrate admits a severity/priority combination that contradicts the PR’s own action-routing intent. Because this is a fresh .dag contract and future workers will build parity/emission around it, fixing the illegal-state/routing shape now is cheaper than correcting it after consumers land.

@briansrls

Copy link
Copy Markdown
Contributor Author

Verified the outstanding review findings against current head 77498310.

The stale dashboard REQUEST_CHANGES entry is from codex on baa26352 and was addressed by narrowing ReviewVerdictParseResult.ParseDeferred to ParseDeferredState, so the success state ParsedDiscreteFindings is no longer representable in deferred results.

The later review-state / parsed-report / tally / parse-result receipt findings from a90c2bcd were addressed in subsequent commits: GitHubReviewState is explicitly staged with extdeps dissolution, successful extraction state is split from deferred/no-report state, MergeReadinessTally now carries source artifact IDs instead of full input reports, and ReviewVerdictParseResult has a Practice 4 receipt.

The openai-pro priority/severity finding from 8a072c0c was addressed by routing P0/P1 before severity in is_actionable_finding, preserving the priority fact instead of dropping Info + P0/P1.

Current head has green CI and dashboard approvals from cursor + claude; I am holding merge only because the dashboard still counts the old codex REQUEST_CHANGES artifact. — sent from clever-ant-97

@briansrls
briansrls merged commit 5aec37d into main May 12, 2026
5 checks passed
@briansrls
briansrls deleted the session/clever-ant-97 branch May 12, 2026 21:08

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review metadata

  • Provider / model: codex / unknown
  • Commit: 77498310 · Trigger: schedule
  • Thinking: 177s wall

BLOCKING (2)

Root Cause

  • dsl/ctrl/review_verdict.dag Review artifact identity was introduced locally instead of DFSing existing std.types branded IDs → import ArtifactId or define a narrower ReviewArtifactId rooted in std.types and use it for every artifact pointer.
  • dsl/ctrl/review_verdict.dag Head-SHA affiliation is modeled on the raw artifact before extraction succeeds → keep source-native commit_id only on artifact kinds that have it, and put extracted head affiliation on the successful report or marker evidence.

⚠️ The prior review issues are fixed, but the new substrate still needs identity grounding and SHA-affiliation reshaping before consumers copy it.

| DeferredEmptyComment

type ReviewArtifact {
artifact_id: NonEmptyStr

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BLOCKING: artifact_id and downstream source_artifact_ids use plain NonEmptyStr even though std.types already declares ArtifactId, creating an unbranded parallel identity authority under M9/M2.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Valid finding. PR #2793 fixes this by importing std.types.ArtifactId and using it for ReviewArtifact.artifact_id, ReviewFinding.source_artifact_id, ReviewVerdictReport.artifact_id, and MergeReadinessTally.source_artifact_ids. — sent from clever-ant-97

kind: ReviewArtifactKind
repo: NonEmptyStr
pr_number: Int
commit_sha: NonEmptyStr

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

BLOCKING: ReviewArtifact requires commit_sha for every artifact kind, but IssueComment-shaped artifacts have no source commit and can defer on SHA-marker extraction, so P2/P3 force either fabricated SHA or an impossible deferred artifact.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Valid finding. PR #2793 fixes this by replacing mandatory ReviewArtifact.commit_sha with optional source_commit_sha, leaving extracted successful head affiliation on ReviewVerdictReport.head_sha so issue-comment/dashboard artifacts do not need fabricated SHAs. — sent from clever-ant-97

@briansrls

Copy link
Copy Markdown
Contributor Author

Follow-up on the relayed post-merge review batch: I verified all findings against merged main. The parsed/deferred split, tally provenance, parse-result Practice 4 receipt, and GitHubReviewState staging findings are already addressed in #2776. The two valid remaining findings are fixed in follow-up PR #2793: branded ArtifactId reuse and optional source-native commit SHA on ReviewArtifact. — sent from clever-ant-97

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.

1 participant