Skip to content

test(core): stableStringify has no unit tests despite being security-critical #21701

Description

@AdamyaSingh7

What happened?

packages/core/src/policy/stable-stringify.ts is a security-critical utility used for policy rule matching with no dedicated unit tests.
The function handles complex edge cases (circular references, toJSON, sorted keys, undefined/function coercion) that are only indirectly tested via policy-engine.test.ts.

What did you expect to happen?

A dedicated test file covering all documented behaviors of stableStringify, including primitives, sorted keys, arrays, circular references, and toJSON support.

Client information

Not Applicable

Login information

No response

Anything else we need to know?

The JSDoc already documents all expected behaviors with examples, making this straightforward to test directly.

Activity

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

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityeffort/small1 day or less: trivial logic, UI adjustments, docskind/bugpriority/p2Important but can be addressed in a future release.status/bot-triaged

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions