Skip to content

Move the bottom seam to the leaf std.error_primitives; trim diverges through the named seam (XL-2) - #13399

Closed
gunbai-bot[bot] wants to merge 13 commits into
mainfrom
session/silent-fox-626
Closed

gunbai-bot[bot] wants to merge 13 commits into
mainfrom
session/silent-fox-626

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #13381 (proud-crane-779, still open). This branch contains #13381's commits because it retires the in-place copy that PR records. Land #13381 first, or land this PR in its place.

What

The divergent host seam pure_dag_seam_unreachable and its _float and _string projections move from std.bytes to std.error_primitives. That module already exists, imports nothing, and is already imported by std.algebra, so no new module is minted. In std.bytes the seam sat at the wrong layer: std.bytes -> std.types -> std.algebra made it unimportable from std.algebra.

Replacement migration (DESIGN §3), delete-first: the three fns were removed from std.bytes (nothing re-exports them), and then all 7 importers were re-pointed:

  1. std.encoding
  2. std.decimal
  3. gunbc.auth.approval_device_wire
  4. gunbc.auth.oidc_id_token_verification
  5. extdeps.languages.gpu.wgsl.kernel
  6. extdeps.languages.simd.kernel
  7. extdeps.cloud.gcp.secret_manager

std.algebra trim now reads if s == s { pure_dag_seam_unreachable_string() } else { pure_dag_seam_unreachable_string() }. That keeps the s == s wiring-liveness read and replaces the unnamed 1 / 0. #13381's record of the in-place copy is retired in two places:

  • the note on std.bytes is deleted with the fns;
  • the bare_from_code_point_binds_the_total_seed_builtin STD SEAM disposition is rewritten.

Comments in std.encoding, secret_manager and pid_control_program that still named std.bytes as the seam's home are corrected. std.decimal no longer imports std.bytes, so the cycle pid_control_program cited is gone. Its aliases stay withdrawn on review 56966's ruling, which never rested on that cycle.

Mirrors (v1)

v1 is semantics-frozen with active maintenance (gunbc.v1_maintenance_standing v1_seed_standing). This change is admitted because it serves the v2 self-host: it gives std a bottom seam that every std layer can import. Seed changes:

  • the std.primitive_projection row's module_path is now std.error_primitives;
  • the runtime_rust.dag / v1_rt panic text and the interpreter arm text now name the new module.

Bootstrap step: the first regen round failed with unconditional_recursion in v1-stage0-std-core. The running seed still routed the seam via the old std.bytes row, so it emitted the moved self-call as plain recursion. I advanced that one row in std_primitive_projection.rs by hand, to the value the generator writes. Round 1 then rebuilt 7 packages and round 2 reported rebuild_packages=0. That is the fixed point, and it confirms the hand row equals the generator's output.

Seed-reproduction receipt for the hand-advanced row

The hand edit is the seed-bootstrap step only: the old seed cannot project its successor. Here is the evidence that the new seed reproduces it with no hand edit. Each step was a single BuildBuddy dispatch over the committed tree.

  1. I built claim_executor FROM the committed carrier. Committed std_primitive_projection.rs sha256 is 2dc8badefbbd817cc453c6646b458292641b9fb69214484300874a0308828fc4.
  2. I then ERASED the row in the mirror back to "std.bytes". Afterwards 0 rows naming std.error_primitives were left.
  3. claim_executor --required-regen --regen-candidate-dir /tmp/c1 reported FAIL generated surface drift: std_primitive_projection.rs. That is the only drifted mirror, and drift is the expected result against the erased file. The candidate is BYTE_IDENTICAL_TO_COMMITTED, with candidate sha256 2dc8badefbbd817cc453c6646b458292641b9fb69214484300874a0308828fc4. The row comes out as primitive_pure_dag_seam_unreachable(), "std.error_primitives".to_string(), "pure_dag_seam_unreachable".to_string().
  4. Control (not baked): I changed the .dag row's module_path to "std.control_sentinel" and regenerated with the same binary. The candidate row followed it and came out as "std.control_sentinel".to_string(). So the row is projected from dag/std/primitive_projection.dag, not from a string baked into the binary.

Evidence

  • Named, typed refusal. On a probe that calls std.error_primitives pure_dag_seam_unreachable_string (trim's seam), gunbc run on BuildBuddy prints:
    cause: TypeError { msg: "std.error_primitives pure_dag_seam_unreachable reached: an arm declared unreachable was evaluated" }
    Before this change, trim's seam refused as an unnamed DivisionByZero.
  • Stage0 regen fixed point: claim_executor --regen-round-cost, round 2 rebuild_packages=0.
  • No new import cycle: std.error_primitives imports nothing, and resolving the 7,915-module pool for the probe succeeded.
  • Claims: left to the required CI floor. I did not run them locally.

No rows were added to floor_cross_claim_pure_producers_warm.

🤖 Generated with Claude Code

gunbc-ci-auto-heal and others added 11 commits October 5, 2026 09:53
…Scalar) + total char_text; migrate v2 callers

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… identity grain, by kind)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…through the named seam

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nd round rebuild_packages=0)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

The floor red at 99d7a87 is the stack effect, not this change: test.claim.unicode_scalar_from_code_point_witness.from_code_point_RED_a_surrogate_refuses_as_surrogate errors with non-exhaustive pattern match. That happens because #13381 carries #13378's witnesses without #13378's seed-builtin deletion, so the seed's total from_code_point shadows the std fn. Per the manager's plan, this PR will be retargeted to main and re-greened after #13378 lands. — sent from silent-fox-626

Brian Searls and others added 2 commits October 5, 2026 19:14
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s=0)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as draft October 9, 2026 17:14
@briansrls
briansrls marked this pull request as ready for review October 9, 2026 18:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T18:53:46.960811Z dc3cfc2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc3cfc23c1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

empty: optional_absent(),
cons: fn(found, row) { if (row.lower == spelled) || (row.upper == spelled) { optional_present(value: row.value) } else { found } }
)
match from_code_point(cp: c) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Rename the partial constructor so calls can reach it

When an escaped string is decoded, this bare call still binds the seed builtin from_code_point: Int -> String, even though the new declaration is imported, so the subsequent Ok/Err match receives a plain string and fails with PatternMatchFailure instead of decoding or returning DagStringDecodeMalformed. Running the newly added from_code_point_spells_a_scalar witness demonstrates this directly: the match receives "A" and aborts. The same binding affects both new matches in this decoder; use a non-colliding declaration name or retire/change the builtin resolution before routing parser input through it.

Useful? React with 👍 / 👎.

@gunbai-bot

gunbai-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Closed without folding in the v1 closeout bankruptcy (#13641). Red and conflicting with main. Under the bankruptcy rule, only work that serves the frozen seed emission, v2-native development or live operations, and that is complete, survives. The branch is kept for archaeology; no follow-up obligation is created. — sent from neat-wolf-604

@gunbai-bot gunbai-bot Bot closed this Oct 9, 2026
gunbai-bot Bot added a commit that referenced this pull request Oct 11, 2026
)

* Move the bottom seam to std.error_primitives (re-derives #13399)

pure_dag_seam_unreachable and its _float/_string projections leave std.bytes for
the leaf std.error_primitives; all 7 importers re-pointed, std.algebra trim names
the seam instead of an unnamed 1 / 0, seed mirrors name the new module.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Regenerate stage0 mirrors for the error_primitives seam

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Emit a nullary realized seam as its bridge call

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Regenerate the emit mirror from the nullary-seam arm (comment moved above the fn)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Regenerate stage0 mirrors on the merged tree to the fixed point (first_generation_equal=true)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

0 participants