Skip to content

ttl: add diagnostic severity model and non-deterministic task warnings #221

@kdy1

Description

@kdy1

Summary

Diagnostics currently represent only error-like records and do not carry severity levels or warning-class signals for non-deterministic task patterns.

Evidence

Contract Evidence:

  • docs/project-ttl-language.md:230
  • cmds/ttlc/internal/diagnostic/diagnostic.go:5

Current Gap

Diagnostics currently represent only error-like records and do not carry severity levels or warning-class signals for non-deterministic task patterns.

Proposed Scope

  • Not documented yet.

Acceptance Criteria

  • Extend diagnostic model with explicit severity (for example: error/warning/info).
  • Introduce warning diagnostics for non-deterministic task patterns per documented contract.
  • Preserve command status behavior so warnings do not incorrectly force fatal failure.
  • Update tests to validate mixed diagnostic severities.

Test Scenarios

  • Pure warning case returns warning diagnostics without runtime crash.
  • Error + warning case preserves failure semantics with both records present.
  • Existing error-only flows remain backward-compatible.

Out of Scope

  • IDE/language-server integration.
  • Heuristic warning families not tied to deterministic contract.

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