---
id: TST-PFM-SEC-039
title: Safe next unit checks
kind: unit
product_area: platform
module: security
revision: 2
status: draft
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: react-console
files:
  - lib/auth/__tests__/safe-next.test.ts
implements:
  - ATS-PFM-SEC-006-02
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: The suite owns its input fixtures and installed doubles.
assertion_evidence:
  - provenance: test
    source: 'react-console:lib/auth/__tests__/safe-next.test.ts#safeNext'
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/safe-next.test.ts#keeps an internal path, with its query and
      fragment
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/safe-next.test.ts#keeps a deep link into a tenant's console,
      so sign-in returns to it
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/safe-next.test.ts#refuses anything that could leave the
      origin
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/safe-next.test.ts#refuses a malformed escape rather than
      letting it through undecoded
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/safe-next.test.ts#refuses an auth route, because returning to
      the login screen after signing in is a loop
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/safe-next.test.ts#keeps a path that merely starts with the
      letters of an auth route
  - provenance: test
    source: 'react-console:lib/auth/__tests__/safe-next.test.ts#answers the home path for nothing at all'
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/safe-next.test.ts#decides the same thing twice, so a value
      that survives can be re-checked safely
dependency_evidence: >-
  The test imports the authentication helper and supplies its inputs in-process. Browser storage,
  environment values or fetch responses are fixtures where the file replaces them; these checks do
  not call a live identity provider.
evidence:
  - 'react-console:lib/auth/__tests__/safe-next.test.ts'
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  Each binding names the scenario to which this file contributes assertions. A binding is not a
  recorded pass and does not extend the file’s dependency boundary.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
---
# Safe next unit checks

## Verification Boundary

The file evaluates production helpers with controlled inputs in-process. The assertion references identify the source checks for safe next.

## What This Suite Proves

The source assertions support the observations named in the bound scenarios. A scenario spanning multiple files must retain the other files’ contributions.

## What It Does Not Prove

This examination does not run the suite. Passing behavior, deployed conformance and the behavior of substituted dependencies require separate execution evidence.

## Real Dependencies and Test Doubles

The test imports the authentication helper and supplies its inputs in-process. Browser storage, environment values or fetch responses are fixtures where the file replaces them; these checks do not call a live identity provider.

## Must Not Be Doubled

Keep the production helper, schema, matcher or declaration under examination real. Substituting the decision itself would remove the behavior the assertions exercise.
