Skip to content

feat(deploy/atomicassets): aa-feed service + persistence:full (Phase 2 Slice C)#11

Merged
igorls merged 3 commits into
mainfrom
feat/aa-phase2-deploy
Jun 7, 2026
Merged

feat(deploy/atomicassets): aa-feed service + persistence:full (Phase 2 Slice C)#11
igorls merged 3 commits into
mainfrom
feat/aa-phase2-deploy

Conversation

@igorls
Copy link
Copy Markdown
Member

@igorls igorls commented Jun 7, 2026

Phase 2, Slice C (deploy half) — make the live feed a managed service + durable. Pairs with https://github.com/igorls/wormdb/pull/21 (Dockerfile.feed + start clamp).

  • wormdb.json: store.persistence nonefull — the overlay (forward overrides + add-sets + the feed checkpoint) is WAL-backed and survives a wormdb-aa restart.
  • compose: a named volume aa-wormdb-data at /var/lib/wormdb for that WAL/snapshot; a curl healthcheck on wormdb-aa; the aa-feed service (profile feed/all) that builds the bun feed, waits for wormdb-aa healthy, and EXECs into wormdb-aa:6389 from the Jungle 4 SHiP (host.docker.internal:28080).

Run the live stack: docker compose --profile all up. FEED_START defaults to the snapshot block; the feed clamps to the node's SHiP range if it starts later (backfill gap → Phase 3).

Validated live on Jungle 4: aa-feed tracks LIB (0 behind); restarting wormdb-aa replays the WAL (40974 records) and the feed resumes from the persisted checkpoint — snapshot→live continuity holds across restarts.

Caveat surfaced during validation: this node's SHiP retention starts well after the snapshot block 269541093, so a from-snapshot replay isn't possible on it today — the gap is the Phase-3 (off-disk archive) backfill's job.

…2 Slice C)

- wormdb.json: store.persistence none -> full, so the live overlay (the SHiP feed's
  forward overrides + add-sets + checkpoint) is WAL-backed and survives a wormdb-aa
  restart instead of being lost.
- docker-compose: mount a named volume (aa-wormdb-data) at /var/lib/wormdb for that
  WAL/snapshot; add a curl healthcheck on wormdb-aa; add the `aa-feed` service
  (profile "feed"/"all") that builds the bun feed (../../../../wormdb/apps/bun
  Dockerfile.feed), waits for wormdb-aa healthy, and EXECs into wormdb-aa:6389 from a
  nodeos SHiP (host.docker.internal:28080) with a per-block checkpoint.

Run the live stack with `docker compose --profile all up` (state + feed). FEED_START
defaults to the snapshot block; on a node whose SHiP retention starts later the feed
clamps to the available range (a backfill gap the H-tier covers in Phase 3).

Validated live on Jungle 4: aa-feed tracks LIB (0 behind); restarting wormdb-aa
replays the WAL (40974 records) and the feed resumes from the persisted checkpoint.
Copilot AI review requested due to automatic review settings June 7, 2026 08:34
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Atomic Assets deployment configuration to enable full persistence for wormdb and introduces a new aa-feed service along with a healthcheck for wormdb-aa. Feedback on these changes highlights a potential path error in the build context for aa-feed, suggests using 127.0.0.1 instead of localhost in the healthcheck to prevent IPv6 resolution issues, and warns about security risks associated with leaving authentication disabled in non-development environments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread deploy/atomicassets/docker-compose.yml Outdated
# from the wormdb bun app; EXECs aa_mint/aa_transfer/aa_burn over WormWire into wormdb-aa:6389.
aa-feed:
build:
context: ../../../../wormdb/apps/bun
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The relative path ../../../../wormdb/apps/bun goes 4 levels up from deploy/atomicassets/docker-compose.yml, which points to the grandparent directory of the repository root. If wormdb is cloned as a sibling to this repository, the correct path to the sibling directory should be 3 levels up: ../../../wormdb/apps/bun.

      context: ../../../wormdb/apps/bun

Comment thread deploy/atomicassets/docker-compose.yml Outdated
profiles: ["state", "all"]
healthcheck:
# the bun feed (aa-feed) waits on this; the wormdb image ships curl, so probe the HTTP gateway.
test: ["CMD-SHELL", "curl -fsS http://localhost:6390/atomicassets/v1/config >/dev/null || exit 1"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using localhost in the healthcheck command can sometimes cause issues in environments where localhost resolves to the IPv6 loopback address (::1) first, while the service is only listening on IPv4 (127.0.0.1). Using 127.0.0.1 explicitly is more robust and avoids potential IPv6 resolution delays or failures.

      test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:6390/atomicassets/v1/config >/dev/null || exit 1"]

"store": { "persistence": "full" },
"server": { "port": 6389 },
"gateway": { "enabled": true, "port": 6390 },
"auth": { "require_auth": false }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

security-medium medium

Setting "require_auth": false allows any container or service on the shared Docker network (aa-stack) to connect to the WormWire port (6389) and execute privileged commands (such as aa_mint, aa_transfer, aa_burn) without authentication. While acceptable for local development and testing, ensure that authentication is enabled (require_auth: true) with strong credentials in any production or non-loopback environments.

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

Adds Phase 2 “Slice C” deploy updates for the AtomicAssets live stack by making the WormDB overlay durable (WAL-backed) and introducing a managed SHiP feed service that resumes from a persisted checkpoint across restarts.

Changes:

  • Switch WormDB store persistence from none to full to persist the overlay/checkpoint across wormdb-aa restarts.
  • Add a dedicated named volume mounted at /var/lib/wormdb to store WAL/snapshots for persistence.
  • Add a wormdb-aa healthcheck and a new aa-feed service (profiled) that waits for WormDB readiness and streams SHiP updates into WormWire.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
deploy/atomicassets/wormdb.json Enables durable persistence for the WormDB store/overlay.
deploy/atomicassets/docker-compose.yml Adds persistent storage, healthcheck gating, and an aa-feed service to keep the overlay live.

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

Comment thread deploy/atomicassets/docker-compose.yml Outdated
# from the wormdb bun app; EXECs aa_mint/aa_transfer/aa_burn over WormWire into wormdb-aa:6389.
aa-feed:
build:
context: ../../../../wormdb/apps/bun
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8186e68a2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread deploy/atomicassets/docker-compose.yml Outdated
# from the wormdb bun app; EXECs aa_mint/aa_transfer/aa_burn over WormWire into wormdb-aa:6389.
aa-feed:
build:
context: ../../../../wormdb/apps/bun
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fix the aa-feed build context traversal

In a normal Unix/WSL checkout like /workspace/hyperion-tools, Compose resolves this relative context from deploy/atomicassets, so ../../../../wormdb/apps/bun points at /wormdb/apps/bun instead of the sibling repo location /workspace/wormdb/apps/bun implied by the existing four-repo sibling layout. That makes docker compose --profile all up --build fail before the live stack can start unless a nonstandard /wormdb checkout exists; this should only walk up to the workspace parent, e.g. ../../../wormdb/apps/bun.

Useful? React with 👍 / 👎.

@igorls
Copy link
Copy Markdown
Member Author

igorls commented Jun 7, 2026

Addressed (and CI stays green):

  • Build context traversal (Gemini/Copilot/Codex P1) — fixed. The ../../../../ was correct only for my local nesting (P:\wormdb + P:\eosrio\hyperion-tools). It's now ${WORMDB_DIR:-../../../wormdb}/apps/bun — the default assumes wormdb is a sibling of this repo (the standard layout the bots assumed), overridable via WORMDB_DIR for other layouts. Documented in .env.example (+ FEED_START). docker compose config resolves it correctly and the image rebuilds.
  • Healthcheck localhost127.0.0.1 (Gemini) — done, avoids the IPv6 ::1 resolution path.
  • require_auth:false (Gemini security-medium) — this is the deliberate trusted-LOCAL posture for the proving deploy: the WormWire/HTTP ports are loopback-bound (127.0.0.1:6389/6390), the aa-stack bridge is a single-tenant local network, and the only EXEC writer is the aa-feed container we control. Auth is the config flip (require_auth:true + a token for the feed) for any non-local/multi-tenant deployment — noted in the compose comment. Not changing it for the local proving stack.

…althcheck (PR #11 review)

- aa-feed build context: the hardcoded ../../../../wormdb assumed this repo's local nesting;
  parameterize as ${WORMDB_DIR:-../../../wormdb}/apps/bun (default = wormdb as a SIBLING of
  this repo, the common layout) + document WORMDB_DIR + FEED_START in .env.example.
- wormdb-aa healthcheck: localhost -> 127.0.0.1 (avoid an IPv6 ::1 resolution that the
  IPv4-only listener wouldn't answer).
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40a1f2a629

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread deploy/atomicassets/docker-compose.yml Outdated
wormdb-aa:
condition: service_healthy
networks: [aa-stack]
profiles: ["feed", "all"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the feed profile include its dependency

When the new feed profile is enabled by itself (for example, docker compose --profile feed up to attach the live feed after the state stack already exists), Compose includes aa-feed but ignores wormdb-aa because it only has state/all profiles. Docker's profiles reference says services whose profiles do not match are ignored and that references to ignored services do not automatically enable them, so this depends_on target makes the feed profile invalid instead of starting the feed. Add a matching profile to the dependency chain or avoid exposing feed as a standalone profile.

Useful? React with 👍 / 👎.

@igorls
Copy link
Copy Markdown
Member Author

igorls commented Jun 7, 2026

Fixed — aa-feed is now in the all profile only. A standalone --profile feed would have pulled in aa-feed but ignored its depends_on target wormdb-aa (state/all), making the project invalid; adding feed to the whole chain (wormdb-aaaa-loadermongodb) would just make feedall. So I dropped the standalone profile.

Validated with compose config: --profile allaa-feed aa-loader mongodb wormdb-aa (depends_on resolves); --profile feed → empty (no error); --profile state → the stack without the feed.

Usage (documented in the compose comment): docker compose --profile all up for the live stack; docker compose --profile all up -d aa-feed to attach just the feed to a running state stack; --profile state up for the static snapshot.

…eview)

aa-feed depends_on wormdb-aa, which is in state/all. A standalone `--profile feed`
project would include aa-feed but ignore wormdb-aa (per Docker's profiles rules:
ignored services aren't auto-enabled by a depends_on reference), making the project
invalid. Adding "feed" to the whole dependency chain (wormdb-aa -> aa-loader ->
mongodb) would just make "feed" == "all". So drop the standalone "feed" profile:
aa-feed is in "all" only.

Run the live stack: `docker compose --profile all up`. Attach just the feed to a
running state stack: `docker compose --profile all up -d aa-feed` (named service →
deps resolve without restarting them). Static snapshot only: `--profile state up`.
@igorls igorls merged commit b7e5fe7 into main Jun 7, 2026
1 check passed
@igorls igorls deleted the feat/aa-phase2-deploy branch June 7, 2026 08:53
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