Skip to content

feat: onboard config persistence and csghub manager robustness#12

Merged
RussellLuo merged 21 commits intoOpenCSGs:mainfrom
GatewayJ:0422
Apr 25, 2026
Merged

feat: onboard config persistence and csghub manager robustness#12
RussellLuo merged 21 commits intoOpenCSGs:mainfrom
GatewayJ:0422

Conversation

@GatewayJ
Copy link
Copy Markdown
Contributor

@GatewayJ GatewayJ commented Apr 23, 2026

Summary

This PR contains two groups of changes:

  1. CSGHub/agent manager and sandbox robustness
  • Align manager identification and lookup behavior for csghub, including prefixed/unprefixed compatibility.
  • Refine manager recreation flow and fallback lookup order to reduce failures when historical manager identifiers changed.
  • Add/adjust related runtime and service unit tests.
  • Improve no_auth environment variable parsing consistency.
  1. Config persistence improvements
  • Extend config load/save coverage for sandbox and model-related fields.
  • Keep placeholder semantics on save when values are unchanged after environment expansion.
  • Persist sandbox storage path support in config.

Onboard Scope (Follow-up to Review Feedback)

Per review feedback, csgclaw onboard should stay focused on initialization. This PR removes newly added onboard flags for general server/sandbox settings (such as listen-addr, advertise-base-url, access-token, sandbox-provider, and storage-path aliases), and keeps those settings managed through the config file.

Main Changed Files

  • cli/onboard/onboard.go
  • cli/onboard/onboard_test.go
  • cli/serve/serve_test.go
  • internal/agent/runtime.go
  • internal/agent/service.go
  • internal/agent/service_test.go
  • internal/config/config.go
  • internal/config/config_test.go
  • internal/sandbox/csghub/*
  • internal/sandboxproviders/csghub_provider.go

Risks / Regression Focus

  • This PR touches onboarding, config load/save semantics, and csghub sandbox behaviors.
  • Please focus CI/review on config, agent, and csghub test suites.

Comment thread cli/onboard/onboard.go
managerImage := fs.String("manager-image", "", "bootstrap manager image")
storagePath := fs.String("storage-path", "", "PVC subpath prefix for all manager/worker sandbox mounts, e.g. 77/<tenant>/")
storagePathAlias := fs.String("storage_bash", "", "alias for --storage-path")
forceRecreateManager := fs.Bool("force-recreate-manager", false, "remove and recreate the bootstrap manager box")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The parameters for csgclaw onboard may still be simplified later on.

If the relevant settings can be adjusted in the configuration file, we do not recommend adding them to the onboard anymore.

Comment thread internal/agent/service.go Outdated
if name == "" {
name = ManagerName
}
prefix := strings.TrimSpace(os.Getenv("CSGCLAW_NAME"))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is an additional environment variable CSGCLAW_NAME required here?

@GatewayJ GatewayJ force-pushed the 0422 branch 2 times, most recently from 9571534 to 07ce2a9 Compare April 24, 2026 03:59
GatewayJ added 20 commits April 24, 2026 17:31
- Add internal/sandbox/csghub runtime/provider and csghubsdk HTTP client
- Register csghub sandbox provider; wire config defaults for csghub build
- Document env contract in docs/saas-env-contract.md
- Add docker/Dockerfile.unified and docker README for unified image
- Adjust boxlitesdk imports and provider tests for build-tag layout

Excluded from commit: .cursor/, bin-csghub/, third_party local boxlite-c extract (~229MB).

Made-with: Cursor
…notes

- Rewrite saas-env-contract intro: no csghub build tag; default go build vs
  -tags boxlite_sdk; contract applies when using CSGHub sandbox provider
- Drop csghub-only DefaultSandboxProvider init file; refresh registry tests
- Tweak csghub Provider doc comment; boxlitesdk imports; .gitignore

Made-with: Cursor
They belong under .gitignore (bin-csghub/); drop accidental track from 22ee662.

Made-with: Cursor
Remove //go:build boxlite_sdk from internal/sandbox/boxlitesdk sources so
go test ./... exercises the adapter without extra tags. Registration and
DefaultSandboxProvider override remain behind boxlite_sdk in
sandboxproviders and config.

Made-with: Cursor
@RussellLuo RussellLuo merged commit f56942f into OpenCSGs:main Apr 25, 2026
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