Skip to content

Feat/metadata v2 schema - #898

Merged
AlexAxthelm merged 3 commits into
epic/v2from
feat/metadata-v2-schema
Oct 5, 2026
Merged

AlexAxthelm merged 3 commits into
epic/v2from
feat/metadata-v2-schema

Conversation

@AlexAxthelm

@AlexAxthelm AlexAxthelm commented Aug 14, 2026 •

Copy link
Copy Markdown
Collaborator

Alex's TL;DR here, Claude's summary below:

  • ignore the noisy public changes (generated docs)
  • the files in src/schema have useful docstrings that you may want to look at in particular
  • includes v1 to v2 script, will get removed when we load in the new data from the working excel file (stacked PR)

At this point, this is a "plumbing" PR. I'm intending that this will have the UI one, and one for a better import of the touched data files (not just placeholder values), extended on top of it and then we can merge that whole block as one (using the new stacks feature on GH)


Summary

Introduces pathwayMetadata.v2 — the foundation for epic #860 (best-effort /
inheritance search). Each of the 11 keyFeatures becomes an array of
{sector, geography, value} entries so a pathway can hold different values for
different parts of its coverage, plus new coreDrivers, dependencies and
pathwayDescription fields, and an optional dataAvailability section. There is
no transitionAssessment field: v1's "Application to Transition Assessment"
section is retired, as src/data/README.md records.

Scope was deliberately narrowed from the ticket: 7 of 56 data files (4 ACE,
3 IEA) are migrated here; the other 49 follow in a separate PR. v1 and v2 coexist
via $schema $id routing, but only v2 documents are loaded, so the app
currently shows 7 pathways and logs how many were skipped.

Reviewing this

The diff is ~27.6k added lines, but 23.4k of that is generated — please skim
rather than read:

files added
generated HTML schema docs 3 +22,883
generated .d.ts 3 +542
data JSON (codemod output) 7 +656
hand-written 25 +3,528

The parts worth real attention:

  • src/schema/pathwayMetadata.v2.json + common/scope{Sector,Geography}.v2.json
  • src/utils/keyFeatureScope.ts — scope containment for search
  • src/utils/validateScopes.ts — the cross-field check draft-07 can't express
  • scripts/codemod-v1-to-v2.ts — the v1→v2 migration
  • src/utils/searchUtils.ts — the two facets that had to change

Known gaps, deliberately left

  • coreDrivers is scaffolded all-null. The v1 "Core Drivers" prose doesn't map
    onto the 7 named fields mechanically (4 paragraphs exceed the 500-char cap, the
    labels don't correspond 1:1). Consequence: those 7 detail pages show ~1 KB less
    text than before. Needs an authoring pass.
  • Scope-aware behaviour isn't visible yet. Every migrated pathway has exactly one
    entry at its widest scope, so keyFeatureScope never actually narrows. The tests
    are the only place the mechanism is currently observable.
  • Fallback ranking and scope badges are Inheritance resolver engine + search integration #869 and Frontend: scoped values + scope/fallback badges #859, not this PR.

Related issues

Refs: #858, #801 · Enables: #869, #859

Testing

  • 609 unit tests pass (193 new), incl. new coverage for the two keyFeature-backed
    search facets, which previously had none — that's why the v1→v2 shape change
    broke them silently.
  • Codemod verified by dry-run then applied; npm run schema:check validates all 81
    documents including the cross-field scope checks.
  • Manually verified in the running app: 7 pathways load, all 11 key features render
    values matching the source files, both new prose fields display.

Checklist

  • PR is focused on a single concern
  • Tests pass locally and in CI
  • Docs updated for user-visible changes (src/data/README.md rewritten for v2)
  • AI-assisted portions declared — the large majority of this PR was written with
    Claude Code, reviewed commit-by-commit.

Copilot AI lite review requested due to automatic review settings August 14, 2026 13:23
Comment thread public/schema/scopeGeography.v2.html Fixed

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.

Pull request overview

This PR introduces pathway metadata schema v2 (scoped keyFeatures entries plus coreDrivers / dependencies / pathwayDescription), migrates a first slice of pathway JSON to v2, and updates validation, search, and rendering so the app can operate on v2-shaped data.

Changes:

  • Add pathwayMetadata.v2.json + v2 scope subschemas, generated TS types, and generated HTML schema docs.
  • Add cross-field validation for scoped entries (sector/geography references) and update search facets + rendering to handle scoped keyFeature values.
  • Migrate fixtures + a subset of real data files to v2, and add a codemod + tests to support migrating the remaining corpus.

Reviewed changes

Copilot reviewed 35 out of 39 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testdata/valid/pathwayMetadata_v2_minimal.json Adds a minimal v2-valid fixture for schema/validator coverage.
testdata/valid/pathwayMetadata_v2_full.json Adds a comprehensive v2 fixture exercising scoped keyFeatures and new fields.
src/utils/validateScopes.ts Implements cross-field scope reference validation for v2 (sector/geography must be declared).
src/utils/validateScopes.test.ts Unit tests for scoped entry validation behavior and error reporting.
src/utils/validateData.test.tsx Extends validation tests to cover v2 routing/coexistence and v2 required fields.
src/utils/searchUtils.ts Updates facet option building and filtering to support scoped keyFeature entries.
src/utils/searchUtils.scopedFacets.test.ts Adds targeted test coverage for scoped facets (emissionsTrajectory, policyAmbition).
src/utils/keyFeatureScope.ts Adds helpers for reading scoped keyFeature entries (containment + widest-value fallback).
src/utils/keyFeatureScope.test.ts Unit tests for scope containment, ISO resolution, and widest-value selection.
src/types/pathwayMetadata.v2.d.ts Adds generated TS types for the v2 schema.
src/types/index.ts Switches PathwayMetadataType to v2 and exports both v1/v2 types during migration.
src/types/common/scopeSector.v2.d.ts Adds generated TS type for the v2 sector scope sentinel enum.
src/types/common/scopeGeography.v2.d.ts Adds generated TS type for v2 geography scope (open string).
src/schema/pathwayMetadata.v2.test.ts Adds schema self-guard tests to prevent keyFeatures wrapper/value drift.
src/schema/pathwayMetadata.v2.json Introduces the v2 pathway metadata JSON Schema definition.
src/schema/common/scopeSector.v2.json Adds schema for the v2 sector scope axis (sector names + cross-sector).
src/schema/common/scopeGeography.v2.json Adds schema for the v2 geography scope axis (open string with basic guards).
src/schema/common/index.ts Registers new v2 common schemas so AJV can resolve $refs.
src/pages/PathwaySearch.test.tsx Updates integration test fixtures to use scoped v2 keyFeatures.
src/pages/PathwayDetailPage.tsx Renders v2 pathwayDescription / transitionAssessment in place of v1 expertOverview.
src/pages/ComparisonPage.test.tsx Updates comparison page test fixtures to use scoped v2 keyFeatures.
src/data/README.md Updates contributor docs for v2 format, migration approach, and validation commands.
src/data/pathwayMetadata.ts Switches loader to v2 schema and warns when v1 metadata files are skipped.
src/data/iea/IEA-STEPS-2024.json Migrates this pathway metadata file to v2 structure.
src/data/iea/IEA-NZE-2024.json Migrates this pathway metadata file to v2 structure.
src/data/iea/IEA-APS-2024.json Migrates this pathway metadata file to v2 structure.
src/data/asean-centre-for-energy/ACE-RAS-2024.json Migrates this pathway metadata file to v2 structure.
src/data/asean-centre-for-energy/ACE-CNS-2024.json Migrates this pathway metadata file to v2 structure.
src/data/asean-centre-for-energy/ACE-BAS-2024.json Migrates this pathway metadata file to v2 structure.
src/data/asean-centre-for-energy/ACE-ATS-2024.json Migrates this pathway metadata file to v2 structure.
src/components/KeyFeatures.tsx Updates rendering to read v2 scoped entries via a “widest value” helper.
src/components/KeyFeatures.test.tsx Updates keyFeatures rendering tests to use v2 scoped-entry fixtures.
scripts/schema-check-files.ts Adds a second-pass v2 scope reference check after AJV validation.
scripts/codemod-v1-to-v2.ts Adds a codemod to migrate v1 metadata docs to v2 format.
scripts/codemod-v1-to-v2.test.ts Adds tests for the codemod’s section splitting and scope selection logic.
public/schema/scopeSector.v2.html Adds generated HTML documentation for scopeSector.v2.json.
public/schema/scopeGeography.v2.html Adds generated HTML documentation for scopeGeography.v2.json.
PLAN.md Adds an implementation/migration plan and rationale for v2 schema + rollout.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/schema/common/scopeGeography.v2.json Outdated
Comment thread src/utils/validateScopes.ts
Copilot AI review requested due to automatic review settings August 19, 2026 11:14
@github-actions

github-actions Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

Expected version change and release notes:

1.17.0-dev.9 (v1.17.0-dev.8...feat/metadata-v2-schema ) (2026-10-05T13:50 UTC)

Features

Fixes

  • availability: tolerate a sector with no timeseries metrics (9436cc7), closes #858 #898
  • data: only warn about un-migrated files on the dev server (144dbd1), closes #858
  • schema: allow three-letter region labels as scope tokens (028622d), closes #898
  • scope: a stale geography token matches nothing, Global included (e274196), closes #898
  • search: match keyFeature geography scopes by overlap, not containment (34e975a), closes #783 #869
  • taxonomy: give Power the two technologies the cookbook added (2fa3d4c), closes #858 #935 #858
  • validate: check every sector's segments, and keep No information alone (94550e3), closes #858 #898 #898 #858

Docs

  • data: document the v2 schema changes for authors (b7a7c4c)
  • data: document v2 authoring format; test v2 required fields (4c8f8a6), closes #858 pre-#783 #858

Refactors

Other

  • codemod: read coreDriversProse from the local it was destructured into (085a9db), closes #898
  • generate types (d9a12be)
  • generated files (5c022a5)

Comment thread public/schema/scopeGeography.v2.html Fixed
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

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.

Pull request overview

Copilot reviewed 35 out of 39 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/schema/pathwayMetadata.v2.json:37

  • Schema description has a duplicated word: "Type of the pathway pathway." This will propagate into generated TypeScript types and the HTML schema docs on the next regen, so it’s worth correcting in the source schema.
    "pathwayType": {
      "description": "Type of the pathway pathway.",
      "type": "string",
      "enum": ["Normative", "Exploratory", "Predictive"]

src/schema/pathwayMetadata.v2.json:340

  • The policyAmbition field description is missing punctuation/wording between “ones” and “Scoped”, reading “… beyond currently legislated ones Scoped: …”. This is grammatically incorrect and will flow into generated types/docs.
        "policyAmbition": {
          "description": "Represents the overall stringency and intent of modeled policies relative to climate targets, often reflecting if and how far the included policies go beyond currently legislated ones Scoped: see keyFeatures.",
          "type": "array",

Copilot AI review requested due to automatic review settings August 19, 2026 11:50
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

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.

Pull request overview

Copilot reviewed 34 out of 38 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/utils/validateScopes.ts:55

  • cross-region is treated as an always-allowed geography sentinel here (new Set([GLOBAL_SCOPE, CROSS_REGION])). But per the scopeGeography.v2 schema comment, cross-region is reserved for non-global multi-region aggregates. Allowing it unconditionally means a v2 doc can pass validateScopedEntries with geography: "cross-region" even when the pathway is global: true or has no declared ISO coverage; in that case the app-side resolver (keyFeatureScope.entryISOSet) resolves it to the pathway’s ISO coverage (often empty for global-only pathways) and the entry matches nothing.

Consider only allowing cross-region when the pathway is not global and declares more than one region/country (i.e. when it can actually represent a meaningful aggregate scope).

Copilot AI review requested due to automatic review settings August 19, 2026 12:07
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

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.

Pull request overview

Copilot reviewed 34 out of 38 changed files in this pull request and generated no new comments.

@AlexAxthelm
AlexAxthelm marked this pull request as ready for review August 19, 2026 15:37

@jacobvjk jacobvjk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One required change, the new Pathway Description sometimes uses to many fields from the old v1 schema. Then a number of questions and comments.

Comment thread src/data/asean-centre-for-energy/ACE-ATS-2024.json Outdated
Comment thread src/data/asean-centre-for-energy/ACE-ATS-2024.json
Comment thread src/data/iea/IEA-STEPS-2024.json Outdated
Comment thread src/data/README.md Outdated
Comment thread src/data/README.md Outdated
Comment thread src/schema/pathwayMetadata.v2.json Outdated
Comment thread src/schema/pathwayMetadata.v2.json
Comment thread src/schema/pathwayMetadata.v2.json
Comment thread src/types/pathwayMetadata.v2.d.ts
Comment thread src/types/pathwayMetadata.v2.d.ts Outdated
Copilot AI review requested due to automatic review settings August 24, 2026 15:32
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

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.

Pull request overview

Copilot reviewed 34 out of 38 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/utils/searchUtils.scopedFacets.test.ts:41

  • This test fixture uses scoped entries with geography: "Global", but the v2 cross-field validator (validateScopedEntries) only allows "Global" when the pathway sets geography.global: true. Marking the fixture as global keeps tests aligned with the v2 authoring/validation rules.

Comment thread src/utils/keyFeatureScope.ts
AlexAxthelm pushed a commit that referenced this pull request Aug 24, 2026
Selecting Sector=None alongside emissionsTrajectory or policyAmbition returned
no pathways, even when a matching pathway existed. A pathway with no sectors
holding "Significant decrease" at cross-sector/Global matched Sector=None on its
own, but adding the keyFeature facet dropped it.

The ABSENT/"None" token was reaching entriesInScope as though it were a scope.
geographyScopeContains already ignored it, but sectorScopeContains compared it as
a sector name, so no entry could ever match and valuesInScope came back empty —
making the pathway look as if it held no values at any scope.

The underlying mistake was treating the None bucket as a scope at all. It is a
predicate about the pathway ("has no sectors" / "has no geography"), so it must
not constrain which scope a value is read from. Fixed by stripping the token from
both axes in entriesInScope rather than patching only the sector helper, so the
two cannot disagree again; the guard inside geographyScopeContains stays for
direct callers and is commented as such.

No user-visible impact today: all seven currently-loaded pathways declare
sectors, so nothing in the corpus could reach the broken path. It would have
surfaced as soon as a sector-less pathway landed.

Tests assert the symmetry rather than just the reported case, since the
asymmetry is what caused the bug: the token is ignored on the sector axis, on
the geography axis, and on both together; concrete tokens still narrow when
combined with None, so the axis is not merely switched off; and the end-to-end
filterPathways case is pinned, including that a value the pathway does not hold
still correctly matches nothing.

Reported by Copilot on PR #898.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 24, 2026 15:56
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

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.

Pull request overview

Copilot reviewed 34 out of 38 changed files in this pull request and generated no new comments.

Suppressed comments (8)

Previously missed (4) — in code that hasn't changed since the last review.

src/schema/pathwayMetadata.v2.json:35

  • Schema description has a duplicated word ("pathway pathway"), which will also propagate into generated type docs. Consider fixing the wording to avoid confusing schema readers.
      "description": "Type of the pathway pathway.",

src/schema/pathwayMetadata.v2.json:91

  • Grammar in this schema description is off ("so merging them read" -> "so merging them reads"), and the text is used in generated docs/types. Fixing it here keeps downstream docs clean.
      "description": "Narrative description of the pathway. Replaces v1's expertOverview: in the v1 corpus this is the '#### Pathway Description' section of it. v1's separate pathwayOverview field is retired without replacement, not merged in here -- the two texts restate each other, so merging them read as immediate self-repetition. null means no description is available.",

src/pages/PathwaySearch.test.tsx:71

  • This test fixture uses an emissionsTrajectory value ("foo") that is not one of the schema's allowed enum values. Using a real enum value keeps fixtures representative and avoids hiding issues in code that relies on known keyFeature values.

This issue also appears in the following locations of the same file:

  • line 85
  • line 113
  • line 128
        emissionsTrajectory: [
          { sector: "cross-sector", geography: "DE", value: "foo" },
        ],

src/pages/ComparisonPage.test.tsx:31

  • This test fixture uses an emissionsTrajectory value ("foo") that is not one of the schema's allowed enum values. Using a real enum value keeps fixtures representative and avoids hiding issues in code that relies on known keyFeature values.

This issue also appears on line 48 of the same file.

    keyFeatures: {
      emissionsTrajectory: [
        { sector: "cross-sector", geography: "Global", value: "foo" },
      ],
    },

src/pages/PathwaySearch.test.tsx:131

  • This test fixture uses an emissionsTrajectory value ("bar") that is not one of the schema's allowed enum values. Using a real enum value keeps fixtures representative and avoids hiding issues in code that relies on known keyFeature values.
      keyFeatures: {
        emissionsTrajectory: [
          { sector: "cross-sector", geography: "DE", value: "bar" },
        ],

src/pages/ComparisonPage.test.tsx:52

  • This test fixture uses an emissionsTrajectory value ("bar") that is not one of the schema's allowed enum values. Using a real enum value keeps fixtures representative and avoids hiding issues in code that relies on known keyFeature values.
    keyFeatures: {
      emissionsTrajectory: [
        { sector: "cross-sector", geography: "DE", value: "bar" },
      ],
    },

src/pages/PathwaySearch.test.tsx:88

  • This test fixture uses an emissionsTrajectory value ("foo") that is not one of the schema's allowed enum values. Using a real enum value keeps fixtures representative and avoids hiding issues in code that relies on known keyFeature values.
      keyFeatures: {
        emissionsTrajectory: [
          { sector: "cross-sector", geography: "DE", value: "foo" },
        ],

src/pages/PathwaySearch.test.tsx:116

  • This test fixture uses an emissionsTrajectory value ("bar") that is not one of the schema's allowed enum values. Using a real enum value keeps fixtures representative and avoids hiding issues in code that relies on known keyFeature values.
      keyFeatures: {
        emissionsTrajectory: [
          { sector: "cross-sector", geography: "JP", value: "bar" },
        ],

Copilot AI review requested due to automatic review settings August 24, 2026 16:37
jacobvjk added a commit that referenced this pull request Oct 2, 2026
metricDisplayNames indexed `sectorDef.metrics[metricKey]` unguarded. That was
safe while every SECTORS_BY_KEY entry carried `metrics`; the #858 pass made the
axis optional and added Steel and Aviation without it, for their
data-availability vocabularies. Before, an unknown sector key hit
`if (!sectorDef) continue`; now it resolves, and the next line throws.

Latent -- all 16 timeseries files are Power-only -- but it would have broken the
detail page the day a Steel series landed. The test reproduces the TypeError
without the guard.

`tsc` reported it (TS18048). Nothing in CI runs `tsc`, which is how it got
through.

Refs #898

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jacobvjk added a commit that referenced this pull request Oct 2, 2026
geographyScopeOverlaps documents that an unrecognised token "matches nothing
rather than everything", but its Global-entry shortcut ran first and answered
one anyway. An unknown token resolves to an empty ISO set; that is now checked
before the shortcut. No visible effect today -- the pathway-level geography
facet excludes such a pathway before keyFeature matching runs -- but the
function now does what its comment says. The existing test of this case only
tried a non-Global entry.

Also makes a PathwaySearch fixture consistent: a pathway declaring no geography
named `DE` in a keyFeature entry, a state validateScopedEntries would reject.
It now carries `across regions`, the only token such an entry could name.

Both from the Copilot review on #898.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 2, 2026 14:19
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

jacobvjk added a commit that referenced this pull request Oct 2, 2026
…red into

It was destructured and then read off `result` again two lines later, which
code scanning flagged as an unused variable on #898.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 2, 2026 15:19
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

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.

Copilot review overview

🟡 Changes recommended

The geography schema rejects valid three-letter author-defined region labels before cross-field validation.

Review effort: Lite
Findings: 2 High severity

Open (2)

Comment thread src/schema/common/scopeGeography.v2.json Outdated
jacobvjk added a commit that referenced this pull request Oct 2, 2026
scopeGeography.v2 rejected every three-letter token with a `not` clause, while
geography.v1 accepts any non-blank region key. So a pathway could declare a
region called `SSA` and then never scope a key feature or an availability row
to it -- AJV refused the token before the cross-field check ran, with the
unhelpful message "must NOT be valid".

The cookbook keeps a multi-country region's label exactly as the publication
writes it, and model regions are often three letters: REMIND, which NGFS
publishes from, uses SSA, LAM, EUR, MEA and others. Nothing in the current data
or the workbook uses one yet, so the first such import would have failed on
legitimate data.

The clause also guarded nothing. Its plausible purpose -- keeping an ISO
alpha-3 code like `THA` out where `TH` belongs -- is already served by
validateScopedEntries, which allows only declared region labels, their alpha-2
members, declared countries, `Global` and `across regions`. A test pins that
an undeclared `THA` is still rejected there.

From the Copilot review on #898.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 2, 2026 16:14
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

@jacobvjk
jacobvjk self-requested a review October 2, 2026 16:20

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.

Copilot review overview

🟡 Changes recommended

One or more issues must be addressed before approval.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (2)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Allow Global scope for narrower pathway coverage

src/​utils/​validateScopes.ts:150

This only permits Global as a key-feature/data-availability scope when geography.global is true. However, Global is the widest value sentinel, and the inheritance contract explicitly allows a pathway with narrower coverage to resolve a Global-scoped value; coverage filtering separately prevents a global-only pathway from matching a sub-global query. As written, a valid regional/country pathway with a Global value is rejected by schema:check, preventing that fallback case. Add Global to the allowed scope tokens independently of the pathway's coverage flag.

Comment thread src/data/pathwayMetadata.ts
@jacobvjk

jacobvjk commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

@AlexAxthelm I updated the schema so it is in sync with the cookbook. It also now covers all pathway level components and variables, including data availability

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-glacier-0f640931e-898.westus2.2.azurestaticapps.net

@AlexAxthelm
AlexAxthelm changed the base branch from main to epic/v2 October 5, 2026 13:56
@AlexAxthelm
AlexAxthelm merged commit 39c7967 into epic/v2 Oct 5, 2026
11 checks passed
@AlexAxthelm
AlexAxthelm deleted the feat/metadata-v2-schema branch October 5, 2026 14:28
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.

3 participants