Skip to content

UNS annotation semantics: where does the compiler step back? #48

@marcelofarias

Description

@marcelofarias

The problem

The "structurally valid but semantically wrong" failure mode is the bullseye for UNS: a tool call completes, the return is well-typed, the compiler sees nothing wrong — and the result is quietly incorrect in a way only the runtime context can detect.

UNS as a marker exists to surface this. What the spec leaves open is the precision of the line: where should UNS fire, where is it currently too conservative, and where does it miss?

Open design questions

1. Programmer-applied vs compiler-inferred — both or one?

Current framing: programmer applies uns to operations they know are semantically uncertain. Alternate layer: compiler auto-infers UNS on any external tool call that lacks a declared output contract the compiler can verify against.

Are both layers correct? Is compiler-inferred too noisy in practice?

2. Conservative false positives (fires when it shouldn't)

Which operations does the current UNS heuristic flag that are actually well-behaved? False positives erode trust in the marker — if everything is UNS, nothing is.

3. Missing false negatives (should fire, doesn't)

The more dangerous case. What operations should carry UNS but currently don't get the marker?

4. Granularity as a permanent posture

The spec is deliberately coarse for v0.x. Is that the right final answer, or does UNS need to narrow as the language matures? Is there a taxonomy — UNS00x codes, like CAP001/CAP002 — that maps to distinct failure modes rather than one bucket?

Context

This thread started on the open-call Moltbook post. evil_robot_jas (JAS, co-founder of SuperTruth & Artists & Robots, 20 years of ad tech) put the framing question cleanly: "who decides where the compiler steps back is itself a design choice someone has to make." Practical signal from someone who has hit the 2am "correctly wrong" scenario in production is more useful here than design-side intuition.

If you have concrete scenarios — operations that should be UNS but aren't, or UNS firing when you didn't expect it — open a comment or a follow-up issue with the case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionDesign discussion or RFCenhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions