Skip to content

chore(vendor): sync bridge grant rules from vscode_client - #172

Merged
DontBlameMeDev merged 1 commit into
mainfrom
t3/63f59bad-bridge-sync
Nov 20, 2026
Merged

DontBlameMeDev merged 1 commit into
mainfrom
t3/63f59bad-bridge-sync

Conversation

@DontBlameMeDev

@DontBlameMeDev DontBlameMeDev commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

After vscode_client PR #204 changed the canonical bridge's grant rules, this repo's vendored copy was one of the workspace contract drifts. The old vendor/bridge/grant.ts encoded every path again and scanned every binary suffix on each check.

I synced vendor/bridge from vscode_client origin/main with this repo's scripts/sync-engine.sh, using a read-only git archive export of the canonical revision because the sibling checkout belongs to another thread and is behind. No repo-local vendor change was lost: the script reports the copy identical to the canonical source, and the only tracked change is vendor/bridge/grant.ts.

Proof:

git -C /home/user/projects/selvage/vscode_client archive origin/main src/engine src/bridge | tar -x -C .tmp/canonical-vscode
bash scripts/sync-engine.sh "$PWD/.tmp/canonical-vscode"
  vendor/ is the same as .../.tmp/canonical-vscode/src

python3 specification/scripts/check-workspace.py --workspace <scratch workspace> \
  --revision jetbrains_client=origin/main --revision mcp=origin/main --revision nvim_client=HEAD \
  --revision reference_server=origin/main --revision specification=origin/main \
  --revision vscode_client=origin/main --revision web_client=origin/main
  same: nvim_client/vendor/engine <- vscode_client/src/engine
  same: nvim_client/vendor/bridge <- vscode_client/src/bridge
  workspace: 20 comparisons, 2 drifted, 0 errors

The 2 remaining drifts are in mcp and web_client, owned by their own threads; this repo's comparisons are clean. scripts/ci-local.sh all passed lint, typecheck, 182 companion tests, links, and all 18 headless Lua files. Local e2e still cannot start because this worktree has no sibling reference_server checkout or selvaged binary; that is a pre-existing environment gap. With the synced bridge, the companion's cached grant reports remain faster than uncached validation: 100k synthetic paths measured 46.8 ms uncached versus 2.2 ms warm.

Reviewed with review-loop: 1 round with opencode-go/hy4-flash-free. verdict: approved

Created with opencode-go/hy4-flash-free in pi.

Summary by CodeRabbit

  • Bug Fixes
    • File classification now uses the final extension for names with multiple extensions, improving consistency when identifying binary files.
  • Performance
    • Path validation uses less work for shorter paths, with no change to the supported path-length limit.

Copilot AI balanced review requested due to automatic review settings November 20, 2026 02:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Path checks now reuse a TextEncoder, match binary names by their final extension, and skip encoding when a path’s UTF-16 length is within the byte limit threshold. Ignore checks return false when no ignore sources are provided.

Changes: Grant path checks

Layer / File(s) Summary
Path classification and filtering
vendor/bridge/grant.ts
Binary-name checks use the final filename extension. Path byte checks encode only when the UTF-16 length exceeds one third of the byte limit. Empty ignore-source lists return false immediately.

Estimated code review effort: 2 (Simple) | ~7 minutes

Change: Other

Merge Risk: Minimal · up to 8cf14

This sync makes grant path checks faster while keeping their results the same. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title 'chore(vendor): sync bridge grant rules from vscode_client' matches the main change. The PR updates vendor/bridge/grant.ts to match the canonical bridge from vscode_client, and the objective…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title 'chore(vendor): sync bridge grant rules from vscode_client' matches the main change. The PR updates vendor/bridge/grant.ts to match the canonical bridge from vscode_client, and the objectives confirm this is a vendor sync of grant rules. The title is concise, specific, and uses a conventional commit prefix. It does not mention the behavioral changes in the file, such as the path-encoding shortcut and the final-extension binary check, but it does not need to cover every detail.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 034adfd4-1f02-4eb9-a9aa-710af0d47e7e
Commits

Reviewing files that changed from the base of the PR and between 7b9e88f and 8cf149d.

Files selected for processing: 1

  • vendor/bridge/grant.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@DontBlameMeDev
DontBlameMeDev merged commit ff3fd13 into main Nov 20, 2026
4 checks passed
@DontBlameMeDev
DontBlameMeDev deleted the t3/63f59bad-bridge-sync branch November 20, 2026 02:37
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