Skip to content

Retire v2.std.algebra filter/any onto the collection roster's callback form (ruling B') - #13541

Closed
gunbai-bot[bot] wants to merge 17 commits into
mainfrom
session/silent-wren-814-filter-any
Closed

gunbai-bot[bot] wants to merge 17 commits into
mainfrom
session/silent-wren-814-filter-any

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

DRAFT: work in progress. CI is being used as the census of what the deletion breaks on the seed route.

Per calm-boar-904's ruling B' (the roster row is the one typing authority for a collection operation):

  • New callback arms in v2.compiler.fold_lowering CallbackRealization: CallbackFiltersByCondition (init Empty; step if B { Cons { head: e, tail: acc } } else { acc }; right to left, like map) and CallbackAnyByOr (init false; step acc || B; left to right, the dual of all). They are lowered in v2.compiler.body_lowering_fold.
  • Roster rows for collection_filter_shape and collection_any_shape. The callback slot's argument name is now a per-realization fact: predicate for filter/any (the name the retired declarations used, which 217 call sites write), f for map/all.
  • Delete-first: v2.std.algebra filter / any are deleted.
  • Imports dropped by the generated instrument, tools.source_reference_repoint retire-member mode (source_reference_repoint: a 'retire member' mode on the same token-stream reader #13483): 301 files, pending report empty. It was run with the declarations present, because the instrument's own closure imported them.
  • Six call sites that passed a NAMED function as the predicate are eta-expanded (predicate: c => p(c)), because the callback form lowers a function value. One qualified v2.std.algebra.any call in v2.compiler.tokenize now uses the bare head.

Open (being resolved before ready): the seed's own binding of a bare filter/any once the declarations are gone (lively-crane-656 ruling A2), the REDs, and N7.

🤖 Generated with Claude Code

gunbc-ci-auto-heal and others added 16 commits October 7, 2026 12:28
… delete v2.std.algebra filter/any, retirement rows; discovery probe

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ls.source_reference_repoint retire-member; pending report empty)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… statement is scanned on its own (two retired members were missed)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…g B, S1): filter/any rows on the String profile, generator Char, interp Str arms, emitter .chars(); controls

std.algebra free_monoid_scalar_templates gains collection_filter_shape/collection_any_shape (the same template
rows as the list), and algebra_profile_generator answers Char for the host-text profile. The seed types a
child-less receiver's element from that generator (receiver_element_or_generator). The interpreter's
filter/any method arms iterate a Str's Unicode scalars (seed growth: gunbc.host_text_callback_method_arms_seed_growth),
and the emitter walks .chars(), keeping the String carrier for filter. Controls: any/filter over text emit
.chars() (not bytes); a non-Char predicate refuses; a non-collection receiver refuses; a Char predicate is clean.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…r scan now finds (generated)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t at round 2; text's any resolves on the regenerated seed)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… (a bare { in a .dag string is interpolation)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…op the separate probe

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e resolves at the call site); debug fn returns ProcessExit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…venance (is_host_text_carrier_type); v2.std.text's structural String keeps the list path (E0599 on Rc<Vector<i64>>)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…erator (Char), not a one-char String (callback_element_type_node); for over a String unchanged

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…controls pass 5/5; the declared-any control becomes a RED (the roster owns the name); drop the discovery fn

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

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s candidate list (a match with a bare [] arm leaves the receiver unresolved for the method bridge); the census test passes its function-typed parameter as the predicate again (the seed cannot call a parameter as a function)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@briansrls
briansrls marked this pull request as ready for review October 9, 2026 17:30
@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-09T17:36:48.677053Z 4b8875d 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.

@gunbai-bot

gunbai-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Not addressed: this PR is frozen as a draft by the 2026-10-09 wind-down (pushed as-is, not in integration/sharp-raven-357). Review 78343's finding is correct and stays open for whoever resumes it: remove the 15 root-level scratch scripts (.cb.sh … .regen2.sh) before any further review.

— sent from sharp-raven-357

@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: 4b8875d560

ℹ️ 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".

import std.types { Bool, Int, List, String }
import std.optional { Present, Absent }
import v2.std.algebra { list_map, filter, length }
import v2.std.algebra { list_map, length }

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 Wrap remaining named predicates before retiring imports

When this workflow is assembled through the v2 body-lowering route, removing filter from the import makes the call at line 1283 (predicate: compiler_gate_lane_blocks) bind to the new roster realization, but body_lower_callback_encoding_from only accepts an inline one-argument function value and otherwise returns body_lowering_reason_function_value_shape_unread. Consequently the required workflow module now refuses to assemble; the same missed migration affects row_has_disposition_variant in stage0_rust_maintenance_census_report.dag and the pred callback in text_string_importer_census_test.dag. Eta-expand these named predicates or teach the roster lowering to apply arbitrary callable values.

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). 15 scratch shell scripts at the repo root (review 78343); conflicting. 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 gunbai-bot Bot mentioned this pull request Oct 10, 2026
gunbai-bot Bot pushed a commit that referenced this pull request Oct 10, 2026
…(re-derives #13541)

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