Skip to content

List the commitment fields participants can see, not the ones they can't #447

Closed

Description

@richshaw

Follow-up to #395.

#395 stops participant responses (sign up, view, edit, move) from returning editTokenHash and idempotencyKeyHash. It does this by removing those two fields by name (withoutServerOnlyHashes in src/lib/public-commitment.ts).

The catch: if a new server-only column is added to commitments later, it will go out in participant responses unless someone remembers to add it to that list.

Suggested fix: build participant responses from a list of the fields they're allowed to see, for example by selecting only those columns. A new column then stays private until someone decides to share it. The two hashes would only be read where they're checked (the edit-link check and sign-up retries).

Done when: participant responses come from an explicit list of fields, and a test fails if a response includes anything not on that list.

Activity

  1. richshaw commented on Oct 17, 2026

    @richshaw
    OwnerAuthor

    Queued for the pipeline. One note for whoever builds it, so this stays a refactor with no visible change:

    • The allowed list is what participant responses return today: every commitments column except editTokenHash and idempotencyKeyHash. Don't drop any other field in this change. Trimming the list further would change the API, and that's a separate decision.
    • It touches the sign-up hot path (the retry lookup inside the slot lock), so pnpm test:db and the query-budget test must pass.

    Checked against main at db1dfa3. https://claude.ai/code/session_01CtNZE4zh9ehfmZfF7MGQqH


    Generated by Claude Code

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions