Skip to content

The dependency allowlist and the helper inventory: what the release lists and what the SDK ships #302

Closed

Description

@allisonmahmood

Part of #294.

Question

What does the release's dependency allowlist hold, and what helpers does the SDK ship in v1? Decided while charting: a patch depends on patchy and on a short list of exact package versions the release names and Patchy has audited (first entries preact 10.x and @preact/signals, types in-package, for the client; the server list empty to start; React and React Aria Components were the original entries and were replaced by the Preact decision on the server function contract, which also names Zag.js as the accessibility candidate the CRM must prove); copied source is the company's own code; the helper inventory is frozen only after the reference CRM shows what is missing. With the research and the CRM in hand:

  • The first allowlist: which entries, at which versions, and the rule for adding one (a Patchy decision per release, recorded where).
  • How init, refresh and publish keep a repo on the list, and what an off-list dependency is told.
  • The server built-in surface the engine guarantees (Intl, Web Crypto, TextEncoder, structuredClone, URL, Temporal if present) and what is deliberately absent.
  • The v1 helper floor: handler-argument schemas through t, typed calls and subscriptions, authorised file handles; money and CSV helpers only if deal amounts or import shipped in the CRM.
  • What stays deferred and how the spec says so: documents (PDF, spreadsheets), time-zone arithmetic and recurrence, phone-number parsing, accessible component libraries.
  • Where the list and the deferred list are written so agents read them before building.

Inputs: the needs research, the reference CRM, the destination ticket. Output: the dependencies section of the spec and a docs/product.md paragraph under What a patch is made of.

Activity

  1. added
    wayfinder:grilling
    on Sep 19, 2026
  2. allisonmahmood commented on Sep 27, 2026

    @allisonmahmood
    OwnerAuthor

    From the repo and dev loop resolution (2026-09-27): refresh owns the release's managed pins. It writes the exact versions the release names into package.json (patchy, the allowlist entries, and workerd on tier 2) and touches no other key. Publish refuses a mismatched pin with release_mismatch. The import check runs on tier 1's page code as well as tier 2's graphs and refuses with import_refused (exit 1). Decide here which allowlist entries are managed pins and what an off-list dependency in package.json or an import is told.

  3. allisonmahmood commented on Sep 27, 2026

    @allisonmahmood
    OwnerAuthor

    From the reference CRM resolution (2026-09-27): the list is the floor only: patchy, preact, @preact/signals (Allison). Zag.js and @tanstack/preact-table are not listed. Both ran under compat, but with both installed one fresh agent imported neither and the other used only Zag's dialog, for +24 KB gzip. Every run hand-wrote a CSV parser (29–131 lines), an email regex and Intl money formatting, which is evidence for the helper inventory. Still open here: managed pins, the helper inventory and what an off-list import is told.

  4. allisonmahmood commented on Sep 28, 2026

    @allisonmahmood
    OwnerAuthor

    Resolution

    Grilled with Allison over three rounds on 2026-09-27 and 2026-09-28, with astra as the design pair across four passes. After the first round Allison reframed the ticket. There is no list of audited third-party packages. A patch has two kinds of code: the Patchy SDK and the company's own code. This comment is the dependencies section of the spec. It supersedes the allowlist wording in the destination and contract decisions, and the direct Preact pins in the repo and dev loop decision.

    The principle (Allison's)

    If an agent wants to take code from somewhere else to make its life simpler, it copies that code in itself. We are not responsible for it, we don't version it, we don't import it on our end. [...] If something is not given by us and the agent wants it, it should know the restrictions we give it and build it on its own. Frontier agents could build an entire Patchy Cloud from scratch; we shouldn't assume they lack the capability to build complex things.

    Decided

    1. A patch has two kinds of code.
      • The Patchy SDK is the only code Patchy supports. The release versions it and refresh moves it forward.
      • Company code is anything the agent writes or copies in. A stored version holds it, but Patchy does not maintain it upstream, import it or answer for it.
      • Company code still runs inside the platform's restrictions: the sandbox, no fetch, no Node and the bundle cap.
      • We don't encourage hand-rolling an SDK capability and we never forbid it.
    2. The SDK has four parts (Allison's breakdown, plus Core):
      • Core: what every patch has. That is the generated client with typed calls and subscriptions, the contract (t, queries, mutations, actions), the UI foundation (Preact with compat semantics, useQuery) and the shell capabilities (me, the route bridge, file downloads, generated-file download).
      • Primitives: typed application capabilities whose behaviour Patchy guarantees, such as tables and file stores.
      • Integrations: typed operations and reliable handling of an outside system, such as Postgres and later Salesforce.
      • Helpers: optional reusable code for common patterns agents shouldn't keep reinventing, imported only when the patch does that kind of thing, such as CSV and later PDF.
      • New capabilities arrive as SDK modules, never as "import this external package". Patchy owns the API, so it can change the implementation behind it.
    3. SDK modules may be built on third-party code, and the skill says so when that helps the agent. It says "Preact with compat semantics", and it says "patchy/csv is based on PapaParse". The API stays Patchy's: the helper does not expose the library's own options. Keeping that code and its licences up to date is Patchy's job.
    4. The import check is a build contract, not a security boundary.
      • It keeps patches free of huge dependency trees and stops Patchy from appearing to support packages it doesn't.
      • Containment is what keeps patches safe.
      • The server does not try to detect which packages went into a bundle.
    5. patchy is the only import root.
      • patchy bundles exact preact 10.29.8, @preact/signals 2.11.2 and the @preact/signals-core those resolve. They ship as bundledDependencies, the way PGlite already ships, inside the release tarball whose URL carries its content digest. One pin therefore freezes the whole UI stack, and nothing is left on a range.
      • tsconfig sets jsxImportSource: "patchy/preact".
      • The page graph may import patchy/preact (with its jsx-runtime and jsx-dev-runtime entries) and patchy/csv. The server graph may import patchy/server and patchy/csv.
      • Allowed imports are graph-specific entry points, not everything under patchy/*.
      • This replaces the direct preact and @preact/signals pins. Preact bumps now arrive with a new patchy release. Preact 11 is a release decision made after it goes stable.
    6. Managed pins are patchy, plus workerd on tier 2. refresh writes nothing else. There is no pnpm.overrides. Publish's release_mismatch is unchanged.
    7. An off-list import still gets import_refused (exit 1) in dev and publish, on both tiers.
      • The message names the package, the importer and the graph's entry points, then states the rule once: "anything else, write or copy into your patch as your company's own code".
      • It gives no "don't vendor" or "ask Patchy" line.
      • package.json is not checked. The import is the only gate.
    8. What stored versions keep. "Stored patches retain their bundled helper code. Hosted implementations may change behind supported wire contracts without requiring republish."
      • A helper fix reaches a patch when it rebuilds and publishes after refresh.
      • Compatibility means inputs, outputs, errors and documented semantics, not identical bytes.
    9. v1 adds two things to the SDK.
      • patchy/csv, a helper: a synchronous text codec on PapaParse that works on the page and the server.
        • Rows come back exactly as written, and it accepts a BOM, CRLF or LF, and quoted multiline fields.
        • An unterminated quote fails the whole parse and names its line.
        • records reads the first row as headers. A duplicate header is an error. A row with the wrong number of fields is a per-row error with its line number, never padded. Only empty physical lines are skipped.
        • stringify writes CRLF and quotes as needed. Formula protection is on by default (a ' prefix on text cells starting with =, +, -, @, a tab or a CR; numbers untouched). It can be turned off and is documented as not lossless.
        • Processing a large stored CSV on Patchy's side, if it ever ships, is a separate async operation in the same module, not a change to parse.
      • Generated-file download, in Core. The frame is sandboxed without allow-downloads, so company code cannot start a download at all. Put-then-download forced a declared store, a retained object and quota use just to get past that restriction.
        • download(name, data) hands a Blob or bytes to the shell.
        • The shell shows its own download action with the filename and size, because a frame's claim of a user click is never trusted.
        • The shell enforces the size limit, measured in encoded bytes.
        • Success means the browser took the file, not that the user saved it.
        • Stored-file download stays a separate capability.
      • There is no money helper, validator, listAll, router or component layer. Typed ctx.run and a bound per-kind Context type are contract fixes for the spec, not helpers.
    10. Adding to the SDK is a Patchy decision.
      • A capability is considered when patch code can't get past a platform restriction or resource limit, or when real patches keep needing the same thing. Considering it doesn't oblige us to ship it.
      • A patch asking for something opens an investigation. It doesn't satisfy the bar.
      • The PR is the record. There is no registry document.
    11. The runtime promise has three statuses: supported, refused on purpose, incidental.
      • Server. Supported, each backed by a release test against the pinned workerd:
        • Intl for the formatters the spec names, including exact formatting of decimal strings through NumberFormat;
        • Web Crypto (randomUUID, getRandomValues, subtle);
        • TextEncoder/TextDecoder, structuredClone, URL/URLSearchParams, atob/btoa and BigInt.
          Refused: fetch and sockets, Node built-ins (process, Buffer, node:*) and eval/new Function. Everything else is incidental and unsupported, including Temporal if workerd ships it. We don't forbid it, we just don't promise it.
      • Page. The supported browsers and the sandbox contract, written against the full enforced policy (what is refused and what the shell provides instead). No named API list.
    12. Browsers: v1 supports Chromium-based desktop browsers only (Chrome, and Edge through Chromium). Allison: "I just don't wanna deal with browser support in v1 if we can just tell people to use Chrome."
      • No CI for Firefox, Safari or mobile, because CI that doesn't block merges isn't wanted.
      • docs/product.md and the served-page docs say to use Chrome.
      • Other browsers are after v1.
    13. Skills carry delivery facts, not recipes. For example: a page is at most 1,000 rows; cursors are not snapshots; Postgres numeric and int8 arrive as strings; the limits of each handler kind. Real patches are built in conversation with a person, so patchy-loop gains one line: talk through edge cases and product behaviour with the person before building. User preferences come from the user, not the skill.
    14. The toolchain belongs to the builder. Vite, the single-file plugin, TypeScript and @types/* are laid down by the scaffold as caret ranges and are never managed pins.
      • The release names the toolchain versions it was tested against and the range it accepts.
      • Dev and publish check the Vite and plugin versions they actually load and refuse unsupported ones with the upgrade to make.
      • refresh announces a required toolchain upgrade but never edits those keys.
    15. refresh announces new capabilities. Its output and --json name the SDK capabilities the installed release adds, with where each runs and its limits. It never rewrites company code.
    16. Where agents read it. Generation renders the SDK's entry points and capabilities, grouped Core, Primitives, Integrations, Helpers, into a "What the SDK gives you" section of the patchy-loop project skill, so it always matches the release. import_refused points at that section. docs/product.md gets one paragraph under What a patch is made of.
    17. What the SDK doesn't offer yet is recorded in the spec as a statement, not a prohibition. That covers PDF, spreadsheets beyond CSV, time-zone arithmetic and recurrence, phone parsing, accessible component libraries, rich text, charts and HTML sanitisation. Agents may build any of them as company code. Where a platform fact bears on one, the skill states it. For example, window.print() works in the frame, which covers print-to-PDF.

    Build acceptance (engineering checks, not further decisions)

    Before the build relies on decision 5, exercise the actual release tarball through a clean pnpm install:

    • The installed tree holds exactly one preact, @preact/signals and @preact/signals-core.
    • Dev runs with Vite's dependency optimisation on, and the published artifact is built and run.
    • Signals, hooks, compat components and useQuery update together in one runtime instance.
    • JSX types resolve through patchy/preact/jsx-runtime with no direct Preact dependency in the patch.
    • Any dev debugging support is initialised through the SDK against the same instance.

    Glossary terms for the spec (drafted here, written at the spec ticket)

    • Patchy SDK: everything a patch imports from patchy: Core, Primitives, Integrations and Helpers. It is versioned by the release and the only code Patchy supports. Avoid: allowlist, standard library
    • Core: the part of the SDK every patch has: the generated client, the contract, the UI foundation and the shell capabilities.
    • Helper: an optional SDK module of reusable code for a common pattern, bundled into the patch that imports it (patchy/csv). Avoid: utility, plugin, extension
    • Company code: code in a patch that the agent wrote or copied in rather than imported from the SDK; the company's own, and not maintained by Patchy. Avoid: vendored package, third-party code
    • Primitive and Integration keep their existing definitions.
    • Managed pin (from the repo and dev loop decision) narrows to patchy, plus workerd on tier 2.

    Handed on

    • Limits: the generated-file download payload limit, and CSV parse input bounds, measured after decoding.
    • Native resources: land the member directory in one of the four SDK parts. It reads as a Primitive belonging to the company.
    • Spec: every decision above as the dependencies section; the supersessions in the opening paragraph; the browser line in docs/product.md; the build acceptance list; the glossary terms.

    Grilled by Claude Fable 5.1 via Claude Code with Allison, astra as the design pair, 2026-09-28.

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

Metadata

Metadata

Labels

wayfinder:grilling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions