Files
antje e87012d765
CI/CD / image (push) Failing after 33m35s
CI/CD / gate (push) Successful in 12s
CI/CD / containment (push) Successful in 1m22s
CI/CD / rollout (push) Skipped
CI/CD / reach (push) Skipped
CI/CD / fanout (push) Skipped
CI/CD / receipt (push) Skipped
Hanzo CI/CD / cicd (push) Successful in 12s
answer: the model may choose a result's SHAPE, not its markup
The extension renders structured result widgets (comparison, steps, stats,
timeline, entity, definition) but nothing emitted them: /v1/ask's stream is
status|sources|text|follow_ups|done and the system prompts never mentioned the
format. The client was ready and the producer was missing.

widgetRule teaches the one format both modes share, so search and research
cannot drift apart. It says three things beyond the schema:

- Only when the question's SHAPE calls for one, at most two, most answers none.
  A widget on every answer is a worse document, not a better one.
- The PROSE MUST STAND ALONE. The client validates every block and drops
  anything malformed — a ragged table, an unknown kind, a field of the wrong
  type — keeping the prose. An answer that leaned on a widget to be complete
  would read as a hole exactly when validation refused one.
- DATA ONLY, NEVER HTML. This model reads the open web, so every page it
  fetches is a potential injection source. Markup it authored would be a path
  into the extension's origin, which holds the user's session. The renderer
  owns the shapes and escapes every field; the model owns only content.

widget_rule_test.go is the closest thing to a shared type across the two repos.
The renderer lives in the extension, so a typo here fails nothing: it produces
answers whose widgets silently never appear, which looks exactly like a model
choosing not to emit one. The test parses every example out of the prompt and
holds it to the shape the client accepts — one example per kind, every required
field present, the comparison example rectangular (the client drops ragged
tables rather than padding them), and both modes carrying the rule.

Negative control run: renaming the steps example's field to "items" fails with
`kind "steps" example omits required field "steps"`.

Pre-existing and unrelated: the root package does not build right now
(middleware_spend.go, another session's in-flight work). apps/answer builds and
tests clean.
2026-08-05 00:56:04 -07:00
..