Skip to content

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

Closed

Description

@turinglambdaai

Source

Clean-room taskboard journey under #314 (2026-10-25): a context-free agent implementing one keyboard/focus/draft/error-recovery scenario from documented inputs only reached a green packaged acceptance, but had to black-box-probe or invent the following. These gaps are the journey's primary output; the knowledge currently lives only in the journey project's comments, not upstream.

High impact

  1. Record values on the Racket side are undocumented. The constructor is the type name itself ((Task id title ms)), field access is (record-ref t 'field) — the name record-ref appears in no docs/*.md (found via namespace enumeration); match on a record is a syntax error. Document the construction/access model next to the schema docs.
  2. Optional null's Racket representation is undocumented. (void) is the only accepted null; '() and #f are rejected for Optional fields while being legal empty lists in (List T) contexts — the encoding is type-directed, which is nowhere stated. Without the experiment, a wrong representation surfaces only as a runtime Error frame at the RPC boundary.
  3. No "how to test a backend" guide. product-acceptance.md requires contract suites over "product behavior, schema, golden output, and real storage", but nothing documents instantiating and driving a backend in-process: serve's signature, two return values, plain binary ports, hello timing. The journey hand-wrote an LE codec + pipe pair to build a real RVT1 loopback test — worth shipping as a documented recipe instead of per-agent improvisation.
  4. No macOS launch orchestration for native-ui suites. native-ui-testing.md says "copy the driver, replace identifiers"; the Windows example is one pwsh -File line. Nothing covers: locating the packaged .app executable, passing --pid, injecting a disposable data root, awaiting orderly exit, and the restart leg. The journey's scripts/e2e/macos.sh is a working reference to draw from.
  5. No keyboard-input reference for AX drivers. The scenario alphabet is type + Return + Esc, but macos-ax.swift only demonstrates AXPress. Document the supported injection paths (focus via kAXFocusedAttribute + CGEvent unicode/keycode events) and their reliability boundaries, or extend the reference driver.

Medium/low

  1. Generated Swift naming rules (RPC → method, State getter/setter, Record fields stay snake_case, Optional → T?) are only inferable after a build; getting-started should state the build-before-native-UI ordering.
  2. Persistence/data-directory guidance is absent (platform conventions, override hook for disposable acceptance roots). The journey invented TASKBOARD_DATA_DIR + atomic writes.
  3. Record values cannot cross module instances (fresh-namespace "restart" tests hit a record-value? contract failure) — worth a sentence for test authors.
  4. raco docs is empty for rivet itself although inspect's capability-sourcing lists it as the first discovery command.
  5. Scaffold ships a GeneratedBackend.swift inconsistent with the scaffold's own host code until first build; a docs note would prevent first-read confusion.

Positive records (worked as documented)

Schema compatibility gate caught removals precisely; doctor/inspect/acceptance --json all matched their docs; evidence pre-clean + kind pinning worked; build errors pointed at exact Swift source lines; the reference driver skeleton (bounded waits, snapshot depth, orderly close) copied over cleanly.

Scope note

Fixing 1–5 is a docs/reference-driver change in this repository; it should be re-validated by repeating the journey slice after the docs land (see #314's slice order).

Activity

  1. added a commit that references this issue on Oct 25, 2026
  2. turinglambdaai commented on Oct 25, 2026

    @turinglambdaai
    OwnerAuthor

    复验结果(PR #326 合并后)

    第 1–6、8、10 项已由 #326 文档化,并经第二轮干净房演练验证有效:五项高影响判定里四项「文档直接可答」,进程内配方一项 90%(phase 1 逐字照抄即绿)。第二轮 agent 端到端绿,详见 #314 的复验记录。

    复验新录的中小缺口(本轮 agent 靠命名对称性/双兼容/探针收敛解决,均低风险但值得文档化):

    • 进程内配方的 fresh-namespace 细节:serve 须取自同一 namespace 实例;跨 namespace 引用需按文件路径 require
    • rivet/protocol 完整名面(message:response/message:error/frame-id)目前靠命名对称性假定
    • Error 帧 payload 的值编码 vs 裸 UTF-8 二义
    • 零参 RPC 的 Racket 语法未记载
    • 数据目录/持久化指南(第 7 项,仍未文档化——优先级最高,两轮 agent 都必须自行发明)
    • Swift 侧 RVT1 错误类型面未文档化
    • raco rivet package 默认 launch-smoke 行为、acceptance suite cwd 约定

    第 9 项(raco docs 为空)是 Scribble 文档建设,超出本次范围。本 issue 保持开放,数据目录指南收尾后可关。

  3. added a commit that references this issue on Oct 25, 2026
  4. turinglambdaai commented on Oct 25, 2026

    @turinglambdaai
    OwnerAuthor

    收尾记录(PR #327 已合并,main @ 9d766b4)

    #326 处理了五项高影响缺口;#327 处理复验轮的全部剩余项,每条先对照实现核实、两处配方(fresh-namespace 回环、零参 RPC)先真实执行再落笔:

    • 数据目录指南(configuration.md,两轮 agent 都被迫自创的最高优先项):三平台约定根目录、禁写区、acceptance 注入 disposable 根的 env 覆盖钩子、原子写、防御性加载。Rivet 有意不提供 API,约定现在是成文的规范。
    • fresh-namespace 重启配方(product-acceptance.md):namespace-require/copy 按文件路径 require + 从同一 namespace 取 serve/record-ref。
    • rivet/protocol 完整导出名面(product-acceptance.md)——测试不再靠命名对称性假定。
    • Error payload 消歧(protocol.md):RVT1 编码的 String 值而非裸 UTF-8 字节;Swift 侧 ClientError.backend(String)。
    • 零参 RPC 语法(protocol.md):(define-rpc (ping : String) "pong"),线请求为单元素列表。
    • 会话外 state-set! 保证(protocol.md):提交 cell 且不发事件。
    • raco rivet package 默认 launch smoke(native-ui-testing.md)与 suite cwd = 项目根(product-acceptance.md)。

    唯一遗留:第 9 项(raco docs 为空)是 Scribble 文档建设工程,超出文档修复范围——有需要时另立 issue。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions