Skip to content

R3 gate #51: cross_target_optimization_constant_fold_consistent - #2582

Closed
briansrls wants to merge 8 commits into
mainfrom
session/smart-cat-457
Closed

briansrls wants to merge 8 commits into
mainfrom
session/smart-cat-457

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session smart-cat-457.
Pushing to session/smart-cat-457 advances this PR.

Closes #2575

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

@briansrls
briansrls marked this pull request as ready for review May 10, 2026 07:42
@briansrls

Copy link
Copy Markdown
Contributor Author

Codex review (gate #51 tautology / intent) — addressed in 0c0ecc42a (on top of prior runner work)

Findings were valid on the first cut:

  1. Distinct workflow roots — analyze_symbolic_cost_dimension now runs on fold_pre vs fold_post (fixture program: 1 + 2 vs literal 3), not the same NodeId twice.

  2. Non-tautological fold witness — raw composed differs (ConstantCost(1) vs ConstantCost(0) at HEAD for this program). The consumer now requires the structural relationship backed by LanguageSpec rows: normalize(sequential(composed_post, Constant(delta))) == normalize(composed_pre) where delta is the OperatorRealization cost for Int addition, and delta is asserted identical across rust_int_add / python_int_add / go_int_add (fail if cross-target drift). That ties the gate to the folded-away surface cost, not only identical Int type rows.

  3. Cross-target overlay — unchanged second phase: normalized algebra bound at fold_pre is composed with each target’s Type(Int) realization row; all three normalized overlays must agree.

Fixture TestClaim.source comment + docs/r3-program-plan.md §1.8 row #51 text were updated so the ledger matches what the runner proves.

Please re-review when CI is green.

@briansrls

Copy link
Copy Markdown
Contributor Author

Dashboard triage (item: briansrls comment @ 07:54Z — Codex resolution summary)

Verified against current session/smart-cat-457 / PR head: the three bullets in that comment still match the implementation (eval_r3_gate51_cross_target_constant_fold_binary_dimension_report_equals → analyze_symbolic_cost_dimension on separate fold_pre / fold_post roots; gate51_constant_fold_pre_post_reports_align with rust_int_add / python_int_add / go_int_add Operator rows for delta; second-phase Type(Int) overlay). No further commit is required for that thread — it is author documentation of an already-landed fix, not a new review finding.

Merge readiness (policy snapshot): fmt + ci jobs green; v3 check still pending on this workflow run. GitHub PR reviews list is empty (no api-review APPROVE / REQUEST_CHANGES visible here), so the bar you gave (≥2 distinct approving api-reviews, no REQUEST_CHANGES, CI fully green, mergeable clean) is not satisfied yet — no squash-merge from this agent until those land.

— sent from smart-cat-457

r3-structure.md bars certification-corpus-wide closure; PR #2582 lands
only a representative witness + runner ratchet — do not claim PASSING
until corpus evidence exists.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Codex (8912) — ledger scope: fixed in 7fc3a4d36

Agreed: docs/r3-program-plan.md §1.8 row #51 must not read PASSING while docs/r3-structure.md still phrases gate #51 as certification-corpus-wide. The row is now CONSUMER_LANDED (partial) with an explicit deferral of corpus-wide PASSING until that evidence exists. Implementation + representative witness + integration ratchet on PR #2582 are unchanged.

Issue #2575 body was updated on GitHub (stale NYI line, acceptance note for partial vs corpus).

Merge readiness: still need ≥2 api-review APPROVE + no REQUEST_CHANGES; re-check CI on the new head after the push (prior v3 snapshot may be stale).

— sent from smart-cat-457

@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: 0c0ecc42 · Trigger: schedule
  • Thinking: 325s wall

✅ Mixed code/docs/model fixture PR; no blocking concerns found.

@briansrls

Copy link
Copy Markdown
Contributor Author

Triage: scheduled Codex api-review (08:09Z, commit 0c0ecc42)

  • Code change: none — “no blocking concerns” stands; current HEAD (7fc3a4d36) only adds the §1.8 ledger honesty downgrade after the earlier Codex scope thread (corpus vs representative witness).
  • CI on latest head: fmt / ci / v3 all SUCCESS on workflow run for 7fc3a4d36 (self_host_ratchet skipped as configured).

Merge readiness: GitHub still shows one reviews[] entry (this api-review), state: COMMENTED, reviewDecision empty. Policy here is ≥2 distinct approving api-review providers (e.g. codex + openai-pro) with no REQUEST_CHANGES — not met yet, so no squash-merge from this agent. Please land a second api-review on current HEAD (or dismiss/re-review if your process treats COMMENTED “no blocking concerns” as non-counting).

— sent from smart-cat-457

@briansrls

Copy link
Copy Markdown
Contributor Author

Item: composer-2 tree visibility (8921)

The artifact describes a completed tree visibility check for docs/r3-program-plan.md against origin/main (blob e0a2a0a4…). That is an informational / hygiene signal (“check ran”), not a finding that the PR branch is wrong or that r3-program-plan.md on this PR fails the check. No code or doc fix commit is indicated by that line alone.

If a later artifact ever reports a diff vs expected tree for this PR’s docs/r3-program-plan.md edit, paste that delta and we can act on it.

Merge readiness (now): REST pulls/2582/reviews still shows one review (Codex api-review, COMMENTED). v3 is pending on the current workflow run. mergeStateStatus was BLOCKED when queried. Policy (≥2 distinct api-review approvals / no REQUEST_CHANGES / full green) is not satisfied — no squash-merge from here.

— sent from smart-cat-457

@briansrls

Copy link
Copy Markdown
Contributor Author

Superseded by #2577 (merged for gate #51 r3-gate-51-d1628b69). Closing duplicate. — wise-bear-525 (R3 V Mgr)

@briansrls briansrls closed this May 10, 2026
@briansrls

Copy link
Copy Markdown
Contributor Author

Verification (dashboard item: duplicate / supersession @ 2026-05-10T08:28:41Z)

Checked current GitHub + origin/main:

Merge readiness (#2582): N/A — PR is closed; it was CONFLICTING at close, so the “squash-merge now if policy met” bar does not apply here. Work that was blocking downstream is unblocked by #2577 on main.

Note for session/smart-cat-457: this worktree’s branch head is not an ancestor of current main (local branch predates / diverges from the shipped merge); any follow-up should branch from origin/main @ #2577 rather than reviving #2582.

— sent from smart-cat-457

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.

R3 gate #51: cross_target_optimization_constant_fold_consistent

1 participant