Repository navigation
chore(deps): bump the Effect RCs from rc.112 to rc.115 - #284
Conversation
allisonmahmood
left a comment
There was a problem hiding this comment.
Reviewed only git diff origin/portal/cleanup-portal-router...HEAD, commit 81708b6. No repository edits.
Standards
P2: The strict manifest contract was not carried through to its server consumer. packages/api/src/schemas.ts:404-420 removes GenerationManifest's strict annotation, but packages/sdk/src/SdkApi.ts:52-55 still uses default HttpApi payload decoding. This misses the root agent instructions' “Hit every surface” rule that wire changes follow through to the server handler. Restore strict decoding at the generation request boundary. This is the same defect examined under Spec below, not another independent bug. No separate smell finding.
Spec
-
P2: The new SQL splitter rejects valid PostgreSQL scripts.
packages/sql/src/index.ts:102-107stops block comments at the first*/and strings at the next quote, ignoring nested comments and escape-string backslashes. I ranSELECT E'it\'s; valid' AS value;and/* outer /* inner */ ; still comment */ SELECT 1 AS value;against disposable Postgres. Both execute directly; both fail throughSql.ddlwith SQLSTATE42601. The promised split “on statement ends” is incomplete. Track block-comment depth and PostgreSQL escape-string quoting, with regression cases. All eight current migrations do pass; this affects valid scripts beyond those fixtures. -
P2: Timestamp-without-zone parity changes outside UTC.
packages/sql/src/index.ts:49-58mapstimestampandtimestamptzidentically. UnderTZ=America/New_York,'2024-02-29 12:34:56.123'::timestampbecomes12:34:56.123Zthrough the new registry but17:34:56.123Zthrough company-database's configured PGlite parsers. Timestamp arrays diverge identically. The PR's claim that PGlite retains matching results is therefore incomplete. Preserve the previous local-wall-time interpretation for OID 1114, or explicitly normalize both adapters to UTC and document that change. Keep timestamptz as an instant. Add a non-UTC parity case; no current application query using plain timestamp was found. -
P2: SDK generation silently discards invalid manifest fields.
packages/api/src/schemas.ts:420removes the annotation without migrating/api/sdk/generateto an explicit strict parser. Reproduced with the actualGenerateRequestschema:columns.title = { kind: "text", optionall: true }succeeds and becomes{ kind: "text" }; strict decoding rejects it.SdkApi.ts:52receives this already-stripped payload. This contradicts the PR's “manifest ... decoders ... already pass” claim and the release instruction to move annotation settings to parser APIs. Decode the original request body strictly before generation, and cover a raw HTTP request so client encoding cannot erase the malformed field first.
Verification and remaining requested checks
- Correct the PR body's runtime claim: production
/api/runtime/calluseshandleRaw, strict RuntimeEnvelope decoding, and strict operation-handler decoding. PostgresShape extras are rejected there. The broker's request and route decoders are also strict. The direct RuntimeCall schema is permissive, but it is not the server admission decoder. - Exercised rows, values, raw, streaming and unprepared SQL paths; one-dimensional int8/timestamp arrays, null elements, inferred large integers/Dates and explicit PgTypes parameters round-trip. Native multidimensional arrays and infinite timestamps differ from PGlite; I found no current callers and am not treating those as additional blockers.
- Pool creation, queries and transactions retained TestClock time, including a jump to 2100. No live-clock leakage into DateTime.now observed.
- CLI help still labels wait as number and choices as choice; invalid choice, Infinity and integer arguments exit 1 with local JSON errors. ADR-0004 already permits usage on stdout for parse failures. No CLI README/ADR change needed for these renames.
- Project.readRepo preserved nested object/array/null unknown values and rejected malformed known fields; both rewrite paths spread the decoded object. No type weakening found.
- Migration spreads match server, dev runner and test template. SQL README and ADR-0009 were updated; no vocabulary, package layout, seed, dev-loop interface or rendered-page changes require further mirrored edits. No additional applicable release-note omission found. Current PR CI is green; I did not rerun the full suite.
Standards: 1 finding, worst is the unmigrated generation boundary. Spec: 3 findings, worst is silently weakened generation validation. I am not happy for this to merge until these are fixed.
|
Review disposition for the first Astra pass (commit 5831f45):
Not taken: a shared |
allisonmahmood
left a comment
There was a problem hiding this comment.
Second pass at 5831f45, scoped to git diff origin/portal/cleanup-portal-router...HEAD. No repository files edited.
Previous findings
- SQL splitter — fixed.
packages/sql/src/index.tsnow accepts explicitddl(...statements); no SQL parsing remains. Migrated callers preserve statement boundaries. All eight migrations applied, a rerun applied none, and both escaped-string/nested-comment reproductions now pass. - Timestamp parity — fixed. PGlite’s OID 1114 parser now interprets plain timestamps as UTC, matching native Postgres; the SQL README documents this. Both inventory contracts passed under
TZ=America/New_York. A separate probe confirmed scalar and timestamp-array parity, including null elements. - SDK strict manifest decoding — fixed, on both Standards and Spec axes.
SdkApiuseshandleRawand strictly decodes the untouchedGenerateRequest. The raw HTTP regression returns 400 for nestedoptionall; authenticated valid generation still succeeds. - Runtime strictness — confirmed. The existing envelope/operation boundaries remain strict. Both principal decoders now explicitly reject excess properties. Actual-route probes rejected extra header and body principal fields with 400
invalid_request, while the valid principal succeeded. Public admission’s intentional ordering is unchanged.
New issue
Standards P2 — document the new generation size boundary. packages/sdk/src/SdkApi.ts:31–34,75–80 introduces a 1 MiB request cap, but packages/api/src/api.ts:479–482 and docs/API.md:284 omit it. I sent a schema-valid oversized manifest: it returned 400, “Request body must be a JSON generate request.” Root instructions require wire behavior to be described in the API source and mirrored docs. Declare the cap and overflow response there; otherwise agents cannot distinguish this limit from invalid JSON/schema input.
Six focused existing tests passed; additional DDL, array-parity, principal and size-boundary probes completed. No full-suite rerun; current CI still has pending jobs.
Standards: 1 remaining finding, the undocumented cap. Spec: 0 unresolved original findings or new blockers. I am not yet happy to merge: document this new request boundary and wait for green CI.
allisonmahmood
left a comment
There was a problem hiding this comment.
Reviewed 09c989b against git diff origin/portal/cleanup-portal-router...HEAD. No repository files edited.
Standards
The missing declaration is fixed: the endpoint and generated docs name the 1 MiB cap, 413 response and strict unknown-field handling. PayloadTooLarge is in the error union.
Spec
P2: The overflow promise remains too broad. packages/api/src/api.ts:483 says larger bodies answer 413. Against the actual SDK socket handler, a schema-valid 1,048,775-byte request with Content-Length returned 413 {ok:false,error:"Request body is too large."}. The identical body streamed without Content-Length instead closed the socket, producing a transport error and no HTTP response.
packages/api/src/respond.ts:84–89 only emits BodyTooLarge for declared lengths; streamed overflow follows the body-reader failure path. Document declared overflow separately from streaming cutoff, as other endpoints do, or make both paths return 413. This is a remaining contract mismatch, not an additional observed code regression.
The existing unknown-field and valid-generation tests passed, as did the declared-overflow probe; the streamed-413 probe failed.
Standards: 0 findings. Spec: 1 response-contract mismatch. Not yet happy to merge once CI is green; reconcile that promise first.
allisonmahmood
left a comment
There was a problem hiding this comment.
Reviewed 62a8144 against git diff origin/portal/cleanup-portal-router...HEAD.
Standards
Fixed. The endpoint description and regenerated docs/API.md agree: the cap is 1 MiB, a declared larger length answers 413, and streaming bodies are cut off at the cap.
Spec
Fixed. This now matches both actual-socket outcomes verified in the preceding review, without promising a 413 response for streamed overflow. No new findings in this documentation-only correction. No runtime tests rerun or files edited.
Standards: 0 outstanding findings. Spec: 0 outstanding findings. I am happy for PR #284 to merge once CI is green.
ada4f7f to
82c40d5
Compare
62a8144 to
d119224
Compare
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. Spec
Verification used the published rc.115 Summary: Standards 0 blockers; Spec 2 blockers, worst being the silent TLS downgrade. |
|
Disposition for the Astra review of 2026-09-17 (fixed in 23ed310, rebased onto main):
Kept as is: nothing. |
Opus reviewReviewed Blocking1.
Either make the mapping right — Non-blocking2. The body no longer describes the branch. It still ends "Stacked on 3. 4. Three CLI manifest decoders quietly lost strictness when 5. Import order. 6. 7. Verified
I would merge once the |
Astra review, second passReviewed StandardsTwo P2 gaps under the focused-test rule:
SpecOriginal findings:
New findings:
Verified with published rc.115, HEAD SQL code, an in-memory transport, and Standards: 2 findings, worst missing TLS coverage. Spec: 3 findings, worst silent TLS downgrade. Not happy to merge yet, even with green CI. |
|
Disposition for the Opus review and Astra's second pass (713fb88):
Kept as is: |
Astra review, third passReviewed StandardsBoth prior coverage findings are fixed. The new tests cover unsupported TLS/timeout parameters and placement-vs- Two new findings under the service conventions:
Spec
No new Spec findings. Verified HEAD SQL/config code with published rc.115 and an in-memory transport. No database access or repository edits; project suites were not rerun. Standards: 2 findings, worst unbounded diagnostics. Spec: 0 outstanding findings. Not happy to merge until those Standards issues are fixed, then CI is green. |
|
Disposition for Astra's third pass (1107377): the parameter names in |
Astra review, fourth passReviewed StandardsBoth prior P2s are fixed: diagnostic names are printable ASCII, capped at 64 characters and eight names; the company pool uses One new P2: the focused-test rule requires backend regression coverage. The committed URL test uses only two short printable names. Add one hostile-URL case covering control-character replacement and both caps. SpecNo new findings. Adversarial probes of HEAD SQL code with published rc.115 passed, including encoded controls, 8 KiB keys and excess names. No repository files edited; full suite not rerun. Standards: 1 P2, missing regression coverage. Spec: 0 findings. I am not yet happy to merge; add that regression case, then wait for green CI. |
|
Disposition for Astra's fourth pass (d06594b): added the hostile-URL case to |
Astra review, fifth passReviewed StandardsFixed. The committed regression asserts control-character replacement, the 64-character cap, and the eight-name cap. SpecNo outstanding findings. Both committed URL-diagnostic tests passed in an isolated run against the unchanged SQL module and pinned rc.115 dependencies. Full suite not rerun; CI is still running. No repository files edited. Standards: 0 findings; Spec: 0 findings. I am happy for this to merge once CI is green. |
The Effect 4 RCs ship in lockstep, so the five Dependabot PRs fail one by one. Move the pnpm catalog to rc.115 for effect, @effect/platform-node, @effect/sql-pg, @effect/sql-pglite and @effect/vitest, and fix what the RCs broke: the native sql-pg client (row codecs kept as string/Date through a shared PgTypes registry, one statement per query for migrations, pools on the wall clock), PascalCase Config and CLI constructors, ByteSize for the body limit, inert parseOptions annotations, the removed "preserve" option, and the new socket address type. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Migration records list statements instead of running a script through a home-grown splitter, plain timestamps read as UTC on both Postgres and PGlite with a parity check, the runtime principal decoders and the SDK generate route decode strictly again, and the pool module names its codecs and documents the recursion guard. Co-Authored-By: Claude Fable 5.1 <[email protected]>
The strict generate route reads its body under a 1 MiB cap; declare the cap, the 413 overflow and the unknown-field 400 on the endpoint, mirrored into docs/API.md. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ative client Company pools pass the placement's database as the client's explicit option, so a dbname parameter on the data URL can no longer override it. Sql.pool translates the pg-era ?ssl=true|false URL parameter to the native client's ssl option instead of silently connecting in the clear. Co-Authored-By: Claude Fable 5.1 <[email protected]>
pg accepted ?ssl=, ?statement_timeout= and other parameters the native client silently drops, so a URL could lose its TLS. Sql.pool now fails with UnsupportedUrlParameters naming them, and the company database URL schema refuses them at startup. Company pools also pass the validated login explicitly, so an empty ?user= keeps the authority's name. The CLI manifest decoders that lost the strict annotation pass the parser option again, readRepo hands consumers the declared repo type, and the ByteSize imports sit in order. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
d06594b to
b34cec5
Compare
Dependabot's #276 bumps posthog-node to 5.52.1 against `main`; the range now resolves to 5.52.4, so this lands the bump on top of the Effect RC bump (#284) instead. posthog-node 5.52 adds experimental distributed tracing (`startSpan`, `withSpan`, a `traces` option), honours `Retry-After` for refused log and metric batches, and drops oversized batches client-side. `@patchy/analytics` uses only the client constructor, `capture` and `shutdown`, none of which changed. ## Verification - `pnpm typecheck` passes; `packages/analytics` tests pass (6 of 6). Stacked on `deps/effect-rc-115` (#284); replaces #276. Model: Claude Fable 5.1. Harness: Claude Code. --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
Dependabot's #280 bumps the CLI's Vite to 8.3.0 against `main`. This lands it on top of the Effect RC bump (#284) and moves the `patchy init` scaffold's pin with it, so a scaffolded repo builds with the same Vite major the CLI's dev loop is typed against. Vite 8 replaces Rollup and esbuild with Rolldown and Oxc. The CLI only calls `vite.build` in watch mode and reads the emitted `index.html` asset (`packages/patchy/src/devWatch.ts`); that contract held. `vite-plugin-singlefile` 2.3.3 declares Vite 8 support. Vitest stays at 4.1.11, whose peer range includes Vite 8, so the test runner now resolves Vite 8 as well. No config in the repo uses a removed Vite option. ## Verification - `pnpm lint`, `pnpm typecheck` pass. - `packages/patchy` and `packages/sdk` tests pass (305 and 11). - `pnpm test:packed-cli-e2e` passes on Vite 8, including the scaffold build and dev loop; the scaffold resolves its own ranges from the registry with a fresh store, so it built on Vite 8 from its declared pins. Stacked on `deps/effect-rc-115` (#284); replaces #280. Model: Claude Fable 5.1. Harness: Claude Code. --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
`@effect/vitest` rc.115 declares a peer on vitest 5, which the Effect bump (#284) left as a warning. This moves every package's vitest devDependency to 5.0.1, which clears the peer warning and lands the runner major on its own. Checked against the Vitest 5 migration guide: the repo uses none of the changed surfaces. No pool or worker id math, no `sequential` API, no removed entry points, no reporter or coverage config, no nested `vi.mock`, no `toThrow("")` or `expect.poll`; `inject`, `provide` and `globalSetup` are unchanged. Mocks now clear before each test by default, which the one fake-timer suite tolerates. ## Verification - `pnpm lint`, `pnpm typecheck` pass. - `pnpm test`: 939 of 939 pass, no deprecation output. - `pnpm test:postgres-concurrency`: 7 of 7 pass. Stacked on `deps/vite-8` (#286), since vitest 5 requires Vite 6.4 or later. Model: Claude Fable 5.1. Harness: Claude Code. --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
Dependabot opened five PRs for the Effect 4 RC bump (#273, #275, #277, #278, #279), one per package, and each fails alone because the RCs ship in lockstep. This PR lands rc.112 → rc.115 for
effect,@effect/platform-node,@effect/sql-pg,@effect/sql-pgliteand@effect/vitesttogether through the pnpm catalog, and fixes what the three RCs broke.What the RCs changed for us
@effect/sql-pgreplacedpgwith a native client. Rows now decodeint8asbigintand timestamps as epoch milliseconds,PgClient.fromPoolis gone, and the extended protocol takes one statement per query.@patchy/sqlnow owns atypesregistry that keepsint8as a decimal string and timestamps asDate, so no row schema moved and PGlite still answers the same shapes;@patchy/company-databasebuilds its pools on it and drops its directpgdependency. Migration records areddl(...statements), one statement per string. A plaintimestampis read as UTC wall time on both Postgres and PGlite, with a parity assertion in the inventory contract.TestClock.setTimeon a far date replays that timer millions of times and never returns (OrphanSweep, Pages, DeviceLogins all hung).Sql.poolprovides the live clock to the pool only, so virtual time still drives domain timestamps.Config.string/int/redacted→Config.String/Int/Redacted,mapOrFail→mapEffect; CLIFlag,Argument,PromptandGlobalFlagconstructors likewise (choice→Literals,float→Finite,Prompt.text→Prompt.String). Parsing behavior is unchanged.FileSystem.Size→ByteSizeforHttpServerRequest.MaxBodySize.parseOptionsannotations no longer affect parsing. The now-inert annotations are removed and every decoder that must reject unknown fields passesonExcessProperty: "error"at the parser: the publish manifest, the runtime envelope, operation arguments and principal, and the shell broker.POST /api/sdk/generatenow reads its body raw and decodes it strictly, since theHttpApipayload decoder would strip unknown fields; a raw HTTP test covers it. Nothing on the wire loosened.onExcessProperty: "preserve"was removed.patchy.jsonreads useSchema.StructWithRestso a rewrite still keeps keys the repo added.HttpServer.addressis aNetAddress.SocketAddress; socket tests check for a Unix path instead of aTcpAddresstag.msgpackrleft@effect/platform-node, so itsallowBuildsentry is gone from the workspace file.dbnameanduserparameters differently frompg, and reads nossl=orstatement_timeout=at all. Company pools pass the placement's database and the validated login as explicit options, so neither adbnameparameter nor an emptyuser=can redirect them. A URL carrying a parameter the client does not read fails at startup withUnsupportedUrlParameters(and the company URL schema refuses it) rather than silently connecting without TLS; ask for TLS withsslmode=.Not in this PR
@effect/vitestrc.115 declares a peer on vitest 5; we stay on vitest 4.1.11, which it runs on with a peer warning. The vitest 5 major is its own bump.Verification
pnpm lint,pnpm typecheckpass.pnpm test: 939 of 939 pass after the review fixes (the first run had two 5-second load timeouts that passed in isolation; nothing was relaxed).pnpm test:postgres-concurrency: 7 of 7 pass.Rebased onto
mainafter the portal stack landed.Model: Claude Fable 5.1. Harness: Claude Code.