Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2cddfaf
Create secret-scan.yml for Gitleaks integration
lionelc Jul 6, 2026
e20ec9c
Add GITHUB_TOKEN
lionelc Jul 6, 2026
e93e26d
Add workflow_dispatch trigger to secret scan
lionelc Jul 6, 2026
c292c4a
Add pinned commit SHA
lionelc Jul 6, 2026
b317896
Update Gitleaks action to use version v2
lionelc Jul 6, 2026
a41d3aa
Merge pull request #1 from lionelc/gitleak
lionelc Jul 6, 2026
035a745
Add SECURITY.md for compliance
Jul 13, 2026
4e05a9a
Fix link for Coordinated Vulnerability Disclosure
lionelc Jul 13, 2026
5108b66
Merge branch 'Azure:main' into main
lionelc Aug 3, 2026
70d687d
Add the two-loop test architecture: testing/ (deterministic) + evals/…
Aug 11, 2026
7bd3560
testing: fail fast with a clear message when the DB password is wrong
Aug 11, 2026
52f540e
Fix four measured nondeterminism bugs in the diagnostic scripts
Aug 13, 2026
421f3ad
Add task-level token / AI-credit accounting for Loop B
Aug 13, 2026
c2f69c4
Add before/after remediation grading — objective, no LLM judge
Aug 13, 2026
9279f9b
Add the Loop B cross-model experiment matrix and static config guards
Aug 13, 2026
b1a2cb9
Add CI for both loops, and fix a latent break in the container setup
Aug 13, 2026
b64c433
Add docs/TESTING.md — reproduction guide for both loops
Aug 13, 2026
78340ac
Add the MSBench skill-efficacy benchmark (Loop C), with per-task toke…
Aug 13, 2026
473612f
Build and verify the MSBench benchmark end-to-end: oracle passes, nai…
Aug 13, 2026
5659218
Correct the grading-criteria language: fit, not a hierarchy of legiti…
Aug 13, 2026
97f7e52
Add the effectiveness report generator, and state plainly that no MSB…
Aug 13, 2026
8edab2f
Define "treatment" and "control" — the terms were used but never expl…
Aug 13, 2026
88c3e7d
Fix an intermittent determinism failure: settle planner statistics af…
Aug 13, 2026
e4949ad
Document what "quality" the benchmark actually measures — and the gap
Aug 13, 2026
b0560aa
Add the guidance-quality judge: the kit's one qualitative measurement
Aug 14, 2026
df35964
Make every reported number reproducible, and document how
Aug 14, 2026
3707cb1
Complete the reproduction commands in REPORT.md, and verify them from…
Aug 17, 2026
1ab5b4c
Check results into the repo, with provenance and paired arms enforced
Aug 17, 2026
80787da
Rebuild the token study as a measured benchmark: route cost AND parity
Aug 17, 2026
5fb6199
Price cross-model cost in USD, and unblock the matrix with subagents
Aug 17, 2026
7d40401
Retract the "superseded" label on token-tests: the objection was wrong
Aug 18, 2026
3cef893
Decouple the testing suite and route benchmark from token-tests/
Aug 18, 2026
9496c73
Clean up (no token-tests dependencies for now)
lionelc Aug 18, 2026
86b0f97
Fix shellcheck failures in Loop C — including a real bug in the route…
Aug 19, 2026
72e7c72
Fix workflow issues
lionelc Aug 19, 2026
1da37fa
cleanup
Aug 19, 2026
32b2e8c
Stop config validation depending on generated results
Aug 19, 2026
e0f488d
Further cleanup to remove unnecessary dependency for Loop C benchmark
lionelc Aug 19, 2026
606441e
Clarify remediation structural redundancy guard
Aug 28, 2026
16975d2
Add MongoDB-to-DocumentDB ecommerce compatibility quickstart
Aug 31, 2026
11965ce
Move the compatibility quickstart to the repository root
Sep 1, 2026
3469663
Make the compatibility project DocumentDB-only
Sep 1, 2026
5b05166
Add deterministic advanced ecommerce compatibility data
Sep 1, 2026
31a65b0
cross-platform compatibility for scripts
Sep 15, 2026
e0d06f8
cross-platform compatibility
lionelc Sep 15, 2026
5285d4e
adding missing files for testing framework
Sep 21, 2026
19c69f8
use commit hash in yml
Sep 21, 2026
226677d
consolidate doc
Sep 21, 2026
de79c89
sort out mongosh installation with a check
Sep 22, 2026
400325b
permission to 755
Sep 22, 2026
17f50cd
addressed model selection issue
Sep 22, 2026
65ac7fb
fix invalid json in perf-advisor.sh
Sep 22, 2026
f3408d2
fix conftest.py to add a gate
Sep 22, 2026
bff3d6a
fix coll concat in several shell scripts
Sep 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
Empty file modified .github/agents/skill-reviewer/check-skill.py
100755 → 100644
Empty file.
149 changes: 149 additions & 0 deletions .github/workflows/diagnostic-regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: Diagnostic Regression Suite

# The Diagnostic Regression Suite is the deterministic half of the kit's
# testing. Diagnostic scripts are tools, not agents, so the same database state
# must return the same answer every time. It is fast, free and runs on every PR.
#
# Cross-Model Skill Evaluations are deliberately NOT here — they cost AI
# credits. See skill-evaluations.yml, which is dispatch/schedule only.

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

env:
MONGOSH_VERSION: "2.3.8"
MONGOSH_SHA256: "23edb768189663aaa9732a2340a25b5fc05a314940538809a7840be7f2ce221f"
DOCUMENTDB_LOCAL_IMAGE: "ghcr.io/microsoft/documentdb/documentdb-local@sha256:0fcf634531c1917ad0855ff9f4354aca0a5c5d8e435f08250568deb37eeb0ad5"

jobs:
# -------------------------------------------------------------------------
# Everything that needs no database. Runs in ~30s with no Docker at all, so
# a broken eval config or a wrong cost metric is caught before the expensive
# job even starts.
# -------------------------------------------------------------------------
static:
name: Infrastructure-free contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install test deps
run: pip install -r testing/requirements.txt

- name: Token accounting, eval configs, router
working-directory: testing
# These scenarios override the container fixture with a no-op, so they
# run with no Docker, no credentials and no network.
run: python -m pytest -ra scenarios/token-accounting scenarios/evals-config scenarios/portable-cli

windows:
name: Windows portable CLI contracts
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install test deps
run: pip install -r testing/requirements.txt

- name: Validate Python and PowerShell launchers
working-directory: testing
run: python -m pytest -ra scenarios/portable-cli

- name: Execute a PowerShell launcher
shell: pwsh
run: .\scripts\perf-advisor.ps1 --help

# -------------------------------------------------------------------------
# The full scenario suite against a live container.
# -------------------------------------------------------------------------
scenarios:
name: Diagnostic scenario contracts
runs-on: ubuntu-latest
needs: static
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Start DocumentDB Local
run: |
# Throwaway credential for this ephemeral CI container: generated per
# run, never hardcoded. Masked so it cannot leak into the log.
DOCDB_PASSWORD="Ci$(openssl rand -hex 12)"
echo "::add-mask::$DOCDB_PASSWORD"
echo "DOCDB_PASSWORD=$DOCDB_PASSWORD" >> "$GITHUB_ENV"
docker run -d --name documentdb-local \
-p 10260:10260 -p 9712:9712 \
-e USERNAME=docdbadmin -e PASSWORD="$DOCDB_PASSWORD" \
"$DOCUMENTDB_LOCAL_IMAGE"

- name: Install mongosh into the container
# NOT optional. The documentdb-local image ships psql but NO mongosh
# (verified against the pristine image), while every diagnostic script
# drives the database with `docker exec <container> mongosh ...`.
# Without this step every scenario fails with a confusing "executable
# file not found", which looks like a broken test rather than a missing
# dependency.
run: |
MV="${MONGOSH_VERSION}"
curl -fsSL "https://downloads.mongodb.com/compass/mongosh-${MV}-linux-x64.tgz" \
-o /tmp/mongosh.tgz
echo "${MONGOSH_SHA256} /tmp/mongosh.tgz" | sha256sum -c -
tar xzf /tmp/mongosh.tgz -C /tmp
docker cp "/tmp/mongosh-${MV}-linux-x64/bin/mongosh" \
documentdb-local:/usr/local/bin/mongosh
docker cp "/tmp/mongosh-${MV}-linux-x64/bin/mongosh_crypt_v1.so" \
documentdb-local:/usr/local/lib/ || true
INSTALLED_VERSION="$(docker exec documentdb-local mongosh --version | tr -d '\r')"
if [ "$INSTALLED_VERSION" != "$MV" ]; then
echo "::error::Expected mongosh $MV, installed $INSTALLED_VERSION"
exit 1
fi
echo "Installed compatible mongosh $INSTALLED_VERSION"
rm -rf /tmp/mongosh.tgz "/tmp/mongosh-${MV}-linux-x64"

- name: Wait for the gateway
run: |
for i in $(seq 1 90); do
if docker exec documentdb-local \
mongosh "localhost:10260/admin" -u docdbadmin -p "$DOCDB_PASSWORD" \
--authenticationMechanism SCRAM-SHA-256 --tls \
--tlsAllowInvalidCertificates --quiet \
--eval "db.runCommand({ping:1}).ok" 2>/dev/null | grep -q 1; then
echo "Ready after ${i}s"; exit 0
fi
sleep 2
done
echo "Gateway did not become ready in time" >&2
docker logs documentdb-local || true
exit 1

- name: Install test deps
run: pip install -r testing/requirements.txt

- name: Run the scenario suite
working-directory: testing
env:
DOCDB_PASSWORD: ${{ env.DOCDB_PASSWORD }}
run: python -m pytest -ra

- name: Container logs on failure
if: failure()
run: docker logs documentdb-local || true
170 changes: 170 additions & 0 deletions .github/workflows/skill-efficacy-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
name: MSBench Skill-Efficacy Benchmark

# The MSBench Skill-Efficacy Benchmark is the publication layer: a hermetic,
# externally-citable pass@k for the DocumentDB agent kit, run on Microsoft's
# MSBench platform.
#
# Split by what each job needs:
#
# validate — no Docker, no MSBench, no network. Runs on every PR.
# build — Docker only. Builds the images and proves the ORACLE scores 1
# and an EMPTY submission scores 0. Manual/scheduled.
# publish — needs internal MSBench access. Manual only.
#
# The paid/gated jobs never trigger on push or pull_request.

on:
pull_request:
branches: [main]
paths:
- "benchmarks/**"
- "testing/scenarios/benchmark-*/**"
push:
branches: [main]
paths:
- "benchmarks/**"
workflow_dispatch:
inputs:
run_oracle:
description: "Build the images and run the oracle end-to-end"
required: false
default: true
type: boolean
pass_at_k:
description: "Attempts per instance when submitting to MSBench"
required: false
default: "5"
type: string

permissions:
contents: read

jobs:
# -------------------------------------------------------------------------
validate:
name: Benchmark structure (free)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install test deps
run: pip install -r testing/requirements.txt

- name: Validate registration, task layout and cost metrics
working-directory: testing
# No container, no credentials, no network — these override the
# container fixture with a no-op.
run: python -m pytest -ra scenarios/benchmark-config scenarios/benchmark-metrics

- name: Lint shell entrypoints
run: |
sudo apt-get update -qq && sudo apt-get install -y -qq shellcheck
# Lint EVERY shell script under benchmarks/, not a hand-maintained
# list. An explicit list silently stops covering new scripts, which is
# how a real bug (an agent prompt that was never passed, SC2034) sat
# unlinted in the route-efficiency harness.
#
# SC1091: sourced files live inside the container image, not the repo.
mapfile -t scripts < <(find benchmarks -name '*.sh' -type f | sort)
printf 'linting %d script(s)\n' "${#scripts[@]}"
printf ' %s\n' "${scripts[@]}"
shellcheck -e SC1091 "${scripts[@]}"

# -------------------------------------------------------------------------
oracle:
name: Build images + oracle must pass, empty must fail
runs-on: ubuntu-latest
needs: validate
if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_oracle }}
steps:
- uses: actions/checkout@v4

- name: Stage inputs and build benchmark images
working-directory: benchmarks/documentdb-sdk-skills
# build.sh stages the ignored .skills/ and .wheels/ build inputs before
# invoking Docker. Calling either Dockerfile directly fails in a clean
# checkout because those generated directories do not exist.
run: bash build.sh

- name: Oracle must score 1
# The positive control. If this fails, the grader is impossible to
# satisfy and every measured score is meaningless.
working-directory: benchmarks/documentdb-sdk-skills
# The image intentionally does not bake /solution or /tests. The
# control runner mounts them read-only and asserts the reward.
run: bash verify-controls.sh --only oracle

- name: Empty submission must score 0
# The negative control. A grader that never fails is worthless, and this
# is the cheapest possible proof that it can.
working-directory: benchmarks/documentdb-sdk-skills
run: bash verify-controls.sh --only empty

# -------------------------------------------------------------------------
publish:
name: Submit to MSBench (internal access required)
runs-on: ubuntu-latest
needs: oracle
if: ${{ github.event_name == 'workflow_dispatch' }}
environment: msbench
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Azure login
uses: azure/login@7184910d9eb2b1c5e48f7073824a90609bb9b6d6 # v2.3.1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Install msbench-cli
env:
FEED: https://pkgs.dev.azure.com/devdiv/_packaging/MicrosoftSweBench/pypi/simple/
run: |
pip install keyring artifacts-keyring
TOKEN=$(az account get-access-token \
--resource 499b84ac-1321-427f-aa17-267ca6975798 \
--query accessToken -o tsv)
echo "::add-mask::$TOKEN"
pip install msbench-cli --index-url="https://user:${TOKEN}@${FEED#https://}"
msbench-cli version

- name: Run both arms
# BOTH arms, always. A treatment score without its control is not a
# result — it cannot be interpreted, let alone published.
run: |
K="${{ inputs.pass_at_k }}"
for arm in documentdb-sdk-skills documentdb-sdk-skills-noskills; do
echo "::group::$arm"
msbench-cli run \
--benchmark "$arm" \
--dataset "benchmarks/documentdb-sdk-skills/msbench-registration/$arm/dataset.jsonl" \
--pass_at_k "$K" \
--runner benchmarks/documentdb-sdk-skills/shared/ces/runner.sh
echo "::endgroup::"
Comment thread
lionelc marked this conversation as resolved.
done

- name: Summarise
if: always()
run: |
{
echo "## MSBench Skill-Efficacy Benchmark"
echo
echo "Report the **delta** between \`documentdb-sdk-skills\` (kit"
echo "installed, never mentioned) and \`documentdb-sdk-skills-noskills\`"
echo "(control). An absolute pass@k on either arm alone is not a result."
echo
echo "Per-instance token cost and observed model provenance are in"
echo "\`custom_metrics.json\`; export them with"
echo '`msbench-cli report --run_id <id> --output report.json`.'
echo "The report generator refuses comparisons with missing or different"
echo "model identifiers between treatment and control."
} >> "$GITHUB_STEP_SUMMARY"
Loading
Loading