Skip to content

feat: read devnet manifest from shared data directory - #9

Merged
Nic-dorman merged 1 commit into
mainfrom
feat/shared-manifest-location
Apr 30, 2026
Merged

feat: read devnet manifest from shared data directory#9
Nic-dorman merged 1 commit into
mainfrom
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

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>
Nic-dorman added a commit that referenced this pull request Apr 15, 2026
Notable changes since v0.5.0:
- Disable public upload option in the UI until external-signer backend
  support lands (#12)
- Bump evmlib from 0.4 to 0.8 (#11)
- Add Vitest test suite + PR CI checks (typecheck, vitest, cargo
  fmt/clippy) (#8, #9)
- Parallel CI builds with pre-built sidecar binaries (#8)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Nic-dorman Nic-dorman mentioned this pull request Apr 15, 2026
2 tasks
@Nic-dorman
Nic-dorman marked this pull request as draft April 20, 2026 08:37
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
Nic-dorman force-pushed the feat/shared-manifest-location branch from 1bad200 to a6e6436 Compare April 29, 2026 14:09
@Nic-dorman

Nic-dorman commented Apr 29, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (single commit, no conflicts, cargo check clean against pinned ant-core-v0.2.0).

Status of the asymmetry this PR closes:

  • ant-client # 31 (82d4cbe, merged 2026-04-28) shipped the writer side — start-local-devnet and start-devnet-sepolia now write devnet-manifest.json to ant_core::config::data_dir() (%APPDATA%\ant, ~/Library/Application Support/ant, ~/.local/share/ant).
  • The current pinned ant-core-v0.2.0 (0d789c8, 2026-04-27) predates that merge by ~19 hours, so today's release pair (ant-gui v0.6.7 + ant-core-v0.2.0) still works — the example writes to the old GUI-specific path that the GUI also reads from.
  • Once we bump the ant-core dep past 82d4cbe (planned to land alongside the upload/download progress-event API and the adaptive-concurrency work), the example flips to the shared path and the GUI's reader needs to know about it.

This PR adds the shared-path reader with the legacy GUI path kept as fallback, so both old and new manifests are picked up. Merging this before the ant-core bump keeps every released version working in isolation.

@Nic-dorman
Nic-dorman marked this pull request as ready for review April 29, 2026 16:35
@Nic-dorman
Nic-dorman merged commit a5de507 into main Apr 30, 2026
4 checks passed
@Nic-dorman
Nic-dorman deleted the feat/shared-manifest-location branch April 30, 2026 08:37
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