Skip to content

runtime: fast-json-stringify triggers stale ShapeId facts #9078

Closed

Description

@proggeramlug

Release blocker

Full CI run 33264050779 fails deterministically in cargo-test-perry shard 1 on candidate 2705439.

Reproduction

PERRY_REQUIRE_NPM_E2E=1 cargo test -p perry --test issue_6559_real_libs_e2e real_fast_json_stringify_serializer -- --exact --nocapture

The dedicated Linux server reproduces it in about 161 seconds; macOS reproduces it in about 253 seconds. The compiled fast-json-stringify@7 fixture aborts at crates/perry-runtime/src/object/shapes.rs with:

published ShapeId disagrees with authoritative ObjectHeader facts

Disproved hypothesis

Disabling the in-place delete path from #9013 and restoring unconditional clone-on-delete does not fix the failure. The same exact assertion still fires, so #9013 is not the root cause.

Required diagnosis and acceptance

  • Report the stale ShapeId plus descriptor keys/count and authoritative keys/count at the assertion.
  • Identify the mutation/publication path that leaves the immutable descriptor stale.
  • Add a network-independent focused regression when the path is known.
  • The exact fast-json-stringify test must pass on the dedicated server.
  • Runtime shape tests, exact-SHA Full CI, and exact-SHA Simulator must pass before release.

Activity

  1. changed the title [-]runtime: clone keys on delete when shape sharing is not proven[/-] [+]runtime: fast-json-stringify triggers stale ShapeId facts[/+] on Aug 29, 2026
  2. proggeramlug commented on Aug 29, 2026

    @proggeramlug
    ContributorAuthor

    Fixed on release/v0.5.1519 by 40d2c5f.

    Root cause and validation:

    • try_birth_stamp_preinstalled_shape trusted pointer identity without validating the canonical keys array's current physical count; the failing object had a one-key descriptor over the same array after its length became zero. The fast path now fails closed and uses exact publication.
    • The real-libraries harness ignored CI's release runtime and rebuilt a debug/panic=unwind archive, contrary to Perry's production exception transport. It now honors PERRY_RUNTIME_DIR and otherwise builds --release.
    • Dedicated Linux server: all three focused preinstalled-shape tests passed.
    • Production-equivalent exact test passed: PERRY_RUNTIME_DIR=.../target/release PERRY_REQUIRE_NPM_E2E=1 cargo test -p perry --test issue_6559_real_libs_e2e real_fast_json_stringify_serializer -- --exact --nocapture (1 passed, 0 failed).
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