Skip to content

ENG-2418 Update libraries talking with external tools - #1563

Open
maparent wants to merge 3 commits into
mainfrom
eng-2418-update-libraries-talking-with-external-tools
Open

maparent wants to merge 3 commits into
mainfrom
eng-2418-update-libraries-talking-with-external-tools

Conversation

@maparent

@maparent maparent commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Reviewer brief

Verification

Loom video

Scope check

  • Ran $scope-check against the ENG ticket and final diff.
  • Scope beyond Done When:

Standards check

  • Ran $dg-pr-adherence-check against the final diff and PR metadata.

Local delegated full review

  • Ran a comprehensive review of the entire final diff in a subagent with a fresh context. Use $dg-delegated-full-review when no other full-review workflow is available.

https://linear.app/discourse-graphs/issue/ENG-2418/update-libraries-talking-with-external-tools


Devin Review

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
discourse-graph Ready Ready Preview Oct 19, 2026 3:43pm UTC

Request Review

@linear-code

linear-code Bot commented Oct 19, 2026

Copy link
Copy Markdown

ENG-2418

@supabase

supabase Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Updates to Preview Branch (eng-2418-update-libraries-talking-with-external-tools) ↗︎

Deployments Status Updated
Database ✅ Mon, 19 Oct 2026 15:44:47 UTC
Services ✅ Mon, 19 Oct 2026 15:44:47 UTC
APIs ✅ Mon, 19 Oct 2026 15:44:47 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations ✅ Mon, 19 Oct 2026 15:44:54 UTC
Migrations ✅ Mon, 19 Oct 2026 15:44:57 UTC
Seeding ✅ Mon, 19 Oct 2026 15:45:00 UTC
Edge Functions ✅ Mon, 19 Oct 2026 15:45:03 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 4 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment on lines +141 to +142
if (!userResponse.data.user)
userResponse.error = new AuthError("Did not create user");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Duplicate group names return server errors

When createUser rejects an existing group name, userResponse.error loses its email_exists code. The duplicate-name request returns 500 instead of the expected 400.

Suggested change
if (!userResponse.data.user)
userResponse.error = new AuthError("Did not create user");
if (!userResponse.data.user && !userResponse.error)
userResponse.error = new AuthError("Did not create user");

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

join(projectRoot, "src", "dbTypes.ts"),
"// Generated by supabase -- do not edit\n" + stdout,
);
execSync("oxfmt ./src/dbTypes.ts");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Generated types conflict with repository formatter

Every gentypes run applies oxfmt, but the required formatter is Prettier. Their output differs, so generation and repository formatting repeatedly rewrite the generated types.

Learn more

The generator writes the database type file, then formats it with oxfmt. The repository's format script and pre-commit formatter use Prettier. The generated Json union already differs from the prior Prettier-formatted form, so running the standard formatter after generation rewrites the result.

Example: A developer runs pnpm gentypes and commits the output. Running pnpm format changes the generated file again without changing the schema.

Recommended fix: Use the repository's Prettier formatter in genTypes, with the same configuration as the root format command, and regenerate the committed types.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

);
}
const token = authHeader.replace("Bearer ", "");
console.log(Authorization, apikey, token);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟥 Space creation logs live credentials

Every create-space request logs Authorization, apikey, and token in plaintext. Anyone with log access can reuse a logged bearer token to impersonate its user.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +233 to +236
const Authorization = req.headers.get("Authorization") as string | undefined;
const apikey = req.headers.get("apikey") as string | undefined;

const token = Authorization?.replace("Bearer ", "") ?? apikey;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟥 Public API key can create spaces

Without Authorization, create-space accepts apikey as token. A public publishable key passes the read probe, then the service-role client creates a space and editor account.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

This branch was successfully deployed

1 active deployment
Preview — 5b78cbd3 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant