Skip to content

Ona devcontainer and tasks/services setup - #153

Open
drzo wants to merge 1 commit into
OpenCoq:mainfrom
drzo:ona/devcontainer-setup
Open

drzo wants to merge 1 commit into
OpenCoq:mainfrom
drzo:ona/devcontainer-setup

Conversation

@drzo

@drzo drzo commented Sep 26, 2026 •

Copy link
Copy Markdown

Description

This PR configures the repository's development environment with a Dev Container and Ona tasks/services.

A Dev Container is a checked-in environment definition that describes the container image, runtimes, tools, and editor configuration needed to work in this repository. Ona tasks and services are checked-in configuration in .ona/config.yaml: tasks run repeatable one-shot workflows such as dependency installation, checks, and builds, while services run long-lived development processes such as app servers, preview servers, or databases.

This is useful to merge because it makes environment startup and common development workflows reproducible for contributors and agents, instead of relying on local machine state or undocumented setup steps.

Ona automated this setup while creating or tuning the project so future development starts faster and the repository is easier to work on in new environments.


Note

Low Risk
Changes are limited to devcontainer and Ona workflow configuration with no application or security-critical runtime logic.

Overview
Replaces the root OpenCog-oriented dev container (Python, broad port forwarding, C++/CMake editor extensions) with a minimal AtomSpace Explorer setup that only pins Node 14.21.3 on Ubuntu 24.04.

Adds .ona/config.yaml so install/build and the dev server are repeatable: explorer-install runs npm ci (skipping install scripts, then rebuilding node-sass) and is triggered after devcontainer start; explorer-build runs the Angular build after install; the explorer service exposes port 4200 via Ona and starts npm start with a public host derived from the exposed URL, waiting until dependencies are installed.

Reviewed by Cursor Bugbot for commit 7a26838. Configure here.

Co-authored-by: Codex <noreply@openai.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7a26838. Configure here.

Comment thread .ona/config.yaml
export ONA_EXPOSED_HOST="$(ona environment port get 4200 -f URL | cut -c 9-)"
cd atomspace-explorer
until test -f node_modules/.ona-installed; do sleep 2; done
exec npm start -- --host 0.0.0.0 --port 4200 --public-host "https://${ONA_EXPOSED_HOST}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Public URL fails host check

Medium Severity

ng serve is started with --public-host set to a full https:// URL and without --disable-host-check. Angular CLI 1.4.7 uses webpack-dev-server 2.7.1, which treats the first colon in public as a port separator, so the allowed host becomes https. Requests through the Ona preview URL then get Invalid Host header, while the localhost ready check still succeeds.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7a26838. Configure here.

Comment thread .ona/config.yaml
ona environment port open 4200 --admission creator_only --name "AtomSpace Explorer"
export ONA_EXPOSED_HOST="$(ona environment port get 4200 -f URL | cut -c 9-)"
cd atomspace-explorer
until test -f node_modules/.ona-installed; do sleep 2; done

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Install race on environment start

Medium Severity

The explorer service treats node_modules/.ona-installed as proof that install finished, but that file can already exist from a prebuild snapshot. On first environment start, postDevcontainerStart runs npm ci (which deletes node_modules) in parallel with postEnvironmentStart. If the service sees the stale marker first, npm start runs while dependencies are being wiped.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7a26838. Configure here.

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.

1 participant