Skip to content

Add a regression for insertion before existing local record IDs #129

Closed

Description

@ip332

Follow-up from A6 #104 / PR #128 readiness audit. Duplicate search checked all issues plus body search for insertion; no equivalent issue found (#109 is unrelated).

The maintained layout tests DomainsAreSortedNamespacesAndLocalsAreSortedNames, AssignmentIsIndependentOfInputOrder and OrderingIsBytewiseNotLocaleAware pin sorted IDs. The truck A/B example appends MirrorFold. None directly compares before/after insertion of a record sorting before existing locals while keeping the namespace set fixed.

Add a focused regression using existing layout/hierarchical-ID helpers:

  • Compile two namespaces with multiple records in one domain.
  • Insert a new record before existing local names, keeping namespaces unchanged.
  • Assert existing later locals shift by one only in that domain; domain IDs and every record ID in the other namespace remain unchanged.
  • Assert the new record's expected ID and a positive unchanged baseline; reuse current compiler APIs, not an independent allocator.

Risk assessment: low residual coverage risk, with potentially serious mapping impact if this invariant regresses. The allocator's sorted namespace map and per-domain sorted local loop (compiler/layout/layout.cpp), pinned mappings, permutation tests and interoperability checks provide indirect protection, not this dedicated regression. No current behavioral defect was found.

Recommendation: non-blocking test follow-up for v0.1.31-rc.1, subject to maintainer review; this is not an approved release exclusion and does not alter #85/#88 publication gates. No allocator, wire, identity or epoch redesign is requested.

Activity

  1. added
    area: tests
    on Nov 22, 2026
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

    area: tests

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions