Skip to content

perf(people): bind separation support references to canonical token_urlsafe output #391

Open

Description

@seonghobae

Finding

Fresh audit of Draft #317 against canonical People #64 found one remaining response-envelope false-GREEN in tests/performance/employment_separation_response_contract.mjs.

The active People owner generates every client-visible support_reference through _send_error() with _SUPPORT_REFERENCE_RANDOM_BYTES = 24 and token_urlsafe(24). Python secrets.token_urlsafe() URL-safe-base64-encodes the requested random bytes and strips padding; 24 bytes are exactly 32 base64url characters because 24 is divisible by 3. Canonical #64 therefore emits err_ plus exactly 32 [A-Za-z0-9_-] characters.

The current performance consumer accepts ^err_[A-Za-z0-9_-]{20,80}$. A governed-looking 409 response can therefore pass commercial response validation with a 20-, 24-, 31-, 33-, or 80-character suffix that canonical #64 cannot emit. This is evidence-contract drift, not an HR-domain change.

Required repair

Owner: Draft #317 (perf/employment-separation-buyer-path).

Activity

  1. seonghobae commented on Sep 15, 2026

    @seonghobae
    ContributorAuthor

    Repair lineage is now present on Draft #317 without moving People/domain truth. Test-first 3abbd2600c7301b820a5fee34fdaed8a3ae35ad4 changes the nominal conflict fixture to the canonical 32-character suffix and adds false-GREEN cases for 24/31/33/80 characters; the predecessor {20,80} regex accepted those non-canonical lengths. Causal successor de8b8ea71600e8b5c1f5acda4258562cde17dce0 narrows only SUPPORT_REFERENCE_PATTERN to ^err_[A-Za-z0-9_-]{32}$. Focused boundary reproduction is GREEN for 32 and fail-closed for the non-canonical lengths. No hosted k6 workflow exists on this exact head, so this is not commercial latency or hosted acceptance evidence. Keep #391 open through protected/integration acceptance.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions