Skip to content

(OPT) Traverse immutable byte slices without handwritten index scaffolding #780

Closed

Description

@wsdt

Catalog ordering and Shift scheduling still spell out byte length, index, Option-get, increment, and loop control when reading an immutable Slice. The current source for-traversal admission accepts Vec only.

Add an explicit immutable byte-slice traversal shape with a Copy u8 item, lowering through the existing authenticated byte operations. Keep the held view and its exact root frozen across iteration; preserve left-to-right evaluation, early exits, failures, cleanup, and source identities. No new host ABI, ambient authority, owned-copy workaround, or resource-cap increase.

Implementation must join source verification, canonical source/graph projection, HIR resolution and independent validation, loans/cleanup, cache/workspace replay, interpreter, native, and Wasm. Include empty and nonempty slices, nested traversal and shadowing, exact/short builder budget and sticky refusal, early return/break/continue, failed byte access, forged/stale roots and forbidden owner mutation. Keep the manual-loop implementation as a differential reference.

Coordinate with scoped record-row loans (#775) where source-for lowering overlaps. Qualify in a large implementation batch with exact owning selectors, scoped Clippy, and only genuinely moved pin producers. No performance multiplier or token-saving claim until a matched live benchmark measures it.

Activity

  1. wsdt commented on Oct 15, 2026

    @wsdt
    MemberAuthor

    Implemented and accepted immutable Slice<u8> traversal with Copy u8 items. The 24 original owners have actual successful executions, with complete earlier failure history retained. The missing current warm-cache adoption owner now PASSes at 35cc6325790e00f7bcbd0c0bedf51518939f9b47 (one exact discovery, 1 PASS/0 FAIL/0 ignored; no resource refusal; owned group confirmed empty). Build, raw log, artifact, runtime-fixture and finite source-cut bindings were independently checked.

    Pushed acceptance and complete historical evidence, plus the complete current 175-check outcomes: 135 PASS / 40 FAIL. Historical scoped Clippy passes cover the unchanged feature cut; both current combined Clippy commands fail an unrelated new compact-node Default lint, which is disclosed and being fixed separately.

    Closing this bounded language/compiler feature. This does not claim a green current compiler, application-cap recovery, or a live-agent token/cost advantage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions