You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add comment explaining ms → ns conversion (timestamp_precise)
- Replace .then()/.catch() with async/await IIFE in executeFollowMode
- DRY fetchInitial/fetchPoll into single fetch(statsPeriod, afterTimestamp?) callback
* **getsentry/codecov-action enables JUnit XML test reporting by default**: The \`getsentry/codecov-action@main\` has \`enable-tests: true\` by default, which searches for JUnit XML files matching \`\*\*/\*.junit.xml\`. If the test framework doesn't produce JUnit XML, the action emits 3 warnings on every CI run: "No files found matching pattern", "No JUnit XML files found", and "Please ensure your test framework is generating JUnit XML output". Fix: either set \`enable-tests: false\` in the action inputs, or configure the test runner to output JUnit XML. For Bun, add \`\[test.reporter] junit = "test-results.junit.xml"\` to \`bunfig.toml\` and add \`\*.junit.xml\` to \`.gitignore\`.
* **Returning bare promises loses async function from error stack traces**: When an \`async\` function returns another promise without \`await\`, the calling function disappears from error stack traces if the inner promise rejects. A function that drops \`async\` and does \`return someAsyncCall()\` loses its frame entirely. Fix: keep the function \`async\` and use \`return await someAsyncCall()\`. This matters for debugging — the intermediate function name in the stack trace helps locate which code path triggered the failure. ESLint rule \`no-return-await\` is outdated; modern engines optimize \`return await\` in async functions.
* **PR review workflow: reply, resolve, amend, force-push**: PR review workflow: (1) Read unresolved threads via GraphQL, (2) make code changes, (3) run lint+typecheck+tests, (4) create a SEPARATE commit per review round (not amend) for incremental review, (5) push normally, (6) reply to comments via REST API, (7) resolve threads via GraphQL \`resolveReviewThread\`. Only amend+force-push when user explicitly asks or pre-commit hook modified files.
* **Testing infinite loops (while-true) in streaming functions via AuthError escape hatch**: Follow-mode streaming in \`sentry log list\` uses \`setTimeout\`-based recursive scheduling. \`scheduleNextPoll()\` sets a timer; SIGINT handler calls \`clearTimeout()\` + \`resolve()\`. No \`process.exit(0)\` needed — clearing the timer drains the event loop naturally. \`Bun.sleep()\` cannot be cancelled (no AbortSignal support), so \`setTimeout\`/\`clearTimeout\` is required for cancellable delays. Tests use \`interceptSigint()\` helper that captures \`process.once('SIGINT', handler)\` via spy, then \`trigger()\` invokes it directly. Poll tests use \`Bun.sleep(1200)\` to wait for the real 1-second timer. \`executeFollowMode\<T>(config: FollowConfig\<T>)\` is generic — parameterized by \`fetchInitial\`, \`fetchPoll\`, \`extractNew\` callbacks for both project-scoped and trace-scoped streaming.
680
+
* **Testing infinite loops (while-true) in streaming functions via AuthError escape hatch**: Follow-mode streaming in \`sentry log list\` uses \`setTimeout\`-based recursive scheduling. \`scheduleNextPoll()\` sets a timer; SIGINT handler calls \`clearTimeout()\` + \`resolve()\`. No \`process.exit(0)\` needed — clearing the timer drains the event loop naturally. A \`stopped\` boolean guard prevents orphaned poll loops when SIGINT fires during an in-flight fetch (e.g., \`fetchInitial\`). Both \`scheduleNextPoll()\` and \`poll()\` check \`stopped\` before doing work. \`Bun.sleep()\` cannot be cancelled (no AbortSignal support), so \`setTimeout\`/\`clearTimeout\` is required. Tests use \`interceptSigint()\` helper that captures \`process.once('SIGINT', handler)\` via spy, then \`trigger()\` invokes it directly. Poll tests use \`Bun.sleep(1200)\` to wait for the real 1-second timer. \`executeFollowMode\<T>(config: FollowConfig\<T>)\` is generic — parameterized by \`fetchInitial\`, \`fetchPoll\`, \`extractNew\` callbacks.
0 commit comments