-
Notifications
You must be signed in to change notification settings - Fork 2
Dev #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
still need to revisit the variable name changes and such in |
|
@cubic-dev-ai review this pull request |
@gamesguru I have started the AI code review. It will take a few minutes to complete. |
1 similar comment
@gamesguru I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 issues found across 9 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="Makefile">
<violation number="1" location="Makefile:75">
P1: Interactive confirmation prompt won't work because `$(shell ...)` is evaluated during Make's parse phase, not during recipe execution. The `read` command requires an interactive terminal that isn't available at parse time, so this safety check will fail or be bypassed. This is dangerous for a destructive operation that deletes releases and tags.</violation>
</file>
<file name=".github/workflows/test.yml">
<violation number="1" location=".github/workflows/test.yml:14">
P1: Self-hosted runner with write permissions and broad branch triggers creates security risk. Consider: (1) restricting the trigger to specific branches like `main`/`master` only, (2) using GitHub-hosted runners for untrusted branches, or (3) removing write permissions and using a separate workflow for deployments.</violation>
<violation number="2" location=".github/workflows/test.yml:46">
P2: Quote the $RELEASE_TAG variable to prevent word splitting and handle empty/special values safely.</violation>
</file>
<file name="sql/latest_version.py">
<violation number="1" location="sql/latest_version.py:27">
P2: When version.csv contains only the header row, this code prints the literal string "version" instead of indicating that no version is available. Guard against the header-only case before printing.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| .PHONY: deploy/delete | ||
| deploy/delete: | ||
| [[ "$(shell read -e -p 'Really delete v${DB_VERSION}? [y/N]> '; echo $$REPLY)" == [Yy]* ]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: Interactive confirmation prompt won't work because $(shell ...) is evaluated during Make's parse phase, not during recipe execution. The read command requires an interactive terminal that isn't available at parse time, so this safety check will fail or be bypassed. This is dangerous for a destructive operation that deletes releases and tags.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Makefile, line 75:
<comment>Interactive confirmation prompt won't work because `$(shell ...)` is evaluated during Make's parse phase, not during recipe execution. The `read` command requires an interactive terminal that isn't available at parse time, so this safety check will fail or be bypassed. This is dangerous for a destructive operation that deletes releases and tags.</comment>
<file context>
@@ -0,0 +1,97 @@
+
+.PHONY: deploy/delete
+deploy/delete:
+ [[ "$(shell read -e -p 'Really delete v${DB_VERSION}? [y/N]> '; echo $$REPLY)" == [Yy]* ]]
+ gh release delete v${DB_VERSION}
+ git push origin --delete v${DB_VERSION}
</file context>
|
|
||
| jobs: | ||
| ci: | ||
| runs-on: [self-hosted, dev] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: Self-hosted runner with write permissions and broad branch triggers creates security risk. Consider: (1) restricting the trigger to specific branches like main/master only, (2) using GitHub-hosted runners for untrusted branches, or (3) removing write permissions and using a separate workflow for deployments.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/test.yml, line 14:
<comment>Self-hosted runner with write permissions and broad branch triggers creates security risk. Consider: (1) restricting the trigger to specific branches like `main`/`master` only, (2) using GitHub-hosted runners for untrusted branches, or (3) removing write permissions and using a separate workflow for deployments.</comment>
<file context>
@@ -0,0 +1,59 @@
+
+jobs:
+ ci:
+ runs-on: [self-hosted, dev]
+ steps:
+ - name: Checkout
</file context>
| gh release list -L 1 | ||
| # TODO: enhance this to be: if release_tag > current_prod_tag, deploy. | ||
| # Otherwise, can skip this step entirely? | ||
| gh release view $RELEASE_TAG || echo "PUBLISH=1" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Quote the $RELEASE_TAG variable to prevent word splitting and handle empty/special values safely.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/test.yml, line 46:
<comment>Quote the $RELEASE_TAG variable to prevent word splitting and handle empty/special values safely.</comment>
<file context>
@@ -0,0 +1,59 @@
+ gh release list -L 1
+ # TODO: enhance this to be: if release_tag > current_prod_tag, deploy.
+ # Otherwise, can skip this step entirely?
+ gh release view $RELEASE_TAG || echo "PUBLISH=1" >> "$GITHUB_OUTPUT"
+
+ # yamllint disable rule:line-length
</file context>
| gh release view $RELEASE_TAG || echo "PUBLISH=1" >> "$GITHUB_OUTPUT" | |
| gh release view "$RELEASE_TAG" || echo "PUBLISH=1" >> "$GITHUB_OUTPUT" |
| rows = list(reader) | ||
|
|
||
| # Print latest version | ||
| print(rows[-1][1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: When version.csv contains only the header row, this code prints the literal string "version" instead of indicating that no version is available. Guard against the header-only case before printing.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At sql/latest_version.py, line 27:
<comment>When version.csv contains only the header row, this code prints the literal string "version" instead of indicating that no version is available. Guard against the header-only case before printing.</comment>
<file context>
@@ -0,0 +1,36 @@
+ rows = list(reader)
+
+ # Print latest version
+ print(rows[-1][1])
+ return 0
+
</file context>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 9 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name=".github/workflows/test.yml">
<violation number="1" location=".github/workflows/test.yml:46">
P1: The release existence check is fragile. `gh release view` failing doesn't always mean the release doesn't exist—it could be a network error, auth failure, or rate limit. Consider checking the specific exit code or error message to distinguish between "release not found" and other failures.</violation>
</file>
<file name="README.rst">
<violation number="1" location="README.rst:1">
P2: The overline/underline around the document title use 13 asterisks while the title text is 12 characters, violating reStructuredText’s requirement that section adornments match the title length and causing Docutils warnings.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| gh release list -L 1 | ||
| # TODO: enhance this to be: if release_tag > current_prod_tag, deploy. | ||
| # Otherwise, can skip this step entirely? | ||
| gh release view $RELEASE_TAG || echo "PUBLISH=1" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: The release existence check is fragile. gh release view failing doesn't always mean the release doesn't exist—it could be a network error, auth failure, or rate limit. Consider checking the specific exit code or error message to distinguish between "release not found" and other failures.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/test.yml, line 46:
<comment>The release existence check is fragile. `gh release view` failing doesn't always mean the release doesn't exist—it could be a network error, auth failure, or rate limit. Consider checking the specific exit code or error message to distinguish between "release not found" and other failures.</comment>
<file context>
@@ -0,0 +1,59 @@
+ gh release list -L 1
+ # TODO: enhance this to be: if release_tag > current_prod_tag, deploy.
+ # Otherwise, can skip this step entirely?
+ gh release view $RELEASE_TAG || echo "PUBLISH=1" >> "$GITHUB_OUTPUT"
+
+ # yamllint disable rule:line-length
</file context>
| ************* | ||
| usda-sqlite | ||
| *********** | ||
| ************* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The overline/underline around the document title use 13 asterisks while the title text is 12 characters, violating reStructuredText’s requirement that section adornments match the title length and causing Docutils warnings.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.rst, line 1:
<comment>The overline/underline around the document title use 13 asterisks while the title text is 12 characters, violating reStructuredText’s requirement that section adornments match the title length and causing Docutils warnings.</comment>
<file context>
@@ -1,9 +1,9 @@
-***********
+*************
usda-sqlite
-***********
</file context>
| ************* | |
| usda-sqlite | |
| *********** | |
| ************* | |
| *********** | |
| usda-sqlite | |
| *********** |
No description provided.