postjevsql.git / crates / postjevsql-core

For agents, on top of README.md, which they read first.

  • #![forbid(unsafe_code)], no pgrx, no I/O, no clock or randomness: pure functions only. gcra takes now and the atomic words as arguments; it never reads a clock or owns its storage. Anything touching Postgres goes in postjevsql-pg.
  • The key hashes the bytes jev_protocol::question_bytes and the state Json produce, the same serializer as the request body. Never hash a re-serialized or sorted copy: a key that differs from what was sent is a wrong key.
  • Adding a field to the key, or changing its framing, invalidates every stored answer: bump the v1 domain tag. Changing how SQL becomes a question bumps PROMPT_VERSION instead.
  • Row in instructions stays unreachable until the layout-parity gate passes. LayoutParity is an empty enum on purpose; do not give it a variant, a constructor or a Default to "enable" the layout. A row is placed only from a Planned the planner returned.