Skip to content

docs(examples): finish the DX-audit backlog — 5 examples polished, proven, simplified#430

Merged
drewstone merged 1 commit into
mainfrom
chore/examples-backlog-2
Jul 1, 2026
Merged

docs(examples): finish the DX-audit backlog — 5 examples polished, proven, simplified#430
drewstone merged 1 commit into
mainfrom
chore/examples-backlog-2

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Clears the remaining backlog from the examples DX audit (#428). Each fix verified — tsc 0, lint clean, and the offline-runnable ones run end-to-end ($0).

Example Fix Proof
intelligence-drop-in The headline (OFF tier = $0 intelligence) was asserted, never shown. Now records inference-only at OFF, flushes, and reads the exported span back to prove intelligence_usd=0 (throws otherwise). Dropped the confusing double-client ceremony; README rewritten (glosses Mode 0, adds "Going live"). runs $0, exit 0
strategy-suite The authored doubleCheck was a near-clone of built-in refine. Rewrote it as a policy the built-ins don't have — require two consecutive passes before done (a flake guard) — the real point of defineStrategy. Fixed the README (listed 4 built-ins, ran 2). runs $0, exit 0
agents-of-all-shapes shipToTangleOtlp hand-rolled the OTLP envelope — the exact wire createOtelExporter produces (the primitive the example teaches). Routed through createOtelExporter (45→25 lines). npx→pnpm. runs $0, exit 0
self-improving-loop The n=3 "small-n mirage" warning was restated 4×; trimmed to one authoritative block + brief pointers.
agentic-data-creation Softened an unverifiable future-dated citation (arXiv 2606.25996 / "Meta FAIR" / "the paper's Table 1" + specific figures) stated as fact → the real technique (self-instruct, Wang et al. 2022) + "illustrative target" framing.

The key catch (senior detail)

intelligence-drop-in's original assertion would have failed if I'd naively "read the span back" — recordOutcome doesn't clamp, so recording intelligenceUsd: 0.05 at OFF was itself wrong (OFF can't have intelligence cost). And the OTLP attribute is loop.tangle.usage.intelligence_usd with intValue: "0" (string), not tangle.usage.intelligence_usd. Both found by actually running it and dumping the wire payload — not by assuming.

Verification: src + examples typecheck 0; lint clean (359 files); intelligence-drop-in / strategy-suite / agents-of-all-shapes all run offline to exit 0.

…oven, simplified

Clears the remaining backlog from the examples DX audit (#428). Each fix verified (tc 0, lint clean;
the offline-runnable ones run end-to-end $0).

- intelligence-drop-in: the headline (OFF tier = $0 intelligence spend) was ASSERTED, never shown. Now
  the example records inference-only at OFF, flushes, and reads the exported span BACK off the collector to
  PROVE intelligence_usd=0 (throws otherwise). Dropped the confusing double-client ping ceremony; README
  rewritten to match (glosses Mode 0 / inference-vs-intelligence, adds a 'Going live' section). Runs $0.
- strategy-suite: the authored doubleCheck was a near-clone of built-in refine. Rewrote it as a policy the
  built-ins DON'T have — require TWO consecutive passes before done (a flake/luck guard) — the real point
  of defineStrategy. Fixed the README (it listed 4 built-ins but the run compares 2). Runs $0.
- agents-of-all-shapes: shipToTangleOtlp hand-rolled the OTLP resourceSpans envelope — the exact wire
  createOtelExporter produces (the primitive the example itself teaches). Routed it through
  createOtelExporter (~45 lines → ~25). Aligned npx→pnpm. Runs $0.
- self-improving-loop: the n=3 'small-n mirage' warning was restated 4×; trimmed to one authoritative
  block (the ⚠️ at the gate) + brief pointers.
- agentic-data-creation: softened an unverifiable future-dated citation (arXiv 2606.25996 / 'Meta FAIR' /
  'the paper's Table 1' with specific figures) stated as empirical fact → the real technique name
  (self-instruct, Wang et al. 2022) + 'illustrative target' framing for the by-construction numbers.

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Auto-approved drewstone PR — 8703e398

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: drewstone_author · 2026-07-01T05:24:54Z

@drewstone drewstone merged commit 434a519 into main Jul 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants