Skip to content

Fix BigQuery e2e test failure caused by Rich progress bar#87

Merged
gasparian merged 5 commits intomainfrom
andrei.gasparian/fix-e2e-bigquery-progress-bar
Mar 31, 2026
Merged

Fix BigQuery e2e test failure caused by Rich progress bar#87
gasparian merged 5 commits intomainfrom
andrei.gasparian/fix-e2e-bigquery-progress-bar

Conversation

@gasparian
Copy link
Copy Markdown
Contributor

@gasparian gasparian commented Mar 31, 2026

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=1 and TERM=dumb in the pexpect spawn environment. NO_COLOR disables color output, and TERM=dumb makes Rich's Console.is_terminal return False so the progress bar is skipped entirely.

Files
  • e2e-tests/src/project_utils.py

Reduce 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.md

Test Plan

  • BigQuery e2e tests pass in CI
  • Other e2e tests (DuckDB, MySQL, PostgreSQL, Snowflake, SQLite) remain unaffected
  • make lint-skills passes

🤖 Generated with Claude Code

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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 build in e2e runs by setting NO_COLOR=1 in the spawned process environment.

Andrei Gasparian and others added 2 commits March 31, 2026 19:05
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>
Copilot AI review requested due to automatic review settings March 31, 2026 17:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

- 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

- 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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

@gasparian gasparian merged commit 1b5f6d4 into main Mar 31, 2026
10 checks passed
@gasparian gasparian deleted the andrei.gasparian/fix-e2e-bigquery-progress-bar branch March 31, 2026 17:42
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.

2 participants