Skip to content

Stabilize strict-mode warning ordering for additional-properties diagnostics #17753

@davidahmann

Description

@davidahmann

Problem

Strict-mode validations can emit equivalent warning/error sets in unstable order when unknown-property diagnostics contain multiple fields, creating flaky snapshots and noisy review diffs.

Why Now

Strict mode is increasingly used as a production gate, and unstable ordering is causing avoidable churn in CI and reviews.

Impact

Operators cannot distinguish behavioral drift from message-order noise, slowing remediation.

Evidence Packet

  • Version/commit: c6255e8e8 (local branch based on github/gh-aw)
  • Environment: Darwin 25.3.0 arm64, go1.25.7
  • Repro:
    1. Compile strict-mode workflow with multiple unknown properties in one schema path.
    2. Observe unknown-property message ordering in compiler output/snapshots across runs.
  • Expected: deterministic lexical ordering for emitted unknown-property names.
  • Actual: ordering can follow upstream error text ordering and is not normalized.

Why Code (not docs)

This is produced in parser/compiler formatting paths; docs cannot enforce deterministic output.

Codepaths

  • pkg/parser/schema_errors.go
  • pkg/parser/schema_deprecation.go
  • pkg/workflow/strict_mode_deprecated_test.go

Acceptance

  • Unknown-property warnings/errors are deterministically ordered.
  • Strict-mode regression test confirms repeated runs are byte-identical.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions