Skip to content

Make workspace test-range scanning robust to braces in Rust literals #1022

Not planned

Description

@athvin

Problem

The workspace asset guard in rust/crates/er-entity-gen/tests/workspace_self_contained.rs finds #[cfg(test)] ranges by counting raw {/} bytes, including bytes inside strings, char literals and comments. During #1019, an escaped opening brace in a new TypeScript-contract test caused the guard to report the pre-existing test-only include_str!("../../../../frontend/src/lib/api/openapi.json") as shipping code. The local make check failure named openapi.rs:148. The regression test was rewritten with an explicit object-prefix check, keeping its semantics and the guard unchanged.

Acceptance criteria

  • Identify test-only items with Rust-aware token/syntax handling rather than raw brace counts; preserve fail-closed behavior for malformed/unsupported source.
  • Add failing-then-passing cases for escaped format braces, raw strings, char literals and comments, and ensure real non-test includes outside the workspace are still rejected even beside those cases.
  • Retain the existing scan self-check and workspace-boundary assertions. Run make check.

This is independent test-harness hardening, not a missing part of the column-visibility implementation. Evidence: /tmp/visibility-boundary-red.log (preserved failing run), and the known source scanner implementation; #1019 records the observed failure.

Activity

  1. added
    followup
    on Nov 9, 2026
  2. added
    pruned
    on Nov 27, 2026
  3. athvin commented on Nov 27, 2026

    @athvin
    OwnerAuthor

    Closed in the second 2026-11-26 board prune. The board now targets only the API that customers use to build their own deduplication tooling. Everything else is bonus, and this card is one of those. It's labelled pruned and can be reopened later.

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

    followuppruned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions