Repository navigation
Conversation
14 tasks
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
lpcox
marked this pull request as ready for review
October 20, 2026 03:41
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved compiler correctness, pricing-provenance, workflow permissions, and ineffective test assertions block approval.
7 open issues
Disable issue-authoring outputs and unnecessary write permissions · New Reject conflicting routing pattern payloads · New Include target review time in generatedAt · New Preserve imported pricing when adding target routing · New Preserve context metadata when splitting Mythos Preview · New Compare complete baseline and target exports for accurate deltas · New Require evidence before assigning native pricing scope · New
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 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 on lines
+232
to
+233
| family: 'claude-mythos-preview', patterns: ['claude-mythos-preview*'], | ||
| endpoints: parent.endpoints, notes: 'Preview excludes xhigh; #10030.', |
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' }, |
Collaborator
|
@copilot address review feedback |
Contributor
Author
Addressed the review feedback in commit |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
Projections and ownership
Updater and activation boundary