Repository navigation
ci: split required PR path into fast-gate - #77
Merged
Merged
Conversation
Move lint and Next build off the required check. fast-gate keeps offline eval validate, GudBot-off fast-checks, tests, contentlayer types, and tsc, with a 10 minute timeout. full-build still runs on PRs and main. migrations is unchanged. Soft-launch HOLD; GudBot stays default OFF. Co-authored-by: Timchosen Uzua <timchosen@gmail.com>
fast-gate now asserts missing appId is 400 and gd_pub_ is stripped on widget config/auth. Identify HMAC valid/invalid/missing was already tested; the visitors route is wired to that helper. Inbox list denies a signed-in user who is not a member of the requested workspace (403). Soft-launch HOLD; GudBot stays default OFF. Co-authored-by: Timchosen Uzua <timchosen@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up after #76 (
1c28899). Soft-launch HOLD. GudBot stays default OFF.Splits
.github/workflows/ci.ymlso the required PR path no longer waits on the Next build.Head:
ca7d73e. All three jobs green.Jobs
fast-gateTest)migrationsfull-buildKim / repo admin: Eng cannot change GitHub branch protection. Please require
fast-gateandMigrations (empty Postgres). RemoveTest. Do not requirefull-build.Times on this head (
ca7d73e)Run: https://github.com/gudlab/guddesk-core/actions/runs/42002055405
Required path in parallel is fast-gate + migrations: 1m 5s (under the 10 min target). On #76 the old combined
Testjob (install through Next build) was about 2m 15s.What each job runs
fast-gate (timeout 10 min): install →
node qa/ai-eval/score.mjs validate(offline only) →scripts/ci-fast-checks.mjs→ prisma generate →pnpm testwith the zero-test count guard →pnpm build:content(contentlayer types for tsc; not the Next build) →pnpm exec tsc --noEmit.migrations: unchanged. Empty Postgres +
scripts/ci-migrate-check.sh. Reserved 0002/0003 and migration history were not touched.full-build: install → prisma generate → build:content → lint →
pnpm build. Runs on PRs so lint/Next failures still show, off the required critical path.No live AI eval in CI (
live-runner.mjsis not invoked).fast-gate unit coverage (Kim ask)
pnpm teston this head (639 tests). Inventory:(a) Widget config/auth (
gd_pub_, missing appId → 400) - added on this PR.parseWidgetAppIdinlib/widget-app-id.ts: missing/empty appId returns 400"App ID is required"; a leadinggd_pub_is stripped before DB lookup. Wired intoGET /api/widget/configandPOST /api/widget/auth. Tests:lib/widget-app-id.test.ts. Existinglib/widget-visitor.test.tsstill covers visitor-token reuse and a token from another workspace.(b) Identify HMAC valid / invalid / missing - already covered.
lib/widget-identity.test.tsasserts HMAC-SHA256 accept, wrong userId, wrong secret, malformed hash, missinguserHash, and the 403 messages fromresolveIdentifyExternalId. This PR adds a wiring check thatPOST /api/widget/visitorscalls that helper and returns 403 before creating a visitor.(c) Inbox authz (cross-workspace denied) - added on this PR.
inboxListAuthzinlib/inbox-conversations.ts: signed-in but not a member of the requested workspace → 403"Not a member of this workspace". Wired intoGET /api/inbox/conversations(membership is checked beforefindMany). Tests:lib/inbox-conversations.test.ts. The listwhereclause still always includesworkspaceId.GudBot / HOLD
scripts/ci-fast-checks.mjsfails if:GudBotSettings.enableddefaults true in Prisma or SQLDISABLED_GUDBOT_SETTINGS.enabledis not falseqa/ai-eval/README.mddrops Soft launch HOLD / OFF by defaultprisma/migrations/orci.ymlis missingsync-oss.shwould overwrite or delete core'sci.ymllive-runner.mjssync-oss.shstill excludes and keeps.github/workflows/ci.yml. It also keeps the new fast-checks files so a hosted tree sync cannot delete them./api/healthis out of scope (later Kim ask).Eng handoff: Growth → QA.