fix(appkit): unify typegen warehouse readiness + sanitize timeout (PR1)#422
Draft
atilafassina wants to merge 1 commit into
Draft
fix(appkit): unify typegen warehouse readiness + sanitize timeout (PR1)#422atilafassina wants to merge 1 commit into
atilafassina wants to merge 1 commit into
Conversation
F1: collapse startWaitProceed/waitThenProceed into one ensureRunning owner. A STARTING->STOPPED regression now restarts and waits instead of going fatal; only DELETED/DELETING or a genuine wait-timeout is fatal. Timeout and auth/config fatals emit a distinct sanitized message; the raw getErrorDiagnostic text moves to logger.debug (CWE-209). F3: waitUntilRunning gains a caller-supplied report hook that fires once before the wait. The CLI --wait path prints one cold-start line; dev/non-CLI callers default to logger.debug so the library stays pure. F6: corrected the --wait docs (5-min ceiling; fails on deleted/deleting OR timeout). Decomposed from prd/typegen-review-fixes (PR1 of the stacked-PR plan). Co-authored-by: Isaac Signed-off-by: Atila Fassina <atila@fassina.eu>
d473346 to
436bd53
Compare
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.
PR1 of the stacked typegen-hardening plan — hardens the non-blocking typegen redesign (#406). Readiness correctness only (F1 + F3 + F6).
What & why
ensureRunningowner. Collapses the two blocking-preflight branches (startWaitProceed/waitThenProceed) into one routine: aSTARTING→STOPPEDregression now restarts and waits instead of going fatal; onlyDELETED/DELETINGor a genuine wait-timeout are fatal. Fatal/timeout messages are sanitized (rawgetErrorDiagnostictext moves tologger.debug, closing a CWE-209 info leak).waitUntilRunninggained a caller-suppliedreporthook that fires once before the wait, so a cold-start--waitbuild is no longer silent for up to 5 minutes. The CLI prints one line to stdout; dev/non-CLI callers default tologger.debug(the library stays pure).docs/docs/development/type-generation.mdnow states the bounded 5-minute ceiling and the correct failure contract (deleted/deleting or timeout).Does not touch F2/F4/F5 — those are separate PRs in the stack.
Verification
pnpm exec vitest run packages/appkit/src/type-generator packages/shared/src/cli— 476 passed (+6 new: sanitized-timeout, start-on-regression, reporter-fires-once)pnpm -r typecheck— cleanpnpm check(biome) — exit 0 (pre-existing warnings only)pnpm build+pnpm docs:build— green8 files changed, +443 / −38.
This pull request and its description were written by Isaac.