infer: a kernel refinement (NonEmptyStr) at a structured parameter refuses like its base (string_replace crash) - #12695
Conversation
…-structured judgment kernel_value_declared_type_mismatch keyed on the produced NAME being a kernel, while it already peeled the declared side through peel_where_refinement_base. So "x" refused at a FreeSemigroup<Char> parameter and "x" as NonEmptyStr, one name away, was admitted -- host text then reached v2.std.text string_split and the interpreter threw 'cannot access field head on String'. Both sides now go through the same peel. Regression control: test.claim.kernel_refinement_at_structured_parameter_witness_test (RED on main, two controls). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…refinement peel Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Local receipts at head e567bbf (gunbc built from this head, sha256 ab0e57f7…c93): a_kernel_refinement_at_a_record_parameter_must_refuse = true (was false on main cfb3e36); the_bare_kernel_at_a_record_parameter_still_refuses = true; a_kernel_refinement_at_its_base_parameter_still_compiles = see below. |
|
Completing the receipt above: a_kernel_refinement_at_its_base_parameter_still_compiles = true at head e567bbf. All three rows hold; the RED row flipped false→true across main→head. |
…nroll the RED on the live residual The produced-side refinement peel refuses the kernel-based specimen, so the floor refused the stale quarantine. The admission's capability trigger (the final default stops accepting) did NOT fire: a brand refinement over a PRODUCT at an unrelated product formal is still admitted (measured 0 vs 1 DeclaredTypeNotInhabited). The old witness becomes a permanent regression control; the new w_a_branded_product_refinement_at_an_unrelated_product_formal_still_refuses takes its quarantine rows under the same trigger, and the failure-mode row records why. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Floor failure at e567bbf was a stale quarantine caused by this fix: |
…nality
The first revision peeled unconditionally; the generated-artifact gate then refused ten correct
Present { value: x as NonEmptyStr } rows at an Optional<NonEmptyStr> field. Optionality is the
two-representation gap the neighbouring judgment already excludes. Adds the real string_replace
crossing claims (generic formal FreeSemigroup<Char>) and an Optional-field over-peel control.
Mirror regeneration follows.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…peel Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
CI at 2636a12: |
briansrls
left a comment
There was a problem hiding this comment.
APPROVE-MERGE at exact head 5358fde8af85de8ab7ec797a07a4f96172ed9dca.
The fix is at the earliest unjustified judgment: kernel_value_declared_type_mismatch already peeled the declared side through the where-refinement base, but classified the produced side by its authored name. Peeling the produced side through the same authority makes a refinement of kernel String inherit the same kernel-vs-structured refusal as String itself, which closes the measured string_replace crash without modifying string_split/string_replace or inventing a new conversion rule.
The Optional exception is justified by measured counter-evidence, not a speculative carve-out: the produced node remains unpeeled when the formal carries optionality, and the permanent control for Present{NonEmptyStr} at Optional stays admitted. The structure guard remains on the effective produced node used by this judgment, and the base/refinement controls show the repair is not a blanket rejection of refinements.
The new permanent claims discriminate the real crossing: cast NonEmptyStr at string_replace's FreeSemigroup needle now has a blocking DeclaredTypeNotInhabited row; the plain literal still refuses; a structural FreeSemigroup needle still compiles; refinement-at-own-base and refinement-at-own-refinement remain admitted; and the Optional regression control stays green. The required-floor log shows all eight touched witnesses planned-and-passed and enrolled.
The stated residual where a product-based refinement reaches an unrelated product remains explicitly witnessed in declared_type_inhabitance_direct_call_witness_test; this PR does not falsely claim that broader class closed. Likewise it does not add the missing literal homomorphism into FreeSemigroup.
Exact-head CI is green for witnesses, floor, generated, rust-unit-tests, and emit-build; required floor reports FloorClean with zero unexpected failures, and GitHub reports the PR mergeable. No remaining merge-blocking finding.
…ext with this branch's string_non_empty spelling; #12695's new witness fixture respelled too Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dpkg.dag and hostname.dag take main's std.algebra import (adds Cons) and keep this PR's deletion of
import std.string_type { String }. The three modules main added with that import since H
(bmc_megarac_web_transport, machine_intake/mtcollins1_kvm_still, owned_process) take the same
disposition as the 81. Stage0 regenerated to a fixed point. text_boundary_identity_wall 21/21 and
#12695's kernel_refinement_at_structured_parameter 8/8 on the merged binary.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tall gunbc.guarantee_stall free_semigroup_text_crossing_decided_by_spelling_stall: at FreeMonoid<Char> the identity wall decides host-text crossings; at FreeSemigroup<Char> the classifier reads NotText, so the spelling-keyed kernel_value_declared_type_mismatch (extended by #12695) decides. Both agree on every fixture (wall 21/21, kernel_refinement_at_structured_parameter 8/8 on one binary). The trigger names the capability: the classifier recognizes FreeSemigroup<Char>, so every such crossing is decided by text_representations_cross and the base check's text case retires. guarantee_stall_witness_test 11/11. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Work item: node://adhoc-0229c068-97e (v2.std.text string_replace crash).
Chain re-derivation (DESIGN §6b)
Symptom:
string_replace(source: t, needle: "{ x }" as NonEmptyStr, replacement: ..)resolves clean, then the seed interpreter throwsTypeError cannot access field 'head' on Stringinsidev2.std.text string_split.string_split/string_replace: justified. Both declaredelimiter/needle: FreeSemigroup<Char>, and reading.headis exactly what that contract gives them. No guard belongs here.std.types NonEmptyStrisString where non_empty, so it's kernel host text. By DESIGN §4 (the 2026-09-27 text ruling), host text reaches a structural carrier only through the declared Unicode-scalar unfold, or the crossing refuses. There is no such route intoFreeSemigroup<Char>, so the call must refuse.v1.compiler.inferkernel_value_declared_type_mismatch. It peeled the declared side throughpeel_where_refinement_base, but decided the produced side by whether its name is a kernel type. So the plain literal"{ x }"refused (measured:declared 'Node(FreeSemigroup<Product(Char)>)', produced 'Primitive(String)'), and"{ x }" as NonEmptyStr, one name away, was admitted. This is the rostered classdeclared_type_wall_keyed_on_the_value_being_a_kernel.Fix: peel the produced side through the same authority before the kernel test. No new relation. The stage0 mirror
v1_compiler_infer.rswas regenerated remotely (--required-regen, drift = that one file only).Evidence
New
test.claim.kernel_refinement_at_structured_parameter_witness_test. Each fixture counts blockingDeclaredTypeNotInhabitedrows:a_kernel_refinement_at_a_record_parameter_must_refuse: false on main cfb3e36 (the RED).the_bare_kernel_at_a_record_parameter_still_refuses: true on main (control; the red isn't a new blanket rule).a_kernel_refinement_at_its_base_parameter_still_compiles: true on main (control; the peel must not refuse its own base).The GREEN at head comes from CI's floor, which executes this touched file. Local receipts will be posted as a comment.
Other callers
string_split/string_replacecallers:v2.std.compilers.target_modelapply_emit_spelling_escapesbuilds the needle structurally from aCons.v2.test.std_text.carrier_claimsbuilds needles throughFreeSemigroup {..}. Neither is affected. Corpus-wide, this change can newly refuse any kernel-refinement value (aNonEmptyStr, a branded string) passed where a structured type is declared. Every such site is the same latent runtime crash, and the floor enumerates them.Not in scope (named follow-up)
A string literal cannot yet be written as a
FreeSemigroup<Char>needle.literal_homomorphism_rowskeys the scalar unfold on theFreeMonoiddestination only. A nonempty-literal row forFreeSemigroup<Char>would be the ergonomic route, but its image realization touchesv2.compiler.emit_*, which is off-limits to this lane.🤖 Generated with Claude Code