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 |
|
Exact-current-head review request for @coderabbitai review Do not modify the branch, bypass protection, merge, tag, release, or publish. |
🧩 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 and PR identity =='
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,headRefOid,mergeStateStatus,reviewDecision,url
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\nlive_head=%s\n' "$base" "$head"
git merge-base --is-ancestor "$base" "$expected" && echo 'base_is_ancestor_of_requested=true'
echo '== Changed-file scope: base to requested head =='
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 and position implementation =='
ast-grep outline backend/app/spec/dbml_import.py --items all --type function,class --view expanded
git show "$expected:backend/app/spec/dbml_import.py" | nl -ba | \
grep -E -C 16 'def parse_dbml|col_counts_by_oid|column_position|relation_oid' || true
echo '== Regression test outline and context =='
ast-grep outline backend/tests/test_dbml_import.py --items all --type function,class --view expanded
git show "$expected:backend/tests/test_dbml_import.py" | nl -ba | \
grep -E -C 55 '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: 20489
I reviewed only
GitHub currently reports
|
|
Queued @cwl-noema-review for PR #746 at head |
|
Queued @cwl-noema-review for PR #746 at head |
|
Queued @cwl-noema-review for PR #746 at head |
|
@opencode-agent review Re-read the exact current head and submit a formal review-only verdict for the O(N²)→O(N) DBML ordinal change, per-relation counter reset, 1,000-column realistic regression, unchanged parser output, bounded scope, and all direct exact-head CI/Security/SAST evidence. Do not mutate or merge. |
|
@coderabbitai full review Perform a fresh exact-current-head review of the bounded DBML ordinal optimization and its realistic 1,000-column regression. Submit the current-head verdict without mutating or merging. |
|
|
|
@cwl-noema-review A qualifying formal current-head GitHub review is required for protected merge. Submit |
|
Submit a formal current-head GitHub review after checks settle. Approve only if the exact head is green and no actionable finding remains; otherwise post the concrete blocker. Do not mutate or merge. |
|
Please submit the formal current-head review conclusion after the latest exact-head checks complete. Do not mutate or merge. |
|
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'
echo '== Live pull request 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')"
head="$(gh pr view "$pr" --repo "$repo" --json headRefOid --jq '.headRefOid')"
printf 'base=%s\nhead=%s\n' "$base" "$head"
printf 'checked_out='; git rev-parse HEAD
git cat-file -t "$base"
git cat-file -t "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base_is_ancestor_of_live_head=true'
echo '== Changed-file scope: base to live head =='
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"
echo '== Exact implementation and regression diff =='
git diff --no-ext-diff --unified=50 "$base" "$head" -- \
CHANGELOG.md backend/app/spec/dbml_import.py backend/tests/test_dbml_import.py
echo '== Live-head parser and regression evidence =='
git show "$head:backend/app/spec/dbml_import.py" | nl -ba | \
grep -E -C 12 'def parse_dbml|col_counts_by_oid|column_position|relation_oid' || true
git show "$head:backend/tests/test_dbml_import.py" | nl -ba | \
grep -E -C 35 'wide_relation|second_relation|1_000|1000|column_position' || true
echo '== Live-head check runs =='
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion] | `@tsv`'
echo '== Live-head legacy statuses =='
gh api "repos/$repo/commits/$head/status" \
--jq '.statuses[]? | [.context,.state] | `@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: 16058
I reviewed live head
GitHub still reports You are interacting with an AI system. |
|
@opencode-agent review Use the newest exact head only. If every required check is green and there is no actionable finding, submit formal approval; otherwise state the blocker. Do not mutate or merge. |
|
@cwl-noema-review review Use exact-current-head evidence only. Approve formally only when required checks are green and no actionable finding remains; otherwise identify the blocker. Do not mutate or merge. |
|
@opencode-agent review Do not post another top-level acknowledgement. Submit the formal exact-head review verdict through the GitHub review API when current-head checks are complete; approve only if no blocker remains. Do not mutate or merge. |
|
@coderabbitai full review Use the exact current head only and submit the review verdict through the formal GitHub review surface; do not post another summary comment, mutate, or merge. |
Rate Limit Exceeded
|
|
@cwl-noema-review Please use the GitHub review API rather than another comment for the final exact-head verdict. Do not mutate or merge. |
|
Final action expected: use the GitHub review API for the exact current head. Approve only if current required checks are successful and no actionable finding remains; otherwise post one concrete blocking review. Do not mutate or merge. |
|
@cwl-noema-review Submit one formal exact-current-head review through GitHub's review API. Do not add another discussion comment, mutate, or merge. |
|
Do not acknowledge. Submit exactly one formal review on the exact current head through GitHub's review API after checks complete. Do not mutate or merge. |
|
@cwl-noema-review Do not acknowledge. Submit exactly one formal review on the exact current head through GitHub's review API after checks complete. Do not mutate or merge. |
|
Do not acknowledge. Submit exactly one formal review on the exact current head through GitHub's review API after checks complete. Do not mutate or merge. |
|
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'
echo '== Pull request identity =='
gh pr view "$pr" --repo "$repo" --json \
state,isDraft,baseRefOid,headRefOid,mergeStateStatus,reviewDecision,url
head="$(gh pr view "$pr" --repo "$repo" --json headRefOid --jq '.headRefOid')"
echo "head=$head"
echo '== Check runs for live head =='
gh api "repos/$repo/commits/$head/check-runs?per_page=100" \
--jq '.check_runs[] | [.name,.status,.conclusion] | `@tsv`'
echo '== Commit statuses for live head =='
gh api "repos/$repo/commits/$head/status" \
--jq '.statuses[]? | [.context,.state] | `@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: 2730
[approve] You are interacting with an AI system. |
|
Queued @cwl-noema-review for PR #746 at head |
|
Queued @cwl-noema-review for PR #746 at head |
|
Queued @cwl-noema-review for PR #746 at head |
|
Queued @cwl-noema-review for PR #746 at head |
|
Queued @cwl-noema-review for PR #746 at head |
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.