perf(backend): make DBML column positions linear - #746
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Comment |
|
@opencode-agent review exact current head 1673765 |
|
@cwl-noema-review review exact current head 1673765 |
|
@opencode-agent @cwl-noema-review @coderabbitai Please review exact current head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected='26d324d55d0857c2c773c5e5b7cef9da89daa305'
repo='ContextualWisdomLab/pg-erd-cloud'
pr='746'
echo '== Checked-out HEAD =='
git rev-parse HEAD
echo '== Expected commit object =='
git cat-file -t "$expected"
echo '== PR base and exact-head ancestry =='
base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
printf 'base=%s\nexpected=%s\n' "$base" "$expected"
git merge-base --is-ancestor "$base" "$expected" && echo 'expected contains PR base'
echo '== Changed files from PR base to expected head =='
git diff --name-status "$base" "$expected"
echo '== Stat =='
git diff --stat "$base" "$expected"
echo '== Full diff =='
git diff --no-ext-diff --unified=80 "$base" "$expected" --
echo '== Candidate DBML parser and test symbols =='
rg -n -C 4 --glob '*.py' \
'(def parse_dbml\b|col_counts_by_oid|position|ordinal|DBML)' .
echo '== Python file outlines for changed Python files =='
git diff --name-only "$base" "$expected" -- '*.py' | while IFS= read -r file; do
echo "--- $file"
ast-grep outline "$file" --items all --type function,class --view expanded || true
done
echo '== PR metadata, mergeability, reviews, and commits =='
gh pr view "$pr" --repo "$repo" \
--json url,state,isDraft,headRefOid,baseRefOid,mergeStateStatus,reviewDecision,reviews,commits
echo '== Exact-head check runs =='
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion,.details_url] | `@tsv`'
echo '== Exact-head commit statuses =='
gh api "repos/$repo/commits/$expected/status" \
--jq '.statuses[]? | [.context,.state,.target_url] | `@tsv`'
echo '== Review threads =='
gh api graphql -F owner='ContextualWisdomLab' -F name='pg-erd-cloud' -F number="$pr" -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
path
line
comments(first: 20) {
nodes { author { login } body url }
}
}
}
}
}
}' --jq '.data.repository.pullRequest.reviewThreads.nodes[] |
select(.isResolved == false) |
{isOutdated,path,line,comments:[.comments.nodes[]|{author:.author.login,body,url}]}'Length of output: 122872
No code findings.
|
|
@opencode-agent Please review exact current head |
|
@cwl-noema-review Please independently review exact current head |
|
@coderabbitai review Please review the exact current head |
|
|
|
@opencode-agent @cwl-noema-review @coderabbitai review Review exact current head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/pg-erd-cloud'
pr='746'
expected='38aeaf2f0901e465a014940d75c028af29a87770'
echo '== Local and requested commits =='
printf 'local='
git rev-parse HEAD
printf 'requested='
git rev-parse "$expected"
git cat-file -t "$expected"
echo '== PR metadata =='
gh pr view "$pr" --repo "$repo" \
--json state,isDraft,baseRefOid,headRefOid,mergeStateStatus,reviewDecision,url
base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
printf 'base=%s\n' "$base"
git merge-base --is-ancestor "$base" "$expected" && echo 'requested commit contains PR base'
echo '== Changed files: base to requested commit =='
git diff --name-status "$base" "$expected"
echo '== Diff stat =='
git diff --stat "$base" "$expected"
echo '== Exact diff =='
git diff --no-ext-diff --unified=60 "$base" "$expected" --
echo '== Parser and test outlines =='
ast-grep outline backend/app/spec/dbml_import.py --items all --type function,class --view expanded || true
ast-grep outline backend/tests/test_dbml_import.py --items all --type function,class --view expanded || true
echo '== Focused symbols and usages =='
rg -n -C 8 --glob '*.py' \
'(def parse_dbml\b|col_counts_by_oid|column_position|position.*=|1000|1_000)' \
backend/app/spec/dbml_import.py backend/tests/test_dbml_import.py
echo '== Exact-head check runs =='
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion] | `@tsv`'
echo '== Exact-head commit statuses =='
gh api "repos/$repo/commits/$expected/status" \
--jq '.statuses[]? | [.context,.state] | `@tsv`'
echo '== Unresolved review threads =='
gh api graphql -F owner='ContextualWisdomLab' -F name='pg-erd-cloud' -F number="$pr" -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
path
line
comments(first: 20) { nodes { author { login } body url } }
}
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'Length of output: 27116
No code findings.
Pull request You are interacting with an AI system. |
|
@opencode-agent @cwl-noema-review @coderabbitai review Review the exact current head only. Focus on the O(N²)→O(N) DBML column-position change, one-based per-relation ordering, the realistic 1,000-column regression, unchanged parser output contract, and absence of dependency/workflow/database/API drift. Please submit a formal current-head verdict. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/pg-erd-cloud'
pr='746'
echo '== PR metadata =='
gh pr view "$pr" --repo "$repo" \
--json url,state,isDraft,baseRefOid,headRefOid,mergeStateStatus,reviewDecision
base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
head="$(gh pr view "$pr" --repo "$repo" --json headRefOid --jq .headRefOid)"
printf 'base=%s\nhead=%s\n' "$base" "$head"
echo '== Local commit and ancestry =='
git rev-parse HEAD
git cat-file -t "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'head contains PR base'
echo '== Exact-head changed files and diff =='
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"
git diff --no-ext-diff --unified=80 "$base" "$head" --
echo '== Changed-file outlines =='
git diff --name-only "$base" "$head" -- '*.py' | while IFS= read -r file; do
echo "--- $file"
ast-grep outline "$file" --items all --type function,class --view expanded || true
done
echo '== Parser and regression evidence =='
rg -n -C 10 --glob '*.py' \
'(def parse_dbml\b|col_counts_by_oid|column_position|relation_oid|1_000|1000|wide_relation|second_relation)' \
backend/app/spec/dbml_import.py backend/tests/test_dbml_import.py
echo '== Exact-head check runs =='
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion] | `@tsv`'
echo '== Exact-head commit statuses =='
gh api "repos/$repo/commits/$head/status" \
--jq '.statuses[]? | [.context,.state] | `@tsv`'
echo '== Unresolved review threads =='
gh api graphql -F owner='ContextualWisdomLab' -F name='pg-erd-cloud' -F number="$pr" -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
path
line
comments(first: 20) {
nodes { author { login } body url }
}
}
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'Length of output: 38744
Reviewed exact head
GitHub still reports You are interacting with an AI system. |
|
@opencode-agent review Review exact current head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/pg-erd-cloud'
owner='ContextualWisdomLab'
name='pg-erd-cloud'
pr='746'
expected='38aeaf2f0901e465a014940d75c028af29a87770'
echo '== Exact commit identity =='
printf 'checked_out_head='; git rev-parse HEAD
printf 'requested_head='; git rev-parse "$expected"
git cat-file -t "$expected"
echo '== PR metadata and protected-base identity =='
gh pr view "$pr" --repo "$repo" --json \
url,state,isDraft,baseRefName,baseRefOid,headRefName,headRefOid,mergeStateStatus,reviewDecision
base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
base_name="$(gh pr view "$pr" --repo "$repo" --json baseRefName --jq '.baseRefName')"
printf 'base=%s\nbase_name=%s\nexpected=%s\n' "$base" "$base_name" "$expected"
git merge-base --is-ancestor "$base" "$expected" && echo 'requested head contains base'
echo '== Branch protection / rulesets for base =='
gh api "repos/$repo/branches/$base_name/protection" 2>&1 || true
gh api "repos/$repo/rules/branches/$base_name" 2>&1 || true
echo '== Exact diff against base =='
git diff --name-status "$base" "$expected"
git diff --stat "$base" "$expected"
git diff --no-ext-diff --unified=60 "$base" "$expected" --
echo '== Changed Python file outlines =='
git diff --name-only "$base" "$expected" -- '*.py' | while IFS= read -r file; do
printf '\n--- %s ---\n' "$file"
ast-grep outline "$file" --items all --type function,class --view expanded || true
done
echo '== Parser and test evidence =='
rg -n -C 12 --glob '*.py' \
'(def parse_dbml\b|col_counts_by_oid|column_position|relation_oid|wide_relation|second_relation|1_000|1000)' \
backend/app/spec/dbml_import.py backend/tests/test_dbml_import.py
echo '== Test and quality configuration references =='
rg -n -C 3 --hidden \
'(coverage|cov-fail-under|docstring|pydocstyle|interrogate|ruff|pytest)' \
pyproject.toml backend frontend .github 2>/dev/null || true
echo '== Exact-head check runs =='
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion,.started_at,.completed_at] | `@tsv`'
echo '== Exact-head legacy statuses =='
gh api "repos/$repo/commits/$expected/status" \
--jq '.statuses[]? | [.context,.state] | `@tsv`'
echo '== Exact-head review threads =='
gh api graphql -F owner="$owner" -F name="$name" -F number="$pr" -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
path
line
comments(first: 20) { nodes { author { login } body url } }
}
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'
echo '== Review and approval state =='
gh pr view "$pr" --repo "$repo" --json reviews \
--jq '.reviews[] | [.author.login,.state,.commit.oid,.submittedAt] | `@tsv`'Length of output: 179444
I reviewed
I cannot submit You are interacting with an AI system. |
|
Exact-head independent review requested for |
|
@opencode-agent review Review exact current head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/pg-erd-cloud'
owner='ContextualWisdomLab'
name='pg-erd-cloud'
pr='746'
expected='38aeaf2f0901e465a014940d75c028af29a87770'
echo '== Requested commit and PR identity =='
printf 'local_head='; git rev-parse HEAD
printf 'requested_head='; git rev-parse "$expected"
git cat-file -t "$expected"
gh pr view "$pr" --repo "$repo" --json \
state,isDraft,url,baseRefName,baseRefOid,headRefName,headRefOid,mergeStateStatus,reviewDecision
base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid)"
base_name="$(gh pr view "$pr" --repo "$repo" --json baseRefName --jq .baseRefName)"
printf 'base=%s\nbase_name=%s\nexpected=%s\n' "$base" "$base_name" "$expected"
git merge-base --is-ancestor "$base" "$expected" && echo 'requested_head_contains_base=true'
echo '== Exact diff against base =='
git diff --name-status "$base" "$expected"
git diff --stat "$base" "$expected"
git diff --no-ext-diff --unified=70 "$base" "$expected" --
echo '== Relevant source outlines =='
ast-grep outline backend/app/spec/dbml_import.py --items all --type function,class --view expanded
ast-grep outline backend/tests/test_dbml_import.py --items all --type function,class --view expanded
echo '== Parser and regression evidence =='
rg -n -C 12 --glob '*.py' \
'(def parse_dbml\b|col_counts_by_oid|column_position|relation_oid|wide_relation|second_relation|1_000|1000)' \
backend/app/spec/dbml_import.py backend/tests/test_dbml_import.py
echo '== Base branch protection and rulesets =='
gh api "repos/$repo/branches/$base_name/protection" 2>&1 || true
gh api "repos/$repo/rules/branches/$base_name" 2>&1 || true
echo '== Exact-head check runs =='
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion,.details_url] | `@tsv`'
echo '== Exact-head legacy statuses =='
gh api "repos/$repo/commits/$expected/status" \
--jq '.statuses[]? | [.context,.state,.target_url] | `@tsv`'
echo '== Unresolved review threads =='
gh api graphql -F owner="$owner" -F name="$name" -F number="$pr" -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
path
line
comments(first: 10) {
nodes { author { login } body url }
}
}
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'Length of output: 44108
I reviewed
I cannot submit You are interacting with an AI system. |
|
@coderabbitai review Please review exact current head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/pg-erd-cloud'
pr='746'
expected='38aeaf2f0901e465a014940d75c028af29a87770'
echo '== Exact commit identity =='
printf 'requested='; git rev-parse "$expected"
git cat-file -t "$expected"
echo '== Pull request metadata =='
gh pr view "$pr" --repo "$repo" --json baseRefName,baseRefOid,headRefOid,mergeStateStatus,reviewDecision
base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
printf 'base=%s\nexpected=%s\n' "$base" "$expected"
git merge-base --is-ancestor "$base" "$expected" && echo 'base_is_ancestor=true'
echo '== Exact changed-file scope =='
git diff --name-status "$base" "$expected"
git diff --stat "$base" "$expected"
echo '== Exact implementation diff =='
git diff --no-ext-diff --unified=100 "$base" "$expected" -- \
backend/app/spec/dbml_import.py \
backend/tests/test_dbml_import.py \
CHANGELOG.md
echo '== Exact parser: parse_dbml context =='
git show "$expected:backend/app/spec/dbml_import.py" |
nl -ba |
sed -n '/^[[:space:]]*[0-9][0-9]*[[:space:]]\+def parse_dbml[[:space:]]*(/,/^[[:space:]]*[0-9][0-9]*[[:space:]]\+def /p'
echo '== Exact counter and position references =='
git show "$expected:backend/app/spec/dbml_import.py" |
nl -ba |
grep -E -C 12 'col_counts_by_oid|column_position|relation_oid' || true
echo '== Exact regression context =='
git show "$expected:backend/tests/test_dbml_import.py" |
nl -ba |
grep -E -C 35 'wide_relation|second_relation|1_000|1000|column_position' || true
echo '== Test helpers and parser call sites in exact test file =='
git show "$expected:backend/tests/test_dbml_import.py" |
nl -ba |
grep -E -C 5 'parse_dbml[[:space:]]*\(|def test_' || true
echo '== Exact-head checks (supplementary evidence) =='
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion] | `@tsv`'
echo '== Unresolved review threads =='
gh api graphql -F owner='ContextualWisdomLab' -F name='pg-erd-cloud' -F number="$pr" -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes { isResolved isOutdated path line }
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'Length of output: 20615 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/pg-erd-cloud'
pr='746'
expected='38aeaf2f0901e465a014940d75c028af29a87770'
echo '== Exact parse_dbml function =='
git show "$expected:backend/app/spec/dbml_import.py" |
sed -n '/^def parse_dbml(/,/^def _build_constraints(/p'
echo '== Exact regression and adjacent tests =='
git show "$expected:backend/tests/test_dbml_import.py" |
grep -n -E -C 45 \
'^def test_column_positions_scale_and_reset_per_relation|^def test_|wide_relation|second_relation|column_position'
echo '== Existing table and column behavior tests =='
git show "$expected:backend/tests/test_dbml_import.py" |
grep -n -E -C 12 \
'same table|duplicate|Table [A-Za-z_].*\{|parse_dbml\(' || true
echo '== Python quality and test configuration =='
for file in pyproject.toml backend/pyproject.toml pytest.ini backend/pytest.ini setup.cfg backend/setup.cfg tox.ini backend/tox.ini; do
if git cat-file -e "$expected:$file" 2>/dev/null; then
echo "--- $file"
git show "$expected:$file" |
grep -n -E -C 4 'ruff|format|lint|pytest|coverage|docstring|mypy' || true
fi
done
echo '== Exact-head checks (supplementary evidence) =='
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion] | `@tsv`'
echo '== Exact-head unresolved review threads =='
gh api graphql -F owner='ContextualWisdomLab' -F name='pg-erd-cloud' -F number="$pr" -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes { isResolved isOutdated path line }
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'Length of output: 19158
I reviewed only
Supplementary exact-head evidence shows successful backend, frontend, Semgrep, Trivy, OSV, dependency-review, and coverage checks. No unresolved review threads exist.
|
|
@opencode-agent @cwl-noema-review Please review exact head |
|
@coderabbitai review Please review exact current head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/pg-erd-cloud'
owner='ContextualWisdomLab'
name='pg-erd-cloud'
pr='746'
expected='38aeaf2f0901e465a014940d75c028af29a87770'
echo '== Commit identity and PR metadata =='
printf 'checked_out='; git rev-parse HEAD
printf 'requested='; git rev-parse "$expected"
git cat-file -t "$expected"
gh pr view "$pr" --repo "$repo" --json \
state,isDraft,baseRefName,baseRefOid,headRefName,headRefOid,mergeStateStatus,reviewDecision,url
base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
printf 'base=%s\nrequested=%s\n' "$base" "$expected"
git merge-base --is-ancestor "$base" "$expected" && echo 'base_is_ancestor=true'
echo '== Exact changed-file scope =='
git diff --name-status "$base" "$expected"
git diff --stat "$base" "$expected"
echo '== Exact bounded diff =='
git diff --no-ext-diff --unified=80 "$base" "$expected" -- \
CHANGELOG.md backend/app/spec/dbml_import.py backend/tests/test_dbml_import.py
echo '== Parser outline =='
ast-grep outline backend/app/spec/dbml_import.py --items all --type function,class --view expanded
echo '== Test outline =='
ast-grep outline backend/tests/test_dbml_import.py --items all --type function,class --view expanded
echo '== Exact parser counter and column-position context =='
git show "$expected:backend/app/spec/dbml_import.py" |
nl -ba | grep -E -C 14 'def parse_dbml|col_counts_by_oid|column_position|relation_oid' || true
echo '== Exact wide-relation regression context =='
git show "$expected:backend/tests/test_dbml_import.py" |
nl -ba | grep -E -C 45 'wide_relation|second_relation|1_000|1000|column_position' || true
echo '== Exact-head checks =='
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion] | `@tsv`'
echo '== Unresolved review threads =='
gh api graphql -F owner="$owner" -F name="$name" -F number="$pr" -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
path
line
comments(first: 10) {
nodes { author { login } body url }
}
}
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'Length of output: 20667
I reviewed only commit
GitHub still reports You are interacting with an AI system. |
|
@opencode-agent @cwl-noema-review @coderabbitai review Independently review exact current head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/pg-erd-cloud'
owner='ContextualWisdomLab'
name='pg-erd-cloud'
pr='746'
expected='38aeaf2f0901e465a014940d75c028af29a87770'
expected_base='72afe6db712b145baaba084f64a1ff4fb36d9fd0'
echo '== Commit identity =='
printf 'checked_out='; git rev-parse HEAD
printf 'requested='; git rev-parse "$expected"
printf 'specified_base='; git rev-parse "$expected_base"
git cat-file -t "$expected"
echo '== Pull request metadata =='
gh pr view "$pr" --repo "$repo" --json \
state,isDraft,baseRefName,baseRefOid,headRefOid,mergeStateStatus,reviewDecision,url
echo '== Ancestry =='
git merge-base --is-ancestor "$expected_base" "$expected" && echo 'specified_base_is_ancestor=true'
echo '== Exact changed-file scope =='
git diff --name-status "$expected_base" "$expected"
git diff --stat "$expected_base" "$expected"
echo '== Exact bounded diff =='
git diff --no-ext-diff --unified=80 "$expected_base" "$expected" -- \
CHANGELOG.md backend/app/spec/dbml_import.py backend/tests/test_dbml_import.py
echo '== Implementation outline =='
ast-grep outline backend/app/spec/dbml_import.py --items all --type function,class --view expanded
echo '== Test outline =='
ast-grep outline backend/tests/test_dbml_import.py --items all --type function,class --view expanded
echo '== Exact parser and regression context =='
git show "$expected:backend/app/spec/dbml_import.py" | nl -ba | \
grep -E -C 15 'def parse_dbml|col_counts_by_oid|column_position|relation_oid' || true
git show "$expected:backend/tests/test_dbml_import.py" | nl -ba | \
grep -E -C 50 'wide_relation|second_relation|1_000|1000|column_position' || true
echo '== Exact-head check runs =='
gh api "repos/$repo/commits/$expected/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion] | `@tsv`'
echo '== Unresolved review threads =='
gh api graphql -F owner="$owner" -F name="$name" -F number="$pr" -f query='
query($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes { isResolved isOutdated path line }
}
}
}
}' --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'Length of output: 20422
I reviewed
I cannot submit You are interacting with an AI system. |
Buyer-visible performance outcome
Large DBML schemas no longer recalculate each column ordinal by rescanning the growing global column list.
parse_dbmlnow keeps an O(1) counter perrelation_oid, reducing complete column-position assignment from O(N²) to O(N) while preserving one-based contiguous positions independently for every relation.Bounded implementation
col_counts_by_oid;CHANGELOG.md;Separation from superseded work
PR #719 was closed after decomposition. Its unrelated generic identifier deny-list is not included here; the complete DBML identifier-to-DDL trust boundary is tracked separately in #747 so PostgreSQL quoted-identifier semantics, rendering sinks, property/fuzz tests, and doctoring evidence can be reviewed without frontend lock drift.
Exact-head validation
Current exact head:
38aeaf2f0901e465a014940d75c028af29a87770.Successful exact-head gates:
The PR is ready for fresh automated and independent non-author current-head review. It must not merge until repository approval policy and every required gate remain satisfied on this exact head. No predecessor-head evidence transfers.
Refs #747.