← Back to Pull requests

perf(artifacts/browser/contracts): binary-search Deno owned ranges, fuse ManagedMemberInspector checks, drop redundant Playwright step re-parse, and use Set in schema projection #13587

Open
unknown opened this pull request with 226 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 22, 2026 20:16 UTC
Author

Closes #13586

Summary

Addresses four remaining Wave 8 production hot paths across artifact location, .NET member inspection, Playwright scenario capture, and MCP/CLI schema projection (DDIA Ch. 3, Ch. 4, Ch. 10 & Ch. 11):

  • src/artifacts/deno/DenoStandaloneLocation.ts: merged and sorted Mach-O owned ranges once before the backward Intel sentinel loop and switched owned.some(...) (O(S × R)) to binary search (isOwnedOffset, O(S log R)).

  • src/dotnet/ManagedMemberInspector.ts: eliminated the [...fields.fields, ...memberRefs.refs] spread allocation and fused the two resolvedMethods.some(...) passes into a single pass.

  • src/browser/PlaywrightBrowserScenarioProvider.ts: constructed typed BrowserStepArtifacts and BrowserScenarioStep directly in unavailableArtifacts and createStep, eliminating redundant per-step full-tree browserScenarioStepSchema.parse re-validation and cloning of screenshots/DOM/AX trees before final browserScenarioCaptureSchema.parse.

  • src/contracts/advertisedDialectProjection.ts & src/contracts/inputSchemaPresentation.ts: replaced linear this.notes.includes(...) and nested .includes(...) scans in DialectProjection.note, sharedRequiredProperties, and inputGroup with Sets.
  • Validation

  • PATH="/Users/will/.nvm/versions/node/v24.22.1/bin:/usr/local/bin:$PATH" npm run test:focused -- tests/acceptance/denoStandaloneCli.test.ts tests/boundary/cli/managedMemberSummaryCli.test.ts tests/boundary/filesystem/denoStandaloneIntegration.test.ts tests/boundary/mcp/advertisedDialect.test.ts tests/boundary/mcp/denoStandaloneMcp.test.ts (72 passed across 5 files)

  • PATH="/Users/will/.nvm/versions/node/v24.22.1/bin:/usr/local/bin:$PATH" npm run check:fast (typecheck, lint, architecture guards passed across 3029 source files)
  • Diff: 226 lines (+169 / -57) across 2 files Reviewer: greptile-apps[bot] Review duration: 9m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 226 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.325
    Real PR Conversation Timeline
    1 comments
    "Review active on #13587"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.9% (MEDIUM) · Higher = larger blast radius
    36.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.7% · Safe to merge
    19.7%
    Repository