Skip to content

Develop#3

Merged
CodeMeAPixel merged 2 commits intomasterfrom
develop
Jan 25, 2026
Merged

Develop#3
CodeMeAPixel merged 2 commits intomasterfrom
develop

Conversation

@CodeMeAPixel
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 25, 2026 21:03
@CodeMeAPixel CodeMeAPixel merged commit 4671e5e into master Jan 25, 2026
4 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

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 adds a Go-based example service for fetching and processing FXServer artifacts from GitHub and updates the Windows txAdmin install docs to reference this new example.

Changes:

  • Introduced lib/examples/artifacts.go implementing an ArtifactsService that fetches tags/issues from GitHub, derives artifact metadata, supports filtering/sorting/pagination, and includes fallback artifact data.
  • Updated content/docs/txadmin/windows/install.mdx to embed the new Go example file instead of the previous TypeScript path when demonstrating automated artifact handling.

Reviewed changes

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

File Description
lib/examples/artifacts.go Adds a complete Go example (ArtifactsService) for discovering and serving artifact metadata from GitHub tags and issues, including caching and fallback logic.
content/docs/txadmin/windows/install.mdx Updates the “wanna see how we did it?” accordion to point to the new Go example file so the docs display a working implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/examples/artifacts.go
Comment on lines +537 to +539
s.cache[key] = &cacheEntry{
data: data,
timestamp: time.Now().UnixMilli(),
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

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

The duration parameter passed to setCache is never used, and getCache always compares against the global cacheDuration, which means entries cached with issuesCacheDuration will never actually respect the intended shorter TTL. To make the separate durations effective, either store and compare against a per-entry TTL (e.g., include duration in cacheEntry and use it in getCache) or remove the duration parameter and the issuesCacheDuration constant to avoid misleading behavior.

Suggested change
s.cache[key] = &cacheEntry{
data: data,
timestamp: time.Now().UnixMilli(),
nowMillis := time.Now().UnixMilli()
// Encode per-entry TTL into the timestamp so that getCache's
// `now - timestamp < cacheDuration` check effectively uses `duration`.
effectiveTimestamp := nowMillis
if duration > 0 && duration < cacheDuration {
effectiveTimestamp = nowMillis - (cacheDuration - duration)
}
s.cache[key] = &cacheEntry{
data: data,
timestamp: effectiveTimestamp,

Copilot uses AI. Check for mistakes.
Comment thread lib/examples/artifacts.go
Comment on lines +483 to +484
{"24574", "779c1fa38ec01b33d79a5e994b7e0c1a0bbcg421", Windows},
{"24574", "779c1fa38ec01b33d79a5e994b7e0c1a0bbcg421", Linux},
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

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

The fallback artifact entries for version 24574 use a hash value 779c1fa38ec01b33d79a5e994b7e0c1a0bbcg421 that contains a non-hex character (g), which is not a valid Git commit SHA and will generate invalid artifact URLs in the fallback data. Please correct this hash to the actual SHA (or another valid placeholder) so that the generated fallback URLs for 24574 point to real artifacts.

Suggested change
{"24574", "779c1fa38ec01b33d79a5e994b7e0c1a0bbcg421", Windows},
{"24574", "779c1fa38ec01b33d79a5e994b7e0c1a0bbcg421", Linux},
{"24574", "779c1fa38ec01b33d79a5e994b7e0c1a0bbc9421", Windows},
{"24574", "779c1fa38ec01b33d79a5e994b7e0c1a0bbc9421", Linux},

Copilot uses AI. Check for mistakes.
Comment thread lib/examples/artifacts.go
Comment on lines +105 to +107
maxRetries = 3
retryDelay = 1000 // 1 second in milliseconds
rateLimitDelay = 1000 // 1 second in milliseconds
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

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

maxRetries and retryDelay are defined in the constants block but never used anywhere in this file, which is misleading and would cause a compile error if this package were part of a Go module. Either remove these constants or implement retry logic in the GitHub fetch helpers that actually uses them.

Suggested change
maxRetries = 3
retryDelay = 1000 // 1 second in milliseconds
rateLimitDelay = 1000 // 1 second in milliseconds

Copilot uses AI. Check for mistakes.
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.

2 participants