Fix BigQuery e2e test failure caused by Rich progress bar#87
Merged
Conversation
The DBA-150 progress feedback feature introduced Rich progress bars that emit ANSI escape sequences to stderr. Since pexpect uses a PTY that merges stdout and stderr, these sequences corrupt the pattern matching for "Build complete. Processed N datasources." Setting NO_COLOR=1 in the pexpect spawn environment disables Rich terminal features, allowing clean pattern matching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a flaky/failing BigQuery e2e test scenario where Rich progress output (written to stderr but merged into the PTY stream by pexpect) interferes with the tests’ output pattern matching.
Changes:
- Disable Rich terminal formatting during
databao buildin e2e runs by settingNO_COLOR=1in the spawned process environment.
Condense CLAUDE.md and 10 skill files from 1311 to 795 lines. Add Output Efficiency section with token-saving rules (no sycophancy, no restating, no scope creep, no redundant reads, ASCII-only). Extract Quality Gates as single source of truth in CLAUDE.md -- skills reference it instead of repeating the same commands. Tighten prose across all skill files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
NO_COLOR only disables color output but Rich still renders the progress bar when isatty() returns True (which it does in pexpect's PTY). TERM=dumb makes Rich's Console.is_terminal return False, skipping the progress bar entirely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace non-ASCII characters in CLAUDE.md (em dashes, arrows) with ASCII equivalents to match the ASCII-only output rule - Restore pageInfo fields in check-pr-comments GraphQL query so pagination instructions are actionable - Restore full source paths in write-tests mapping table Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix Quality Gates description to match what make check actually runs (pre-commit with ruff, mypy, uv lock, agent guidance validation) - Align make-yt-issue guardrail with autosteer exception - Add pagination example to check-pr-comments skill Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.
Summary
Two changes: fix BigQuery e2e test timeout and reduce agent prompt token spending.
Changes
Fix BigQuery e2e test failure caused by Rich progress bar
The DBA-150 progress feedback commit introduced Rich progress bars that emit ANSI escape sequences to stderr. Since pexpect uses a PTY that merges stdout and stderr, these sequences corrupt pattern matching for "Build complete. Processed N datasources." Fix: set
NO_COLOR=1andTERM=dumbin the pexpect spawn environment.NO_COLORdisables color output, andTERM=dumbmakes Rich'sConsole.is_terminalreturn False so the progress bar is skipped entirely.Files
e2e-tests/src/project_utils.pyReduce agent prompt token spending by ~39%
Condense CLAUDE.md and 10 skill files from 1311 to 795 lines. Add Output Efficiency section with token-saving rules (no sycophancy, no restating, no scope creep, no redundant reads, ASCII-only). Extract Quality Gates as single source of truth in CLAUDE.md -- skills reference it instead of repeating the same commands.
Files
CLAUDE.md.claude/skills/autosteer/SKILL.md.claude/skills/check-coverage/SKILL.md.claude/skills/check-pr-comments/SKILL.md.claude/skills/create-pr/SKILL.md.claude/skills/eval-skills/SKILL.md.claude/skills/local-code-review/SKILL.md.claude/skills/make-yt-issue/SKILL.md.claude/skills/review-architecture/SKILL.md.claude/skills/update-pr/SKILL.md.claude/skills/write-tests/SKILL.mdTest Plan
make lint-skillspasses🤖 Generated with Claude Code