Skip to content

Compile reviewed model records into deterministic compatibility projections - #10317

Merged
lpcox merged 9 commits into
mainfrom
copilot/adr-0004-phase-3-deterministic-projections
Oct 20, 2026
Merged

lpcox merged 9 commits into
mainfrom
copilot/adr-0004-phase-3-deterministic-projections

Conversation

Copilot AI commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Model facts were maintained across host, proxy, and documentation files, while the endpoint updater could change a mapping copy independently. This PR introduces governed sources and offline compilation without activating the later resolver migrations.

  • Sources and imports

    • Add Copilot-qualified maintained records and a pinned, provider-qualified legacy catalogue snapshot. Record its repository capture and content hash without claiming an upstream retrieval date or license.
    • Stage the named pricing, availability, reasoning, and context corrections separately from the legacy baseline.
  • Projections and ownership

    • Generate the mapping copies, compatibility assets, static catalogues, revision manifest, and machine-readable baseline-to-target diff from reviewed sources.
    • Add CI stale-output detection. Contributors can update and verify projections with:
      npm run models:generate
      npm run models:check
  • Updater and activation boundary

    • Make the endpoint updater manual and read-only until a source-aware updater is available.
    • Keep live host validation, pricing, retirement, and import fallback behavior unchanged; the staged corrections remain for the later consumer migration gates.

Copilot AI changed the title [WIP] Implement ADR 0004 phase 3 for deterministic projections Compile reviewed model records into deterministic compatibility projections Oct 20, 2026
Copilot AI requested a review from lpcox October 20, 2026 00:48
@lpcox
lpcox marked this pull request as ready for review October 20, 2026 03:41
Copilot AI max review requested due to automatic review settings October 20, 2026 03:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved compiler correctness, pricing-provenance, workflow permissions, and ineffective test assertions block approval.

7 open issues
What changed in this PR

Introduces governed model sources and deterministic offline compilation for compatibility projections, while deferring live resolver migrations.

Changes:

  • Adds reviewed records, pinned legacy imports, and staged model corrections.
  • Generates compatibility assets, catalogues, manifests, and diffs with CI freshness checks.
  • Moves the endpoint updater to manual review and documents ownership boundaries.
File Description
src/​model-information.compat.generated.json Host support and retirement projection.
shared/​model-information/​sources/​target.json Staged model corrections.
shared/​model-information/​sources/​pricing-reference.json Pricing-reference coverage and provenance.
shared/​model-information/​sources/​mapping.json Maintained endpoint-mapping source.
shared/​model-information/​sources/​copilot-other.json Additional Copilot model records.
shared/​model-information/​sources/​copilot-gemini.json Copilot Gemini records.
shared/​model-information/​manifest.generated.json Revision, source, and import metadata.
shared/​model-information/​import-legacy-snapshot.js Pinned legacy catalogue importer.
shared/​model-information/​import-legacy-snapshot.d.ts Importer type declarations.
scripts/​model-information/​import.test.ts Import integrity and normalization tests.
scripts/​model-information/​compile.test.ts Compiler, projection, and packaging tests.
scripts/​model-information/​compile.cjs Offline compiler, validation, and stale-output detection.
scripts/​ci/​model-api-mapping-updater-workflow.test.ts Updater workflow contract tests.
package.json Generation and verification commands.
docs/​model-api-mapping.json Generated documentation mapping.
docs/​adr/​0004-model-information-management.md Ownership, provenance, and activation guidance.
containers/​api-proxy/​model-information.retired.generated.json Staged retirement projection.
containers/​api-proxy/​model-information.pricing.generated.json Staged curated-pricing projection.
containers/​api-proxy/​model-api-mapping.json Generated proxy mapping.
containers/​api-proxy/​Dockerfile Packages generated proxy assets.
.github/​workflows/​model-api-mapping-updater.md Manual review workflow source.
.github/​workflows/​model-api-mapping-updater.lock.yml Compiled review workflow.
.github/​workflows/​build.yml CI generated-output verification.

Review effort: Max

Comment on lines +75 to +76
report-failed-jobs: false
report-failure-as-issue: false
Comment on lines +101 to +106
for (const pattern of entry.patterns || []) {
if (patterns.has(pattern) && patterns.get(pattern) !== JSON.stringify(entry.endpoints)) {
errors.push(`mapping.json: ${provider}: conflicting equal-specificity pattern ${pattern}`);
}
patterns.set(pattern, JSON.stringify(entry.endpoints));
}
Comment thread scripts/model-information/compile.cjs Outdated
Comment on lines +121 to +131
const generatedAt = [{ at: imported.retrievedAt }, mapping.provenance, reference.provenance,
...records.map(([, data]) => data.provenance)]
.map(item => new Date(item.at).toISOString()).sort().at(-1);
const sortedModels = [...models, ...imported.models].sort((a, b) =>
a.identity.key < b.identity.key ? -1 : a.identity.key > b.identity.key ? 1 : 0);
const target = JSON.parse(fs.readFileSync(path.join(sources, 'target.json'), 'utf8'));
if (target.schemaVersion !== 1 || target.provenance?.authority !== 'maintained' ||
!target.provenance.at || !Array.isArray(target.availability) ||
!Array.isArray(target.routing)) {
throw new Error('target.json: invalid target metadata or corrections');
}
Comment on lines +144 to +147
if (!targetModels.has(id.key)) targetModels.set(id.key, {
schemaVersion: 1, identity: id, lifecycle: { status: 'active' },
modelType: 'completion', provenance: target.provenance,
});
Comment thread scripts/model-information/compile.cjs Outdated
Comment on lines +232 to +233
family: 'claude-mythos-preview', patterns: ['claude-mythos-preview*'],
endpoints: parent.endpoints, notes: 'Preview excludes xhigh; #10030.',
Comment thread scripts/model-information/compile.cjs Outdated
Comment on lines +269 to +275
const differences = resolvedTarget.filter(model =>
JSON.stringify(model) !== JSON.stringify(models.find(item => item.identity.key === model.identity.key)))
.map(model => ({
key: model.identity.key,
baseline: models.find(item => item.identity.key === model.identity.key) || null,
target: model,
}));
schemaVersion: 1, identity: modelIdentity,
lifecycle: { status: 'active' }, modelType: 'other',
tariffs: [{
scope: { provider: modelIdentity.provider, channel: 'native-api' },
@lpcox

lpcox commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback

Copilot AI commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@copilot address review feedback

Addressed the review feedback in commit 7c0dbd9.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@copilot Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-10317 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit a8af114

@github-actions

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 93.40% 93.40% ➡️ +0.00%
Statements 91.96% 91.96% ➡️ +0.00%
Functions 91.16% 91.16% ➡️ +0.00%
Branches 85.99% 86.00% 📈 +0.01%

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

Copy link
Copy Markdown
Contributor

Smoke test (Copilot)

  • GitHub MCP ✅ (latest PR: "Extract backend-neutral enclave execution policy and lifecycle")
  • github.com connectivity ✅
  • File write/read ✅
    Overall: PASS — @Copilot @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Services smoke test: ✅ Redis PONG · ✅ pg_isready accepting connections · ✅ SELECT 1 = 1 — PASS

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) ✅ PASS

  • ✅ HTTP connectivity: 200 (github.com)
  • ✅ File I/O: smoke-test-copilot-byok.txt readable
  • ✅ MCP connectivity: PR list verified
  • ✅ BYOK inference: Working (agent → api-proxy → api.githubcopilot.com)

Mode: Direct BYOK via COPILOT_PROVIDER_API_KEY + api-proxy sidecar

cc @lpcox

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

OTEL smoke results

  • ✅ S1 Module loads; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled, etc.
  • ✅ S2 OTEL tests: 3 suites, 68/68 passed
  • ✅ S3 Env forwarding: trace ID/parent span ID forwarded in env-passthrough.ts; OTEL_EXPORTER_OTLP_* forwarded in api-proxy-env-config.ts
  • ✅ S4 onUsage hook present in token-tracker-http.js
  • ✅ S5 Diagnostics: /tmp/gh-aw/otel.jsonl present (1 line); no export errors observed

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass
✅ Allowed domain (api.github.com): HTTP 403 status returned (reachable)
✅ Blocked domain (example.com): blocked (TLS cert error from proxy)
Overall: PASS — @lpcox

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

PRs: #10323 ci: automate full enclave conformance after releases; #10314 fix: enforce one workload backend in enclave conformance

  • GitHub merged PRs: ✅
  • GitHub PR details: ✅
  • Playwright title check: ❌
  • Temp file write/read: ✅
  • AWF build: ✅
    Overall: FAIL

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia ❌ not run ❌ FAIL
Bun hono ❌ not run ❌ FAIL
C++ fmt ✅ N/A ✅ PASS
C++ json ✅ N/A ✅ PASS
Deno oak ❌ not run ❌ FAIL
Deno std ❌ not run ❌ FAIL
.NET hello-world ✅ N/A ✅ PASS
.NET json-parse ✅ N/A ✅ PASS
Go color ✅ pass (ok) ✅ PASS
Go env ✅ pass (ok) ✅ PASS
Go uuid ✅ pass (ok) ✅ PASS
Java gson ✅ 1/1 passed ✅ PASS
Java caffeine ✅ 1/1 passed ✅ PASS
Node.js clsx ✅ all passed ✅ PASS
Node.js execa ✅ all passed ✅ PASS
Node.js p-limit ✅ all passed ✅ PASS
Rust fd ✅ 1/1 passed ✅ PASS
Rust zoxide ✅ 1/1 passed ✅ PASS

Overall: 6/8 ecosystems passed — FAIL

Failures:

  • Bun / Deno: the install-script commands (curl ... | bash / | sh) were denied by the sandbox permission policy, so the tools were never installed and no tests ran. The repos cloned fine.

Environment notes (workarounds applied):

  • .NET needed XDG_RUNTIME_DIR and DOTNET_CLI_HOME set to writable paths, because /run/user/1001 is missing.
  • Maven needed -Dmaven.repo.local set to a writable path, because ~/.m2 is root-owned and ~/.m2/repository couldn't be created.

The build-test label was not added because of the failures.

Generated by Build Test Suite for #10317 · copilot · auto · 26.3 AIC · ⊞ 12K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Chroot version comparison

Runtime Host Version Chroot Version Match?
Python Python 3.12.15 Python 3.12.15 ✅ YES
Node.js v24.21.0 v26.11.1 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Node.js differs between host and chroot, so not all tests passed. The smoke-chroot label was not added.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Gemini Engine Validation

💎 Faceted by Smoke Gemini
Add label ready-for-aw to run again

@lpcox
lpcox merged commit 44da097 into main Oct 20, 2026
141 of 146 checks passed
@lpcox
lpcox deleted the copilot/adr-0004-phase-3-deterministic-projections branch October 20, 2026 15:46

This branch had an error being deployed

1 failed deployment
aoai-model — 7c0dbd9b Deployed Oct 20, 2026 by lpcox via conclusion #2055
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADR 0004 phase 3: compile maintained model records into deterministic projections

3 participants