Skip to content

feat: read devnet manifest from shared data directory#9

Open
Nic-dorman wants to merge 1 commit intomainfrom
feat/shared-manifest-location
Open

feat: read devnet manifest from shared data directory#9
Nic-dorman wants to merge 1 commit intomainfrom
feat/shared-manifest-location

Conversation

@Nic-dorman
Copy link
Copy Markdown
Contributor

Summary

  • Read devnet-manifest.json from the shared ant data directory (ant_core::config::data_dir()) instead of only the GUI-specific config directory
  • Legacy GUI config path kept as fallback for backward compatibility

This unblocks devnet/testnet launchers from writing the manifest to a shared location that any consumer (GUI, CLI, TUI) can discover, without coupling ant-core to ant-gui's filesystem layout.

Lookup order

Priority Location Example path Written by
1 Shared data dir %APPDATA%/ant/ (Win), ~/Library/Application Support/ant/ (Mac) Devnet launcher (ant-core)
2 Legacy GUI config %APPDATA%/autonomi/ant-gui/ (Win) Manual placement

First match wins. If neither exists → production mainnet mode (unchanged).

Companion change needed

On the ant-core side, the devnet launcher examples need to write the manifest to ant_core::config::data_dir() instead of the GUI config path. This is a trivial change — replace dirs::config_dir().join("autonomi/ant-gui") with ant_core::config::data_dir().

Closes the approach discussed after ant-client#29 was rejected.

Future direction

This is "Approach A" — the simplest fix. Longer-term, the daemon should be network-aware (expose EVM config via its REST API), and ant node daemon start --network sepolia should be the way to select a testnet. See discussion in that PR for approaches B and C.

Test plan

  • No manifest → production mode (unchanged)
  • Manifest in shared data dir → detected, devnet/Sepolia mode activates
  • Manifest in legacy GUI config dir only → still works (backward compat)
  • Manifest in both locations → shared data dir wins

🤖 Generated with Claude Code

Check ant_core::config::data_dir() (e.g. %APPDATA%/ant/) for
devnet-manifest.json before falling back to the GUI-specific config
directory. This lets devnet launchers write the manifest to a shared
location that any consumer (GUI, CLI, TUI) can discover, without
coupling ant-core to ant-gui's filesystem layout.

The legacy GUI config path is kept as a fallback for backward
compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit to WithAutonomi/ant-client that referenced this pull request Apr 8, 2026
Move the devnet manifest from /tmp (or GUI-specific paths) to the
shared ant data directory (ant_core::config::data_dir()). This lets
any consumer — ant-gui, ant-cli, ant-tui — discover devnet/testnet
mode by checking the same well-known location where daemon.port
already lives.

Changes:
- start-local-devnet: 25 nodes (was 5), writes manifest to shared
  data dir, 8MB thread stack for Windows, cleanup on Ctrl+C
- start-devnet-sepolia (new): 25 nodes with ArbitrumSepoliaTest EVM,
  uses existing deployed Sepolia contracts, no wallet key embedded
  (user connects their own funded wallet)

Companion PR: WithAutonomi/ant-ui#9 (ant-gui reads from this path)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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