Skip to content

docs: document the racket value model, in-process backend testing, and macos native-ui orchestration (#325) - #326

Merged
turinglambdaai merged 1 commit into
mainfrom
docs/journey-gaps-325
Oct 25, 2026
Merged

turinglambdaai merged 1 commit into
mainfrom
docs/journey-gaps-325

Conversation

@turinglambdaai

Copy link
Copy Markdown
Owner

Summary

Fixes #325. The clean-room taskboard journey under #314 (context-free agent, documented inputs only, green packaged acceptance on macOS) surfaced five high-impact documentation gaps; this PR converts each into documented truth, verified before writing:

  1. Racket value model (protocol.md): define-record/define-enum generate constructors named after the type; record-ref/enum-case are the accessors; (void) is the only Optional null ('()/#f rejected — the encoding is type-directed); record values are tied to the declaring module instance (fresh-namespace tests must take record-ref from the same namespace).
  2. In-process backend testing (product-acceptance.md): a runnable recipe driving serve over pipes with the public rivet/protocol frames — no hand-written codec needed (the journey hand-wrote one only because this recipe did not exist). Documents the hello-before-first-frame ordering and that a State mutation emits the $state event before the response frame. The exact sketch in the doc was executed against a real backend before being committed.
  3. macOS native-ui launch orchestration (native-ui-testing.md): packaged-bundle location, disposable data root, pid handoff, exit polling, restart leg, Accessibility trust.
  4. Keyboard injection (native-ui-testing.md + reference driver): focus (kAXFocusedAttribute assertion), typeText (CGEvent unicode events), postKey (Return 36 / Escape 53), closeWindowOrderly — added to macos-ax.swift so the documented "copy the driver" path covers keyboard scenarios.
  5. Generated-identifier rule (getting-started en/zh): snake_case end to end (created-at-ms → created_at_ms) and the build-before-native-UI ordering.

Validation

  • The in-process recipe sketch was executed for real (backend with define-state/define-rpc, hello asserted, $state-then-response ordering asserted, orderly shutdown) before being documented.
  • swiftc -typecheck rivet/tests/native-ui/macos-ax.swift green.
  • raco test rivet/tests/documentation.rkt: 731 passed (doc map/links).
  • raco test rivet/ rivet-cli/: all green (the live DMG suite passes standalone; it skips only when the Finder-automation probe times out).

Scope

Docs and the reference test driver only — no product-facing code changes. Per #314's slice order, the fixes should be re-validated by repeating a journey slice against the updated docs.

…d macos native-ui orchestration

Findings from the clean-room taskboard journey (#314): a context-free
agent reached a green packaged acceptance from documented inputs alone but
had to black-box-probe or invent five things. This ships each one as
documented truth instead of per-agent improvisation.

- protocol.md: the Racket-side authoring model - define-record/define-enum
  generate constructors named after the type, record-ref/enum-case are the
  accessors, (void) is the only Optional null, and record values are tied
  to the declaring module instance.
- product-acceptance.md: a validated in-process backend recipe using the
  public rivet/protocol frames over pipes with serve, including the
  hello-before-first-frame and state-event-before-response orderings.
- native-ui-testing.md: the macOS launch orchestration (packaged bundle,
  disposable data root, pid handoff, exit polling, restart leg) and the
  real keyboard path (focus assertion + CGEvent typing).
- macos-ax.swift: focus/typeText/postKey/closeWindowOrderly helpers in the
  reference driver so keyboard scenarios copy over (type-checked).
- getting-started (en/zh): snake_case native identifier rule and the
  build-before-native-UI ordering.

The in-process recipe and the state-event ordering were executed before
being documented; the driver type-checks.
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.

docs: document the Racket-side value model and the backend/native-ui testing paths (taskboard journey findings)

1 participant