-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): revive the pipeline — Deno purge blanked the base image; move to Bun #107
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: main
Are you sure you want to change the base?
Changes from all commits
ed6ddb2
8e84461
84e415b
a2ced75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,15 +8,16 @@ stages: | |
| - deploy | ||
|
|
||
| variables: | ||
| DENO_VERSION: "1.40.0" | ||
| BUN_VERSION: "1" | ||
| RUST_VERSION: "1.75.0" | ||
| NODE_VERSION: "20" | ||
|
|
||
| # Templates | ||
| .-base: | ||
| image: denoland/:${DENO_VERSION} | ||
| .bun-base: | ||
| image: oven/bun:${BUN_VERSION} | ||
| before_script: | ||
| - --version | ||
| - bun --version | ||
| - bun install --frozen-lockfile | ||
|
|
||
| .rust-base: | ||
| image: rust:${RUST_VERSION} | ||
|
|
@@ -26,12 +27,12 @@ variables: | |
| - rustup target add wasm32-unknown-unknown | ||
|
|
||
| # Lint Stage | ||
| lint:: | ||
| extends: .-base | ||
| lint:js: | ||
| extends: .bun-base | ||
| stage: lint | ||
| script: | ||
| - lint | ||
| - fmt --check | ||
| - bunx eslint . | ||
| - bunx prettier --check . | ||
|
Comment on lines
+34
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- relevant files ---'
git ls-files .gitlab-ci.yml package.json bun.lock bun.lockb package-lock.json yarn.lock pnpm-lock.yaml
printf '%s\n' '--- CI lint commands ---'
cat -n .gitlab-ci.yml | sed -n '25,42p'
printf '%s\n' '--- package manifest ---'
cat -n package.json
printf '%s\n' '--- lockfile tool entries ---'
if [ -f bun.lock ]; then
rg -n '"(eslint|prettier|`@typescript-eslint`|eslint-config|eslint-plugin|prettier-plugin)[^"]*"' bun.lock | head -80 || true
fi
if [ -f bun.lockb ]; then
printf '%s\n' 'bun.lockb exists'
fiRepository: hyperpolymath/ubicity Length of output: 924 🌐 Web query:
💡 Result: The bunx command is a built-in alias for bun x and is automatically installed when you install Bun; there is no separate package to install for bunx [1][2][3]. When you execute a command using bunx, it follows this resolution logic: 1. Local Check: bunx first searches for the package in your project's local node_modules/.bin directory [1][4][3]. 2. Auto-install Fallback: If the package is not found locally, bunx automatically downloads the latest version of the specified package from the npm registry [1][5]. 3. Caching: Once downloaded, the package is stored in Bun's global cache, ensuring that subsequent executions are significantly faster [1][3][6]. If you need to specify a package when the binary name differs from the package name, or if you wish to force the use of a specific version or package rather than relying on the default resolution, you can use the --package (or -p) flag [1][3][7]. For example: bunx -p This approach allows you to explicitly control the package resolution while benefiting from bunx's automatic caching and fast execution [3][7]. Citations:
Declare and lock the lint toolchain.
🤖 Prompt for AI Agents |
||
| allow_failure: false | ||
|
|
||
| lint:rust: | ||
|
|
@@ -44,16 +45,16 @@ lint:rust: | |
| allow_failure: false | ||
|
|
||
| # Build Stage | ||
| build:: | ||
| image: node:${NODE_VERSION} | ||
| build:js: | ||
| extends: .bun-base | ||
| stage: build | ||
| before_script: | ||
| - npm install -g | ||
| script: | ||
| - build | ||
| - mkdir -p bin | ||
| - bun build --compile --outfile ./bin/ubicity src/cli.js | ||
| - bun build --compile --outfile ./bin/ubicity-capture src/capture.js | ||
| artifacts: | ||
| paths: | ||
| - src-/**/*.res.js | ||
| - bin/ | ||
| expire_in: 1 hour | ||
|
|
||
| build:wasm: | ||
|
|
@@ -74,29 +75,29 @@ build:wasm: | |
|
|
||
| # Test Stage | ||
| test:unit: | ||
| extends: .-base | ||
| extends: .bun-base | ||
| stage: test | ||
| dependencies: | ||
| - build: | ||
| - build:js | ||
| - build:wasm | ||
| script: | ||
| - test --allow-read --allow-write tests/ | ||
| - bun test --coverage tests/ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift Do not make this required test gate until it passes. The current Bun command has 10 failing tests, so this job will fail unless those failures are explicitly allowed; it also omits the 📍 Affects 1 file
🤖 Prompt for AI Agents |
||
| coverage: '/\d+\.\d+% coverage/' | ||
|
|
||
| test:integration: | ||
| extends: .-base | ||
| extends: .bun-base | ||
| stage: test | ||
| dependencies: | ||
| - build: | ||
| - build:js | ||
| - build:wasm | ||
| script: | ||
| - run --allow-read --allow-write src/cli.ts stats | ||
| - run --allow-read --allow-write src/cli.ts help | ||
| - bun run src/cli.js stats | ||
| - bun run src/cli.js help | ||
| allow_failure: false | ||
|
|
||
| # Verify Stage (RSR Compliance) | ||
| verify:rsr-compliance: | ||
| extends: .-base | ||
| extends: .bun-base | ||
| stage: verify | ||
| script: | ||
| - | | ||
|
|
@@ -127,15 +128,14 @@ verify:rsr-compliance: | |
| # Check type safety | ||
| echo "Checking type safety..." | ||
| test -f wasm/Cargo.toml && echo "✅ Rust WASM present" || (echo "❌ WASM missing" && exit 1) | ||
| test -f src-/UbiCity.res && echo "✅ present" || (echo "❌ missing" && exit 1) | ||
|
|
||
| echo "" | ||
| echo "✅ RSR Compliance: PASSED" | ||
| echo "Tier: Bronze (minimum requirements met)" | ||
| allow_failure: false | ||
|
|
||
| verify:offline-first: | ||
| extends: .-base | ||
| extends: .bun-base | ||
| stage: verify | ||
| script: | ||
| - | | ||
|
|
@@ -152,7 +152,7 @@ verify:offline-first: | |
| echo "✅ Offline-First: VERIFIED" | ||
|
|
||
| verify:security: | ||
| extends: .-base | ||
| extends: .bun-base | ||
| stage: verify | ||
| script: | ||
| - | | ||
|
|
@@ -178,12 +178,12 @@ verify:security: | |
|
|
||
| # Deploy Stage (for releases) | ||
| deploy:pages: | ||
| extends: .-base | ||
| extends: .bun-base | ||
| stage: deploy | ||
| only: | ||
| - tags | ||
| script: | ||
| - run --allow-read --allow-write src/visualize.ts | ||
| - bun run src/visualize.js | ||
|
Comment on lines
+181
to
+186
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- CI relevant sections ---'
sed -n '150,215p' .gitlab-ci.yml
printf '%s\n' '--- candidate visualisation files ---'
fd -i 'visual|map|ubicity' . --type f | head -80
printf '%s\n' '--- quickVisualize references ---'
rg -n -C 4 'quickVisualize|ubicity-map\.html|artifacts:|pages' --glob '!node_modules/**' --glob '!dist/**' .Repository: hyperpolymath/ubicity Length of output: 9759 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- src/visualize.js outline ---'
ast-grep outline src/visualize.js
printf '%s\n' '--- src/visualize.js ---'
cat -n src/visualize.js
printf '%s\n' '--- src/index.js relevant section ---'
sed -n '1,105p' src/index.js
printf '%s\n' '--- storage constructor and visualisation methods ---'
sed -n '1,125p' src/storage.jsRepository: hyperpolymath/ubicity Length of output: 25821 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- UrbanKnowledgeMapper constructor and storage wiring ---'
ast-grep run --pattern 'class UrbanKnowledgeMapper { $$$ }' --lang javascript src/mapper.js --debug-query=pattern 2>/dev/null || true
rg -n -C 8 'class UrbanKnowledgeMapper|constructor\(|new ExperienceStorage|storageDir' src/mapper.jsRepository: hyperpolymath/ubicity Length of output: 15301 🌐 Web query:
💡 Result: In Bun, the behavior regarding unhandled promise rejections—including those occurring within asynchronous functions or IIFEs—has evolved to prioritize reliability and standard-compliant exit codes [1][2]. Core Behavior and Exit Codes When a promise rejection remains unhandled at the end of the application's lifecycle, Bun reports the error and typically sets the process exit code to 1 [1]. This behavior ensures that scripts do not exit silently with a success code (0) when an error has occurred [1]. Unhandled Rejections in Async IIFEs Historically, there were scenarios where unhandled rejections inside async IIFEs or functions would not propagate correctly, leading to silent failures [3][1]. Recent updates have addressed these issues, ensuring that unhandled rejections are properly tracked and reported [1][4]. If you encounter a situation where an async IIFE appears to fail silently, ensure you are using an up-to-date version of Bun, as improvements to promise/async handling for IIFEs have been implemented to fix these edge cases [4]. Process Handling and Configuration - Process Listeners: You can hook into unhandled rejections using Citations:
🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- CI base definition and runtime pins ---'
sed -n '1,45p' .gitlab-ci.yml
printf '%s\n' '--- package/runtime metadata ---'
fd -H -i 'package.json|bun.lock|bun.lockb|Dockerfile|.*bun.*' . --type f | head -60
for f in package.json bun.lock bun.lockb Dockerfile; do
if [ -f "$f" ]; then
printf '%s\n' "--- $f ---"
sed -n '1,80p' "$f"
fi
doneRepository: hyperpolymath/ubicity Length of output: 4983 🌐 Web query:
💡 Result: In Bun, the default behavior for an unhandled promise rejection in a standard script execution is to print a source-code preview, error message, and stack trace to the console, but it does not automatically exit the process with a non-zero code [1][2]. However, the behavior differs in specific contexts: 1. Bun Test Runner: When running tests with Citations:
Set an explicit non-zero exit status for visualisation failures.
🤖 Prompt for AI Agents |
||
| - mkdir -p public | ||
| - cp ubicity-data/ubicity-map.html public/index.html | ||
| artifacts: | ||
|
|
@@ -195,16 +195,16 @@ deploy:pages: | |
|
|
||
| # Release compilation (for tags) | ||
| compile:release: | ||
| extends: .-base | ||
| extends: .bun-base | ||
| stage: deploy | ||
| only: | ||
| - tags | ||
| dependencies: | ||
| - build: | ||
| - build:js | ||
| - build:wasm | ||
| script: | ||
| - compile --allow-read --allow-write --output ./bin/ubicity src/cli.ts | ||
| - compile --allow-read --allow-write --output ./bin/ubicity-capture src/capture.ts | ||
| - bun build --compile --outfile ./bin/ubicity src/cli.js | ||
| - bun build --compile --outfile ./bin/ubicity-capture src/capture.js | ||
| - ls -lh ./bin/ | ||
| artifacts: | ||
| paths: | ||
|
|
@@ -213,15 +213,15 @@ compile:release: | |
|
|
||
| # Nightly builds | ||
| nightly: | ||
| extends: .-base | ||
| extends: .bun-base | ||
| stage: build | ||
| only: | ||
| - schedules | ||
| dependencies: | ||
| - build: | ||
| - build:js | ||
| - build:wasm | ||
| script: | ||
| - compile --allow-read --allow-write --output ./bin/ubicity-nightly src/cli.ts | ||
| - bun build --compile --outfile ./bin/ubicity-nightly src/cli.js | ||
| artifacts: | ||
| paths: | ||
| - bin/ | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "name": "ubicity", | ||
| "private": true, | ||
| "type": "module", | ||
| "dependencies": { | ||
| "glob": "^11.0.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ LOW RISK Suggestion: Bun features a native Glob implementation. Consider removing the external 'glob' dependency and using |
||
| "zod": "^3.23.8" | ||
| } | ||
| } | ||
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.
🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/ubicity
Length of output: 1177
Pin the Bun image to the verified patch release.
BUN_VERSION: "1"producesoven/bun:1, which does not identify the tested Bun patch release. Set it to1.3.14or another explicitly verified patch release.🤖 Prompt for AI Agents