Skip to content
This repository was archived by the owner on Nov 11, 2025. It is now read-only.

Conversation

@tallesborges
Copy link
Contributor

@tallesborges tallesborges commented Oct 27, 2025

PR Type

Enhancement, Documentation


Description

  • Add Matrix canary v1030 metadata

  • Add Enjin canary v1060 metadata

  • Update latest canary pointers

  • Script reminder to update spec cases


Diagram Walkthrough

flowchart LR
  M["matrix canary v1030"] -- "export + spec case" --> MC["lib/consts/matrix/canary/canary.dart"]
  E["enjin canary v1060"] -- "export + spec case" --> EC["lib/consts/enjin/canary/canary.dart"]
  ML["matrix canary latest"] -- "v1023 -> v1030" --> MM["lib/consts/matrix/matrix.dart"]
  EL["enjin canary latest"] -- "v1050 -> v1060" --> EM["lib/consts/enjin/enjin.dart"]
  S["fetch script"] -- "add reminder echo" --> SH["scripts/fetch_metadata.sh"]
  D["docs"] -- "add AGENTS.md" --> DOC["AGENTS.md"]
Loading

File Walkthrough

Relevant files
Enhancement
6 files
enjin.dart
Point canary latest to v1060 and add spec case                     
+3/-1     
matrix.dart
Point canary latest to v1030 and add spec case                     
+3/-1     
canary.dart
Export new v1060 canary metadata                                                 
+1/-0     
canary.dart
Export new v1030 canary metadata                                                 
+1/-0     
fetch_metadata.sh
Add reminder to update spec switch cases                                 
+1/-0     
v1030.dart
Add Matrix canary metadata v1030                                                 
+2/-0     
Documentation
1 files
AGENTS.md
Add repo workflow and PR guidelines                                           
+23/-0   
Additional files
1 files
v1060.dart +2/-0     

@tallesborges tallesborges changed the title [PLA-2300] Add v1030 and v1060 metadata versions with fetch reminder [PLA-2300] Add v1030 and v1060 metadata versions Oct 27, 2025
@tallesborges tallesborges self-assigned this Oct 27, 2025
@github-actions
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Completeness

Ensure that the new canary version v1060 is actually implemented and exported in canary sources and that downstream code expecting v1060 is compatible. Verify that any associated spec or metadata consumers recognize 1060.

  return c.v1060;
}
Completeness

Verify that v1030 exists and is correctly exported; confirm all places relying on canaryLatest now correctly reference v1030 and that spec handling and consumers are updated.

  return c.v1030;
}
DX Improvement

The reminder echo is helpful, but consider making it actionable (e.g., failing if cases are missing) to prevent omissions when adding new versions.

  update_exports "$base" "$category" "$environment" "$version"

  echo "$network: v$version -> lib/consts/$category/$environment/v$version.dart"
  echo "REMINDER: Update lib/consts/$category/$category.dart to include case $version in the ${environment}Spec function"
}

@github-actions
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Auto-check missing switch case

Make the reminder actionable by automatically grepping for the case $version entry
and warning if missing. This reduces human error causing missing switch cases at
runtime.

scripts/fetch_metadata.sh [82]

 echo "REMINDER: Update lib/consts/$category/$category.dart to include case $version in the ${environment}Spec function"
+spec_file="lib/consts/$category/$category.dart"
+if ! grep -q "case $version" "$spec_file"; then
+  echo "WARNING: Missing 'case $version' in ${environment}Spec within $spec_file" >&2
+fi
Suggestion importance[1-10]: 6

__

Why: This automates a manual reminder into a concrete warning, reducing human error; it's accurate to the context and low-risk, though not critical to functionality.

Low
Possible issue
Add safe fallback return

Ensure c.v1060 is defined and non-empty to avoid returning an undefined or
placeholder constant from canaryLatest(). If v1060 isn't available at runtime, fall
back to the previous stable version.

lib/consts/enjin/enjin.dart [4-6]

 String canaryLatest() {
-  return c.v1060;
+  // Fallback to previous known stable if v1060 is unavailable/empty.
+  return (c.v1060.isNotEmpty) ? c.v1060 : c.v1050;
 }
Suggestion importance[1-10]: 3

__

Why: The fallback idea is reasonable but speculative; c.v1060 is likely a defined constant and adding .isNotEmpty assumes a String and non-empty contract not evident in the diff.

Low
Provide defensive fallback

Guard against c.v1030 being missing or empty to prevent runtime issues when
resolving the latest spec. Provide a fallback to the last known stable v1023.

lib/consts/matrix/matrix.dart [4-6]

 String canaryLatest() {
-  return c.v1030;
+  // Fallback to previous known stable if v1030 is unavailable/empty.
+  return (c.v1030.isNotEmpty) ? c.v1030 : c.v1023;
 }
Suggestion importance[1-10]: 3

__

Why: Similar to the first, it adds a defensive fallback without evidence c.v1030 could be empty; .isNotEmpty type assumption may not hold, offering limited, possibly incorrect value.

Low

@tallesborges tallesborges merged commit f8978c2 into master Oct 27, 2025
1 check passed
@tallesborges tallesborges deleted the feature/PLA-2300/upgrade-metadata branch October 27, 2025 15:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

2 participants