Skip to content

CI validation draft (not for merge) — vector search Python/Go/TS - #1

Closed
diberry wants to merge 115 commits into
masterfrom
squad/vector-search-multi-language
Closed

diberry wants to merge 115 commits into
masterfrom
squad/vector-search-multi-language

Conversation

@diberry

@diberry diberry commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Draft PR opened solely to trigger CI within the fork, since the upstream PR (microsoft#1516) correctly skips CI for fork-originated PRs by design. Do not merge.

Imran Imtiaz and others added 30 commits June 27, 2024 08:19
Created a branch of my own for setting up World Wide Importers in VS Code & Visual Studio 2022.
Saving the updates I made to be able to run these examples in both VS Code & Visual Studio Community 2022 to be able to run and execute each project and build it.
Added a single space to single line closing tags to keep consistency across all tags.
This commit adds a comprehensive SQL Server database sample for a futon
manufacturing business with multi-level bill of materials (BOM), complete
sample data, and 20 manufacturing reports.

Features:
- Multi-level BOM supporting raw materials, components, and finished goods
- Inventory management across multiple warehouses with transaction tracking
- Production order management with work centers and capacity planning
- Quality control inspection tracking
- Purchasing and supplier performance management
- Sales order and customer fulfillment tracking
- 20 comprehensive manufacturing reports including:
  - BOM explosion and where-used analysis
  - Material requirements planning (MRP)
  - Inventory valuation and turnover analysis
  - Production scheduling and capacity analysis
  - Quality and scrap analysis
  - Supplier and customer performance metrics

Database includes:
- Complete schema with 25+ tables
- Sample data: 42 items, 5 suppliers, 8 customers, 3 warehouses
- Product hierarchy: 21 raw materials → 15 components → 6 finished goods
- 20 reporting views for operational insights
- Sample queries demonstrating common use cases
- Comprehensive documentation in README

Files:
- 01-schema.sql - Database schema and table definitions
- 02-sample-data.sql - Sample reference and master data
- 03-manufacturing-reports.sql - 20 manufacturing report views
- 04-sample-queries.sql - Example queries and use cases
- README.md - Complete documentation and usage guide
This commit adds comprehensive sales operations capabilities to the
Futon Manufacturing Database, including support for Retail, Online,
and Wholesale sales channels.

New Features:
- Multi-channel sales support (Retail, Online, Wholesale)
- Retail store management with 7 sample stores
- Sales territories and representative tracking
- Sales quotation and conversion tracking
- Sales returns and refund management
- Promotional campaigns and pricing
- Channel-specific price lists
- 20 comprehensive sales operations reports

Sales Reports (20 total):
1. Sales Performance by Channel - Multi-channel analysis
2. Store Performance - Individual store metrics
3. Sales Rep Performance - Territory and conversion tracking
4. Customer Sales Analysis - Segmentation and status
5. Product Sales Performance - By channel profitability
6. Sales Trend Analysis - MoM and YoY growth
7. Order Value Analysis - AOV and order size distribution
8. Returns Analysis - By reason, product, channel
9. Quote Conversion - Pipeline and win rates
10. Discount Analysis - Impact on margins
11. Top Products - Ranked by multiple metrics
12. Sales by Territory - Geographic performance
13. Channel Profitability - Full P&L by channel
14. Customer Lifetime Value - CLV with tiers
15. Sales Growth Analysis - Trends and patterns
16. Order Size Distribution - Basket analysis
17. Product Mix Analysis - Cross-sell opportunities
18. Time-Based Analysis - Day/hour patterns
19. Sales Pipeline - Funnel conversion rates
20. RFM Segmentation - Customer targeting

Sample Data Added:
- 6 sales territories across regions
- 8 sales representatives
- 7 retail stores (Portland, Seattle, SF, LA)
- 15 sales orders across all channels
- 2 sales returns with reasons
- 2 sales quotes
- 4 promotional campaigns
- 3 channel-specific price lists

Database Enhancements:
- SalesChannel table (Retail, Online, Wholesale)
- Store table for retail locations
- SalesTerritory and SalesRep tables
- SalesReturn and SalesReturnDetail tables
- SalesQuote and SalesQuoteDetail tables
- Promotion table for campaigns
- PriceList and PriceListDetail tables
- Enhanced SalesOrder with channel, store, and rep tracking
- Discount tracking at order and line level

Files Added:
- 05-sales-schema-enhancements.sql - Sales tables and enhancements
- 06-sales-sample-data.sql - Sales sample data (territories, reps, stores, orders)
- 07-sales-reports.sql - 20 sales operations report views
- 08-sales-sample-queries.sql - Example queries for sales analysis

Documentation:
- Updated README with sales reports documentation
- Added sales operations use cases
- Updated installation instructions
- Version bumped to 2.0.0
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.6 to 1.16.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.6...v1.16.0)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Add a complete TypeScript sample demonstrating vector search with Azure SQL Database:
- Azure OpenAI text-embedding-3-small for generating embeddings
- VECTOR_DISTANCE for similarity search with DiskANN index
- Azure Identity (DefaultAzureCredential) for passwordless auth
- Bicep infrastructure for Azure SQL + OpenAI provisioning
- CI workflow for build validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-db-011CUvKoqpR1pTdmPMZVZiyx

Claude/mssql futon shop db 011 c uv koqp r1p tdm pmzv ziyx
Bumps [com.azure:azure-security-keyvault-keys](https://github.com/Azure/azure-sdk-for-java) from 4.0.0 to 4.10.6.
- [Release notes](https://github.com/Azure/azure-sdk-for-java/releases)
- [Commits](Azure/azure-sdk-for-java@v4.0.0...com.azure+azure-security-keyvault-keys_4.10.6)

---
updated-dependencies:
- dependency-name: com.azure:azure-security-keyvault-keys
  dependency-version: 4.10.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [com.azure:azure-security-keyvault-keys](https://github.com/Azure/azure-sdk-for-java) from 4.0.0 to 4.10.6.
- [Release notes](https://github.com/Azure/azure-sdk-for-java/releases)
- [Commits](Azure/azure-sdk-for-java@v4.0.0...com.azure+azure-security-keyvault-keys_4.10.6)

---
updated-dependencies:
- dependency-name: com.azure:azure-security-keyvault-keys
  dependency-version: 4.10.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [com.azure:azure-security-keyvault-keys](https://github.com/Azure/azure-sdk-for-java) from 4.0.0 to 4.10.6.
- [Release notes](https://github.com/Azure/azure-sdk-for-java/releases)
- [Commits](Azure/azure-sdk-for-java@v4.0.0...com.azure+azure-security-keyvault-keys_4.10.6)

---
updated-dependencies:
- dependency-name: com.azure:azure-security-keyvault-keys
  dependency-version: 4.10.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.3.0.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.1.1...4.3.0)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…c SQL license type

- Add policy/azurepolicy.portal.json (portal-paste definition; strips policyType/version, adds LicenseOnly and defaults to it)
- README: portal (copy & paste) path alongside the existing CLI path
- README: edition/combination -> license type table and Software Assurance compliance note
- Cross-link to the companion Windows Arc benefits policy
- Reference issue microsoft#1492 for automatic edition-aware selection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…#1485)

* Adds a new Azure SQL MCP sample under `samples/applications/azure-sql-mcp`. The sample deploys a hosted `mcp-sql` server in Azure Connector Namespace backed by Azure SQL Database

 Adds a new Azure SQL MCP sample under `samples/applications/azure-sql-mcp`. The sample deploys a hosted `mcp-sql` server in Azure Connector Namespace backed by Azure SQL Database, using `azd` and Bicep.

 ### What�s included

 - Provisions Azure SQL Database with a seeded `dbo.BlogPosts` table
 - Deploys Azure Connector Namespace and a hosted SQL MCP server
 - Configures Data API Builder through the included `dab-config.json`
 - Passes SQL and Application Insights connection strings as hosted MCP configuration values
 - Grants the Connector Namespace managed identity access to the SQL database
 - Adds Application Insights and Log Analytics for telemetry
 - Includes post-provision scripts for database seeding, firewall setup, and managed identity grants
 - Provides README instructions for deployment, VS Code MCP setup, Azure Portal inspection, cleanup, and related docs

* PR feedback fixes

* Make provision scripts executable so azd runs them without chmod

The pre-/post-provision .sh scripts were committed as 100644, causing
azd to fail with 'Permission denied' (exit 126) when invoking them
directly. Marking them 100755 lets users run 'azd up' without a manual chmod.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove default from location parameter to fix azd up without --location

* Address PR review feedback from croblesm

- Rename title to 'Hosted MCP in Connector Namespace - Azure SQL Database'
- Rewrite intro to describe what the sample does first, then the tech
- Add VS Code + GitHub Copilot to prerequisites
- Add cross-platform deployment note (azd works on Windows/macOS/Linux)
- Add 'Try it out' section with example Copilot Chat prompts
- Replace ASCII architecture diagram with Mermaid
- Fix Azure service names: 'Azure SQL Database logical server',
  'Microsoft Entra ID', 'Data API builder' (lowercase b)
- Add documentation links for user-assigned MI and VS Code MCP setup
- Clarify seeding mechanism (post-provision SQL script)
- Update deploy.ps1 synopsis to note PowerShell requirement and
  cross-platform alternative via azd

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove Contents and About this sample sections from README

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: lilyjma <jm4303@columbia.edu>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ries, and tests (microsoft#1496)

* Add ShrinkDriver sample: parallel DBCC SHRINKFILE with reporting, retries, and tests

A PowerShell sample that reclaims unused space from a database's data files by running parallel DBCC SHRINKFILE operations. Includes a report mode, incremental shrinking toward an optional target, progress monitoring, retries, graceful stop handling, and low-priority locking. Supports Entra ID, Windows, and SQL authentication, connects with certificate validation first, and ships unit and integration tests (LocalDB, SQL Server, and Azure SQL Database).

* Address review feedback; report reclaimable space left at end of run

Add a PSScriptInfo block (version 1.0.0) to ShrinkDriver.ps1 for script version metadata.
Fix Futon Manufacturing database scripts

- Restore variable scope for Bill of Materials sample data
- Align recursive CTE data types and correct column aliases
- Fix ambiguous references, nested window functions, and divide-by-zero handling
- Add batch boundaries for dependent schema changes
- Expand computed-column expressions to use base columns
- Expose return and product-mix fields required by sample reports
- Widen sales pipeline percentage precision and correct STRING_AGG syntax
…driver

ShrinkDriver: skip files that are unshrinkable because of low watermark not advancing
…sql-license-type.ps1

- Connect-Azure now reuses an existing valid Az/CLI session matching the
  target tenant instead of always forcing re-login, preventing hangs in
  non-interactive contexts.
- Module presence check now verifies Az.Accounts >= 4.2.0 directly instead
  of checking for the Az meta-package, avoiding false negatives and
  unnecessary/conflicting reinstalls.
- Includes pre-existing manage-payg-transition.ps1 fixes: removed unused
  Force_Start_On_Resources param usage, corrected Arc script download URL
  path, and cleaned up wrapper argument line-continuation formatting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… but never fetched)

Live end-to-end testing of RunMode Single revealed the Arc/Azure sub-scripts
were never downloaded before being invoked via the generated wrapper,
causing 'term not recognized' errors. Invoke-RestMethod download calls
(matching Invoke-RemoteScript's Scheduled-mode logic) are now added before
building the wrapper lines for both Arc and Azure targets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dependabot Bot and others added 26 commits August 31, 2026 23:05
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.7 to 1.1.18.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@v1.1.7...v1.1.18)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.18
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…n.ps1

- Add Invoke-AzCliArgsWithRetry/Invoke-AzCmdletWithRetry helpers that retry
  transient network failures (socket exhaustion, HttpRequestException, timeouts)
  with backoff.
- Use retry wrapper in Invoke-AzCliLicenseUpdate and Invoke-AzCliQuery.
- Fix DataFactory SSIS section: Set-AzContext/Get-AzDataFactoryV2/
  Get-AzDataFactoryV2IntegrationRuntime now use -ErrorAction Stop + retry so a
  transient failure is no longer silently mistaken for 'no integration runtimes
  found' or left running against the wrong subscription context.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Get-AzSubscription -SubscriptionId / Get-AzSubscription had no
-ErrorAction Stop, so a transient HttpRequestException (seen repeatedly
outside the dev environment) was a non-terminating error: \
stayed empty, the foreach loop over subscriptions ran zero times, and the
script printed a clean-looking 'No resources were marked for
modification' summary instead of surfacing the failure. Fixed in both the
Arc and Azure sections: retry up to 3x with a 5s backoff, then exit 1
with a clear error if subscription resolution still fails, and abort
if the resolved subscription list is empty for any other reason.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sition blips

Real-world runs showed the Arc script exhausting 3 retries (5s each, ~10s
total) on 'Unable to acquire token ... An error occurred while sending
the request' immediately before the very next (Azure) invocation
succeeded with no retry needed at all, confirming these are short-lived
(10-30s) transient blips rather than a hard block. Increased to 5 attempts
with increasing backoff (5/10/20/30/30s, ~95s total) in both the Arc and
Azure sections so the script has a realistic chance to ride out the blip
instead of exiting before it clears.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Get-AzSubscription was being called without -TenantId, so for a
multi-tenant signed-in account (guest access to other tenants), it
fanned out and tried to acquire a token for *every* tenant the account
belongs to in order to resolve the subscription -> tenant mapping. This
produced unrelated 'Authentication failed against tenant ...
conditional access ... MFA' warnings for guest tenants even when a
specific -TenantId was passed to the script, and made the whole call
more fragile since it depended on tenants the user never intended to
touch. Added -TenantId \ to both Get-AzSubscription call sites
(single-subscription and list-all) in both the Arc and Azure sections,
scoping resolution strictly to the requested tenant.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…aph, az CLI)

- Arc section: auto-install Az.ConnectedMachine/Az.ResourceGraph on demand
  (mirroring the existing Az.DataFactory pattern) instead of silently
  continuing after a failed Import-Module, which left Search-AzGraph
  undefined and crashed later with an unrelated ArgumentNullException.
- Guard Search-AzGraph's result against \ before AddRange to avoid
  'Value cannot be null' if the module still can't be resolved.
- Azure section: fail fast with an actionable error if the 'az' CLI isn't
  installed, instead of letting every downstream az call fail later with
  a confusing 'term az is not recognized' error mid-run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Attempts a silent 'winget install Microsoft.AzureCLI' when 'az' isn't on
PATH, refreshing the process PATH afterwards so a fresh install can be
picked up without restarting the shell. Falls back to the existing clear,
actionable error (with a manual install link) if winget isn't available
or the install fails.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sence

Replaces the single winget attempt with a real self-healing install path:
1. Try 'winget install Microsoft.AzureCLI' and verify az is now resolvable.
2. If winget is unavailable or didn't work, fall back to downloading and
   silently running the official Azure CLI MSI (aka.ms/installazurecliwindows)
   via msiexec, which doesn't depend on winget being present.
3. Only after both real install attempts fail does the script report the
   actionable manual-install error and exit - it no longer gives up after a
   single unverified winget call.

Adds a shared Refresh-Path helper to reload PATH from Machine/User scopes
after each install attempt so a freshly installed az.cmd is found in the
same process without restarting the shell.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds a single pre-connect step in the top-level (non-embedded) part of the
script for -RunMode Single: establishes the Az PowerShell context and,
when targeting Azure, verifies/logs in the Azure CLI exactly once before
invoking the Arc and Azure sub-scripts.

Sets \ / \ so the
embedded Azure script's Connect-Azure short-circuits its own Azure CLI
install-check/login entirely when the parent already verified it for the
same tenant, instead of repeating that work. Falls back to the original
full connect logic unchanged when run standalone (e.g. as an Azure
Automation runbook) where these env vars won't be set.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bumps [@humanfs/node](https://github.com/humanwhocodes/humanfs/tree/HEAD/packages/node) from 0.16.6 to 0.16.8.
- [Release notes](https://github.com/humanwhocodes/humanfs/releases)
- [Changelog](https://github.com/humanwhocodes/humanfs/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/humanwhocodes/humanfs/commits/node-v0.16.8/packages/node)

---
updated-dependencies:
- dependency-name: "@humanfs/node"
  dependency-version: 0.16.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.21.4 to 4.28.8.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](browserslist/browserslist@4.21.4...4.28.8)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.28.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
- Rewrite modify-azure-sql-license-type.ps1 (embedded) to use Az PowerShell
  cmdlets (Get-/Set-AzSqlVM/Instance/Database/ElasticPool/InstancePool,
  Set-AzDataFactoryV2IntegrationRuntime) instead of Azure CLI, addressing
  review feedback to drop the CLI dependency.
- Add explicit Az.Sql / Az.SqlVirtualMachine module ensure/install/import
  logic (previously relied on implicit autoloading, which fails when the
  modules are not already installed).
- SQL VM license updates remain fully synchronous (Update-AzSqlVM), since
  -NoWait/-AsJob are broken in Az.SqlVirtualMachine 2.4.0; other resource
  types keep the async default via -AsJob, mirroring the previous --no-wait
  behavior.
- Update README.md to reflect CLI-free prerequisites and current
  synchronous/async behavior per resource type.
- Update TESTPLAN.md with a new Round 2 section documenting live validation
  of the CLI removal across two subscriptions (SQL VM, Managed Instance,
  SQL Database), the Az.Sql/Az.SqlVirtualMachine regression and fix, and
  refresh the Known gaps / Required permissions sections for the
  PowerShell-only implementation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TESTPLAN.md records live test results against real Microsoft-internal
subscriptions, resource names, tenant IDs, and account details. Per Travis's
review feedback, remove it from source control and add it to .gitignore so
this internal information is not published in the public repo. The file
remains locally as a development record; it is simply no longer tracked.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Prompt before installing Az modules interactively; add -Force to skip prompts for non-interactive use
- Remove Arc/Azure distinction wording when confirming account/tenant context; confirm interactively or require -Force
- Simplify connection messages to 'Connecting to Azure...' and 'Reusing this session'
- Fix 'SQL Servers' -> 'SQL servers' for Azure SQL DB logical server references
- Remove stale 'mirrors the previous CLI' comments
- Replace 'RG' abbreviation with 'resource group' throughout output messages
- Remove SSIS/Data Factory integration runtime support entirely from the script and README
- Simplify README SQL VM synchronous-behavior explanation to one sentence

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Improve resiliency and performance of manage-payg-transition.ps1
…-actions

Pin GitHub Actions to full-length commit SHAs
…arn/samples/databases/wide-world-importers/wwi-app/wwwroot/lib/webcomponentsjs/browserslist-4.28.8

Bump browserslist from 4.21.4 to 4.28.8 in /samples/databases/wide-world-importers/wwi-app/wwwroot/lib/webcomponentsjs
…arn/samples/databases/wide-world-importers/wwi-app/wwwroot/lib/webcomponentsjs/humanfs/node-0.16.8

Bump @humanfs/node from 0.16.6 to 0.16.8 in /samples/databases/wide-world-importers/wwi-app/wwwroot/lib/webcomponentsjs
…arn/samples/databases/wide-world-importers/wwi-app/wwwroot/lib/o.js/brace-expansion-1.1.18

Bump brace-expansion from 1.1.7 to 1.1.18 in /samples/databases/wide-world-importers/wwi-app/wwwroot/lib/o.js
Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-node](https://github.com/actions/setup-node).


Updates `actions/checkout` from 6.1.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@d23441a...3d3c42e)

Updates `actions/setup-node` from 6.5.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@2499707...8207627)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
…tions/github-actions-901392d03b

Bump the github-actions group with 2 updates
…driver

ShrinkDriver: add a safety valve to abort on large log or PVS growth
…tution

Implements the second wave of the Azure SQL vector search constitution
(.github/instructions/vector-search-constitution.instructions.md on
branch constitution/azure-sql-vector-search, PR microsoft#1515):
TypeScript, Python, and Go for the vector-search scenario. .NET and Java
remain constitution-defined future languages and are intentionally not
implemented in this PR.

## TypeScript (vector-search-query-typescript/) — audit and alignment

- Added ESLint (flat config, typescript-eslint recommended) and Prettier,
  with npm run lint / format / format:check scripts. Fixed the two
  findings ESLint surfaced: an unsafe �s any cast on
  tedious's addParameter (now typed via (typeof TYPES)[keyof typeof TYPES])
  and missing Node globals in the plain-JS typecheck helper script.
- Added CI steps for lint and format:check ahead of the existing
  type-check step.
- Added output/sample-output.txt: the real, previously captured run
  output already published in this sample's README "Expected output"
  section, now also committed as the required standalone reference file.
  Carved out .gitignore's output/ exclusion (output/* + negated
  !output/sample-output.txt) so this committed file is not silently
  re-ignored.
- No behavior changes; only type-safety and tooling additions plus the
  reformatting Prettier's format:check gate requires.

## Python (vector-search-query-python/) — new, idiomatic implementation

- pyodbc (SQL driver) + azure-identity (Entra auth, via the documented
  SQL_COPT_SS_ACCESS_TOKEN pattern since pyodbc has no built-in
  DefaultAzureCredential integration) + openai's AzureOpenAI class
  (embeddings). Configuration via .env (sample.env template), matching
  the constitution's per-language config-mechanism table.
- Same table shape, same DiskANN >=1,000-row gate (falls back to exact
  automatically), same JSON-cast vector binding, same canonical query and
  hotel dataset as the TypeScript reference — not transliterated, but
  idiomatic Python (dataclass config, context-managed cursor, batched
  fast_executemany insert).
- requirements.txt (>=-pinned) + requirements-dev.txt (ruff, mypy,
  pytest) + pyproject.toml. 22 unit tests cover configuration validation,
  table-name validation, and dataset-shape validation without requiring
  Azure connectivity.
- CI: ruff check, ruff format --check, mypy, pytest.

## Go (vector-search-query-go/) — new, idiomatic implementation

- github.com/microsoft/go-mssqldb + its azuread subpackage (driver name
  "azuresql", fedauth=ActiveDirectoryDefault DSN parameter — the driver
  handles Entra token acquisition internally, unlike TS/Python) +
  github.com/Azure/azure-sdk-for-go/sdk/azidentity (embeddings-call
  credential) + github.com/openai/openai-go/v3 with its azure subpackage
  (embeddings).
- IMPORTANT CURRENCY FINDING, not guessed: github.com/Azure/azure-sdk-for-go/sdk/ai/azopenai
  — the package the constitution's initial authoring named for this role
  — changed function as of its v0.8.0 release (2025-06-03) and is no
  longer a standalone client; it is now only a companion package
  providing Azure-specific extension types to the official openai-go
  client. Verified live against the actual v0.9.0 source and its own
  example/test files before writing this code. For a plain embeddings
  call, azopenai itself is not required at all. This finding requires a
  follow-up correction to the constitution's ASV-CORE-37/ASV-LANG-GO-5
  Go row on PR microsoft#1515 (or a fast-follow PR after it merges) — flagged in
  the PR description, not silently absorbed.
- Idiomatic Go module layout: cmd/query (search scenario) and cmd/embed
  (embedding regeneration) binaries, internal/config and internal/hotels
  shared packages. Same table shape, same DiskANN gate, same JSON-cast
  vector binding as every other language. 6 unit tests (go test) cover
  configuration validation and dataset-shape/vector-serialization
  validation without requiring Azure connectivity.
- CI: gofmt -l (format check), go vet, go build, go test.

## Explicit no-live-execution disclosure (both new languages)

No authorized live Azure SQL Database or Azure OpenAI environment was
available while authoring this PR. Python's and Go's output/sample-output.txt
and README "Expected output" sections say so explicitly and are marked
as NOT a captured real run (placeholder values only) — they must not be
treated as validated end-to-end evidence. What was validated locally
without live Azure access, for both languages: static analysis (lint/
format/vet/type-check), full local build, and unit tests for all
pure/testable logic (config validation, vector serialization, dataset
validation). TypeScript's output/sample-output.txt is the one real
captured run, carried over from its existing README section.

## Shared changes

- samples/features/vector-search/README.md: added Python and Go rows to
  the language table with explicit status (implemented + statically
  validated vs. TypeScript's implemented + live-validated), and
  generalized the .env setup instructions to name all three languages.
- Reused the existing shared data/ (HotelsData_Vector.json) and infra/
  (Azure SQL Database + Azure OpenAI Bicep) unchanged. No new platform,
  scenario, or documentation article added.

Depends on constitution PR microsoft#1515 (not yet
merged) as the governing source; this PR's constitution reference
resolves once microsoft#1515 merges.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…on ruff/README)

Validated via a same-repo draft PR on the fork per the fork-workflow
skill (upstream PR microsoft#1516 correctly skips CI for fork-originated PRs by
design, matching the existing TypeScript CI's fork-PR guard, so this
was the only way to get real CI execution before review).

- Go: go.mod's go directive was auto-set to 1.26.1 by the local
  toolchain used to write this sample, but CI pins go-version: "1.25"
  per the constitution's stated Go 1.25+ minimum (ASV-LANG-GO-2). Ran
  go mod tidy to reset the directive to 1.25.0 and correctly split
  direct vs. indirect requires (previously everything was marked
  indirect). Rebuilt/vetted/tested locally afterward — unchanged, still
  green.
- Python: 
uff format --check . also scans embedded Python code
  blocks inside README.md by default and wanted to reformat one,
  which would have altered published documentation prose formatting.
  Added �xtend-exclude = ["README.md"] to pyproject.toml, matching
  the same doc-vs-code formatting boundary already established for
  TypeScript's Prettier config (.prettierignore excludes README.md).

Re-verified all three languages' full local check suites still pass
after these fixes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry

diberry commented Sep 16, 2026

Copy link
Copy Markdown
Owner Author

CI validation complete — all 3 workflows passed after fixes (see commits 1805696, bbb57f5). Closing this draft; the real PR is microsoft#1516.

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.