Skip to content

feat: SQLGlot dialect, CI infrastructure, and developer tooling - #2

Merged
pedh merged 6 commits into
mainfrom
dev
Jun 11, 2026
Merged

pedh merged 6 commits into
mainfrom
dev

Conversation

@pedh

@pedh pedh commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • MaxCompute SQLGlot dialect with ANTLR grammar validation — parser, generator, and comprehensive test suite
  • CI infrastructure improvements inspired by hermes-agent:
    • PR-Agent AI code review (via Alibaba Cloud Bailian OpenAI-compatible endpoint)
    • Lint diff (ruff + ty) advisory PR comments showing incremental diagnostics
    • uv.lock sync check to block merge on lockfile drift
    • Pull request template
  • Code quality fixes: 87+ mypy type errors resolved, lint cleanup, SPDX headers

Test plan

  • CI workflows pass (ci.yml, lint.yml)
  • PR-Agent AI review posts a comment on this PR
  • Lint diff posts a ruff + ty summary comment on this PR
  • pytest tests/ -m 'not live' passes locally

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Bash Syntax Error

The closing EOF delimiter for the heredoc is indented with spaces. In bash, unless <<-'EOF' is used with tab indentation, the closing delimiter must be at the beginning of the line (unindented). As written, bash will not recognize it as the end of the heredoc, resulting in a syntax error (unexpected end of file) and causing the workflow step to fail incorrectly when uv lock --check fails. To fix, either remove the leading spaces from EOF or unindent the entire heredoc block.

  cat <<'EOF' >> "$GITHUB_STEP_SUMMARY"
## uv.lock is out of sync with pyproject.toml

**If this is a PR:** this check runs against the merged state
(your branch + current `main`), not just your branch.  If
`uv lock --check` passes locally, your branch is likely behind
`main`.

To fix, sync with main and regenerate the lockfile:

```bash
git fetch origin main
git rebase origin/main
uv lock
git add uv.lock
git commit -m "chore: refresh uv.lock after syncing with main"
git push --force-with-lease

EOF


</details>

</td></tr>
</table>

@github-actions

github-actions Bot commented Jun 10, 2026 •

Copy link
Copy Markdown

🔎 Lint report: dev vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 1276 on HEAD, 1260 on base (🆕 +16)

🆕 New issues (16):

Rule Count
unsupported-operator 9
invalid-argument-type 4
unresolved-attribute 2
unresolved-import 1
First entries
tests/unit/commands/sql_review/test_projection_rule.py:22: [invalid-argument-type] invalid-argument-type: Argument is incorrect: Expected `SqlWorkloadEvidence`, found `None`
tests/unit/commands/test_doctor_versioning_checks.py:123: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["timed out"]` and `str | None`
tests/unit/commands/test_doctor_versioning_checks.py:134: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["exited 42"]` and `str | None`
tests/unit/commands/test_doctor_versioning_checks.py:276: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["status broke"]` and `str | None`
tests/unit/commands/test_doctor_versioning_checks.py:353: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["yaml broke"]` and `str | None`
tests/unit/commands/test_doctor_versioning_checks.py:589: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["yaml broke"]` and `str | None`
tests/unit/commands/test_doctor_versioning_checks.py:377: [unresolved-attribute] unresolved-attribute: Attribute `mkdir` is not defined on `None` in union `Path | None`
tests/unit/commands/test_doctor_versioning_checks.py:401: [unresolved-attribute] unresolved-attribute: Attribute `mkdir` is not defined on `None` in union `Path | None`
tests/unit/commands/test_doctor_versioning_checks.py:383: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["orphan"]` and `str | None`
tests/unit/commands/test_doctor_versioning_checks.py:413: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["git binary not available"]` and `str | None`
tests/unit/commands/test_doctor_versioning_checks.py:496: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["permission denied"]` and `str | None`
tests/unit/commands/test_doctor_versioning_checks.py:609: [unsupported-operator] unsupported-operator: Operator `in` is not supported between objects of type `Literal["no built profiles"]` and `str | None`
tests/unit/commands/test_doctor_versioning_checks.py:633: [invalid-argument-type] invalid-argument-type: Argument is incorrect: Expected `tuple[str, ...]`, found `list[Unknown]`
tests/unit/commands/test_doctor_versioning_checks.py:643: [invalid-argument-type] invalid-argument-type: Argument is incorrect: Expected `tuple[str, ...]`, found `list[Unknown]`
tests/unit/commands/test_doctor_versioning_checks.py:670: [invalid-argument-type] invalid-argument-type: Argument to `HTTPError.__init__` is incorrect: Expected `Message[str, str]`, found `None`
tests/unit/commands/test_source_picker.py:591: [unresolved-import] unresolved-import: Cannot resolve imported module `questionary`

✅ Fixed issues: none

Unchanged: 1260 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

- PR-Agent workflow with configurable OpenAI-compatible endpoint for
  automated code review on every PR
- Lint diff workflow (ruff + ty advisory) posts incremental diagnostics
  as PR comments; ruff enforcement extracted from ci.yml into its own
  blocking job
- uv.lock sync check blocks merge when lockfile drifts from pyproject.toml
- Pull request template with type/checklist structure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pedh added 5 commits June 10, 2026 17:41
Pin GitHub Actions to commit SHAs and run PR-Agent from pull_request_target without checking out PR code.

Preserve duplicate lint diagnostics in lint_diff and cover the duplicate-count cases with tests.

Add SPDX/provenance headers to generated grammar modules and tighten NOTICE to direct runtime dependencies.
Isolate HOME and XDG roots in the shared isolated_config fixture so doctor tests do not inspect developer global skill installs.

Add a regression test that asserts global skill paths are rebased into the test sandbox.
@pedh
pedh merged commit 6786362 into main Jun 11, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant