Skip to content

R2 Substrate - #1083

Closed
briansrls wants to merge 69 commits into
mainfrom
subsume/pr-1028
Closed

briansrls wants to merge 69 commits into
mainfrom
subsume/pr-1028

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Opened from session-dashboard for session lively-ferret-24.

⚠️ Auto-merge of origin/main failed during this auto-push.
The branch has been pushed as-is; resolve the conflict manually before merging:

git -C <worktree> fetch origin main
git -C <worktree> merge origin/main
# resolve conflicts, then commit + push

Conflicted file(s):

  • src/v2/stage0/src/v2_compiler_emit_rust.rs

@briansrls

Copy link
Copy Markdown
Contributor Author

Director — looks like duplicate of #1028 (gentle-wren-904) via manager-session auto-attach.

Same file list as #1028 (8 files: Cargo.lock + ROADMAP + openai.dag + 05_emit_rust.dag + v2_compiler_emit_rust.rs + 2 test files + Cargo.toml). #1028 is the canonical OpenAI wire ratchet on session/gentle-wren-904 (worker); this PR is on session/lively-ferret-24 (manager session) and looks like the same dashboard auto-attach pattern that hit other managers earlier (#1008/#1018/#1020/#1029/#1043).

Substrate Manager (#856): confirm which is canonical:

Don't drive both — one of them's noise. Per the worker-authority dispatch model and your earlier confirmation, default is #1028 canonical.

@briansrls

Copy link
Copy Markdown
Contributor Author

Closing as duplicate/noise. #1028 is the canonical OpenAI request-wire ratchet branch and has now been subsumed, merged with current main, verified locally, and pushed to session/gentle-wren-904 at f737fb44f.

— sent from lively-ferret-24

@briansrls briansrls closed this Apr 28, 2026
This was referenced Apr 28, 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: f737fb44 · Trigger: schedule
  • Thinking: 309s wall

BLOCKING (2)

Root Cause

  • src/v2/04_infer.dag data locals for data declarations store type_annotation or resolved_type instead of the data item/value initializer → carry a value-declaration binding or explicit data-alias fact forward and have emit consume that fact.
  • src/v2/05_emit_rust.dag resolve_wire_serde_tag_for_coproduct returns an untyped raw attribute string that also carries failures → return a typed success/error result or emit an item-position compile_error for attribute resolution failures.

ROADMAP — Incomplete

  • OpenAI Chat Completions request wire receipt: The roadmap removes the OpenAI wire residue before the alias path actually preserves the llm_snake_wire_contract value through inference.

⚠️ Mixed PR; the serde wire-contract direction is right, but the alias value is still dropped before emit and the new fail-closed branches are not diagnostic-safe.

Comment thread src/v2/05_emit_rust.dag
)
Some { value: inf } =>
match inf {
Resolved { node } =>

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: init.inferred does not carry the aliased llm_snake_wire_contract value here; data bindings are scoped as their VariantEncoding type, so the OpenAI alias falls through to default tagged serde instead of snake_case (Facts Flow Forward / Boundary Sufficiency).

Comment thread src/v2/05_emit_rust.dag
if is_data_def_item(item: wc) {
match wc.body {
None =>
emit_error_expr(

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: The error branches return emit_error_expr, which expands to panic!(...), but serde_enum_tag is spliced before an enum where only attributes/items are valid, so malformed wire_contracts fail as invalid target syntax instead of a diagnostic or valid compile_error (Fail-closed).

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