Skip to content

Conversation

erikhfj
Copy link
Member

@erikhfj erikhfj commented Oct 10, 2026

What this does

Fixes Dependabot alert #1. source-map-js 1.2.1 has a high severity advisory; 1.2.2 is the patched release.

Why pnpm.overrides and not a direct dependency

It is a transitive dependency:

source-map-js@1.2.1
├─┬ css-tree@3.2.1  (via jsdom -> vitest / @testing-library/jest-dom)
└─┬ postcss@8.5.28  (via vite -> @vitejs/plugin-react)

Both parents declare ^1.2.1, so 1.2.2 satisfies them. Adding source-map-js as a direct dependency of @t19/client would work but would be a lie: nothing in this repo imports it. pnpm.overrides forces every resolution in the tree to the patched version and stays correct if another parent appears later.

What was tested

Clean install, then checked the resolved tree:

rm -rf node_modules && pnpm install --frozen-lockfile
node_modules/.pnpm/source-map-js@1.2.2/node_modules/source-map-js -> "version": "1.2.2"

One version in the tree, 1.2.2. No 1.2.1 left behind.

Also pnpm format:check, pnpm lint, pnpm typecheck and pnpm test all pass.

Scope

Dev-only. vite and jsdom are development dependencies, so this does not reach the deployed bundle. Still worth fixing before the submission.

Reported by rachelks.

Closes the Dependabot alert once merged.

source-map-js 1.2.1 has a high severity advisory. 1.2.2 is the patched
release. Both of its dependents, postcss (via vite) and css-tree (via
jsdom), allow ^1.2.1 so 1.2.2 satisfies them.

It is a transitive dependency, so pnpm.overrides is the right lever
rather than adding a direct dependency the packages here do not import.
That forces every resolution in the tree to the patched version and keeps
it correct if another parent appears later.

Verified after a clean install that the tree resolves to 1.2.2 only.

Reported by rachelks.

Co-Authored-By: opencode <noreply@opencode.ai>
@erikhfj erikhfj requested a review from a team as a code owner October 10, 2026 19:06
Copy link
Member

@rachelks rachelks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The override and lockfile changes are consistent, and the testing covers the fix well. Thanks for taking care of this!

@rachelks rachelks merged commit 8a97b0c into main Oct 10, 2026
2 checks passed
erikhfj added a commit that referenced this pull request Oct 12, 2026
rachelks: GraphQL returns HTTP 200 even when the payload carries errors,
so a status check proves nothing. She is right and it was demonstrable
immediately: querying searchAlbums against the API currently running on
the VM returns 200 with

  {"errors":[{"message":"Unknown argument \"input\" on field
   \"Query.searchAlbums\".","extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}]}

and the old check reported 200 and moved on.

The smoke suite now POSTs, splits the status line off the body, and
rejects the response if it is not 200 or if the body contains an "errors"
key. Verified against the live API: __typename passes, searchAlbums is
correctly rejected.

Branch also rebased onto main so it carries the source-map-js fix from
#43.

Reported by rachelks.

Co-Authored-By: opencode <noreply@opencode.ai>
erikhfj added a commit that referenced this pull request Oct 15, 2026
rachelks: GraphQL returns HTTP 200 even when the payload carries errors,
so a status check proves nothing. She is right and it was demonstrable
immediately: querying searchAlbums against the API currently running on
the VM returns 200 with

  {"errors":[{"message":"Unknown argument \"input\" on field
   \"Query.searchAlbums\".","extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}]}

and the old check reported 200 and moved on.

The smoke suite now POSTs, splits the status line off the body, and
rejects the response if it is not 200 or if the body contains an "errors"
key. Verified against the live API: __typename passes, searchAlbums is
correctly rejected.

Branch also rebased onto main so it carries the source-map-js fix from
#43.

Reported by rachelks.

Co-Authored-By: opencode <noreply@opencode.ai>
erikhfj added a commit that referenced this pull request Oct 15, 2026
…checks

Four points from rachelks on #45.

1. The searchAlbums smoke query omitted `sort`, which is `AlbumSort!` in
   AlbumSearchInput, so the query failed validation and the check could
   never pass. Now sends `sort: TITLE_ASC`.

2. The skip guards for crate-api.service and server/ now fail instead of
   exiting 0. #42 has merged so both are expected, and a deploy job that
   goes green without deploying anything is the wrong failure mode.

3. The body check parses the JSON rather than grepping for the word
   "errors". Grep would also fire on an album called "Errors", and it did
   not verify `data` was present at all. Now rejects a response with
   errors, with no data, or that is not JSON. Added a totalCount
   assertion as well, so the check is on the data and not only on its
   presence.

4. The python validators live in shell variables on one line. A
   multi-line `python3 -c` heredoc cannot be used inside a YAML block
   scalar: the block ends at the first unindented line and the workflow
   stops parsing. Learned by breaking it.

Also rebased onto main now that #42 and #43 have merged.

Validated the two python expressions against five payloads: a good
response, GraphQL errors, null data, a valid totalCount, and two bad
ones. Each rejected case prints what was wrong.

Co-Authored-By: opencode <noreply@opencode.ai>
erikhfj added a commit that referenced this pull request Oct 15, 2026
README was still describing M1, and one line was simply wrong: it said
`client/` renders mock data. The mock-data search interface never landed,
the client is still the skeleton and #9 wires it straight to GraphQL.

- Current milestone moved to M2
- New "Where the code is" table, implemented vs. planned
- Local setup for `server/` too: DATABASE_URL, migrate, optional seed
- Server commands in the command table
- Infrastructure names `crate-api.service` and what CI deploys
- M1 row now lists what M1 actually delivered, not mock data that did not
  land
- Sort modes corrected to four, checked against `AlbumSort` in the schema

AI usage log gets the eight erikhfj rows missing since 1 October: the
#10 identity contract, the #8 VM runbook and the git clone, the #13 facet
trade-off, the #43 source-map-js override, the #44 deploy gap, the
displayName correction, the #45 review fixes, and this pass.

The displayName row is the kind the log intro calls out as most
important: the tool drafted a claim that a person had to correct.

Per #48 each member documents their own usage, so only erikhfj rows were
added. robertky's row from #46 was out of date order at the end of the
table and is now with the rest of 9 October, and his relative order
within the day is unchanged.

Co-Authored-By: opencode <noreply@opencode.ai>
erikhfj added a commit that referenced this pull request Oct 15, 2026
rachelks: GraphQL returns HTTP 200 even when the payload carries errors,
so a status check proves nothing. She is right and it was demonstrable
immediately: querying searchAlbums against the API currently running on
the VM returns 200 with

  {"errors":[{"message":"Unknown argument \"input\" on field
   \"Query.searchAlbums\".","extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}]}

and the old check reported 200 and moved on.

The smoke suite now POSTs, splits the status line off the body, and
rejects the response if it is not 200 or if the body contains an "errors"
key. Verified against the live API: __typename passes, searchAlbums is
correctly rejected.

Branch also rebased onto main so it carries the source-map-js fix from
#43.

Reported by rachelks.

Co-Authored-By: opencode <noreply@opencode.ai>
erikhfj added a commit that referenced this pull request Oct 15, 2026
…checks

Four points from rachelks on #45.

1. The searchAlbums smoke query omitted `sort`, which is `AlbumSort!` in
   AlbumSearchInput, so the query failed validation and the check could
   never pass. Now sends `sort: TITLE_ASC`.

2. The skip guards for crate-api.service and server/ now fail instead of
   exiting 0. #42 has merged so both are expected, and a deploy job that
   goes green without deploying anything is the wrong failure mode.

3. The body check parses the JSON rather than grepping for the word
   "errors". Grep would also fire on an album called "Errors", and it did
   not verify `data` was present at all. Now rejects a response with
   errors, with no data, or that is not JSON. Added a totalCount
   assertion as well, so the check is on the data and not only on its
   presence.

4. The python validators live in shell variables on one line. A
   multi-line `python3 -c` heredoc cannot be used inside a YAML block
   scalar: the block ends at the first unindented line and the workflow
   stops parsing. Learned by breaking it.

Also rebased onto main now that #42 and #43 have merged.

Validated the two python expressions against five payloads: a good
response, GraphQL errors, null data, a valid totalCount, and two bad
ones. Each rejected case prints what was wrong.

Co-Authored-By: opencode <noreply@opencode.ai>
@rachelks rachelks deleted the fix/source-map-js-cve branch October 16, 2026 18:12
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants