Skip to content

id: impl: Postgres HTTP query translator with allowlist (from #5805) #13760

Done

Description

@dezren39

Implementation slice of #5805 (Postgres-over-HTTP adapter). Design: doc/2026-11-23T20-55-00Z_design_id5805_postgres_http_adapter/2026-11-23T20-55-00Z_design_id5805_postgres_http_adapter.md (branch oc05/id5805-postgres-design). Scope and invariants are in that record; this issue does not reopen the design.

Done check: property tests over the query object and model tests over the §3.2 refusal table pass in CI (record §3, §10).

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T21:13:50Z",
    "session_id": "ses_e5df5d3c321ffeLr1zhmh51bAN",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code.wt/oc05-5805",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code.wt/oc05-5805",
      "repo": "developing-today/code",
      "branch": "oc05/id5805-postgres-design",
      "sha": "b3a07c2641e7efdfbad1da63311be781467c606b"
    },
    "auth_subject": "oc-code-03",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. added
    app/id
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Triage verdict (lane oc-code-05, queue task 22415, coverage reconciliation pass 2 — tracking #14158):

  4. added a commit that references this issue on Nov 24, 2026
  5. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    Contributor

    Implemented and merged — queue task 23263 (lane ITEM-WORK-148), PR #14363, merge commit b7cd916cec8e21095006b162d8f57deaee7628f9 (head 95b052fa verified as an ancestor of origin/main).

    What landed: new crate pkgs/id/crates/id-pg — the §3 query translator for the Postgres-over-HTTP adapter:

    • The id: design: ID query language/shape v1 (from #5675) #5816-shaped query object (one collection, declared projection, conjunctive filters over the closed operator set, ordering on declared keys, keyset pagination, capped limit), which can also express every refused shape so refusal stays a translator decision.
    • The owner collection allowlist in the design-specified shapes (this slice implements against those shapes directly, per the triage routing note, rather than waiting on id: impl: Postgres HTTP adapter registration and owner config (from #5805) #13758; registration will construct these after its §4 checks).
    • The pure translator: fixed refusal precedence, §3.2 stable feature names, unknown relation collapsed to not_available, keyset cursors emitted as the adapter-generated lexicographic or=(...) over the effective ordering (declared keys + unique-key tiebreak), refusal bodies that depend only on code + feature name so undeclared and withheld columns are byte-identical (§6.2).

    Done check (§3, §10): cargo test -p id-pg — 22 passed, 0 failed: 5 unit tests, 15 model tests over the §3.2 refusal table (incl. the identical-body test and the default-500 cap), 2 property tests (128 cases + a regression seed the run itself caught — an over-strong totality assertion in the first test draft; translator behaviour was correct). Route note: tests ran on the laptop in the pkgs/id nix dev shell — the fleet Actions exec runner cannot check out this repo and has no nix/Rust toolchain for pkgs/id, and repo CI runs on main only.

    CI caveat, stated plainly: the id-pg tests are part of the workspace suite that CI runs on main, but that suite is currently red for a pre-existing, unrelated reason — #14315 (id-store compile break from the 2026-11-24 grouped cargo bump; fix in flight as queue task 23352). id-pg does not depend on id-store and is green standalone. The in-CI pass of these tests becomes observable when #14315 lands; if anything in id-pg fails there, it will surface as a new finding against this crate.

    Book: the ID book's crate counts were re-derived (19 crates / 20 members / 17 default packages) and corrected in the layout, crates, architecture, and shape chapters in the same PR; roster entries added for id-pg (plus the missing id-client / id-tui-shell rows).

    Closing as completed: the translator slice is implemented, tested, and merged. Sibling slices remain open as filed: #13758 (registration), #13761 (typed mapping), #13762 (error mapping), #13763 (read paths), #13764 (fixtures).

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

    app/idstatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions