Skip to content

Core sync: wire gaps — discovery maxAttachmentBytes, relatedTo label param, dissociate without DELETE-body, optional timezone (core #56, #69) #39

Description

@cuibonobo

Server side of the haverstack/core#56 wire-gap batch plus the config item from haverstack/core#69.

1. Discovery omits maxAttachmentBytes (core #56 item 4)

/.well-known/stack (src/routes/wellknown.ts:8-15) returns version/entityId/timezone/capabilities only. The server has a configured limit and returns 413 past it, but clients can only discover it by burning a full upload. Add maxAttachmentBytes (or null = unlimited) once the spec/AdapterCapabilities field lands.

2. relatedTo label param name (core #56 item 1)

Core #56 adds relatedToLabel to the spec's GET /records param list. This server already implements the concept but under its own name, relatedLabel (src/routes/records.ts:106) — undocumented in the spec, so adapter-api will send a param we ignore, silently widening the query (the exact failure #56 exists to kill). Rename to whatever the spec lands on; conformance fixture pins it.

3. DELETE /records/:id/associations reads a JSON body (core #56 item 3)

src/routes/records.ts:320-326. DELETE bodies have no defined semantics (RFC 9110 §9.3.5) and get dropped by proxies. Core #56 respecs this — likely POST /records/:id/associations/delete or query-param discriminants. Implement the replacement; keep the old route through a deprecation window only if the owner wants one (no install base argues for cutting straight over, per the standing policy).

4. TIMEZONE default pretends knowledge (core #69 item 2)

Core #69 makes timezone optional at init — "default absent, not 'UTC' — a default pretends knowledge." The server's config does exactly the pretending: optional('TIMEZONE', 'UTC') (src/config.ts:32). Make it truly optional passthrough (absent unless set), update .env.example/README, and let discovery omit it when absent.

Also from #56 but requiring no server change: content-filter capability honesty is adapter-api's throw-don't-widen fix; this server declares contentFieldQuery truthfully via stack.features already. The getType-per-write cache is core-side; it will reduce server load for free.

Work items

Refs haverstack/core#56, haverstack/core#69, #32.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions