Repository navigation
Lessons from moving the Go SDK out of core (preliminary migration playbook) #5273
rhuss
started this conversation in
Design Discussion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The Go SDK now lives in ai-openshell/sdk-go: the history is imported, the module builds on its own, and #5245 deprecated
sdk/goin core and dropped its CI gate. It's the first of the RFC 0019 moves (#4426), so I wrote down what we learned while it's fresh, as a checklist that the Python SDK, TypeScript SDK,packages, andwindowsmoves can copy.This is preliminary. Phases 0 to 2 (prerequisites, import, cutover) are done, and those parts describe what happened. Phases 3 to 5 (automation, retirement, first lockstep release) haven't run yet. They're marked Pending with the questions still open, and I'll update them as they land. Once sdk-go ships its first release, I plan to propose a cleaned-up version as
rfc/0019-repository-migration/playbook.md.Feedback I'd find most useful:
After the migration is completed (after release 0.1.8), I plan to also provide a skill that helps in that migration. The actual migration was done with intent-driven development, specifically by using cc-spex and speckit. I just wanted to share the result early on, so that you also can feed your agents with this data for any potential migration that will happen in parallel.
Tracking issue for the Go move: #5031.
Who this is for
Maintainers planning one of the remaining RFC 0019 moves: the Python and TypeScript SDKs,
packages,windows, and later the provider repositories. Every move leaves the same core repository, so the lessons about core's PR gates apply to all of them. Placeholders:<component>(for example "Python SDK"),<subdir>(its path in core),<target>(the newai-openshell/...repository),<surface>(the name core's prompts and scripts use for the component, for examplego-sdk).Phases
Each phase lists its entry gate and a checklist you can copy into the tracking issue. The Go move took six calendar days from the first issue to the core cutover, most of it waiting for approvals.
<target>mainstate:acceptedon the core issue<subdir>, open PRs ported<subdir>removed from core<target>Phase 0: Prerequisites
state:acceptedbefore any core PR.main-integrity: PR, approval, code owner, last-push approval, no force push) and your access to<target>andai-openshell/infra(gh api repos/<org>/<repo> --jq .permissions).tasks/*.tomlaggregates, CodeQL matrix and config, release workflows, Dependabot, CODEOWNERS, review prompts and their validators. Search for the path and for<surface>.<subdir>. Sort them into component-only PRs, core features with hand-written component changes, and PRs that only regenerate bindings./ok to test <sha>), maintainer approval, and open review threads.Phase 1: Import
hack/migration/FREEZE).git filter-repofrom a throwaway clone reduced to one branch at the freeze commit. Rewrite#NtoNVIDIA/OpenShell#N. Run withGIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null.<target>with--allow-unrelated-historiesand a merge commit. Resolve the auto-init README conflict in favor of the component's README.main, build the README example).Phase 2: Cutover and porting
<subdir>, and add a required check that fails on added or modified files there. Exempt deletions and the notice files instead of relying on a label./ok to test. After the CI mirror runs, answer review comments without pushing and carry polish into the next PR.format-patch --relative=<subdir> --no-signoffandgit am. Rewrite renamed paths inside the patches before applying, and only in lines the port adds. Port only the top PR of a stack.<target>, rebase every stacked branch right away. Verify each push withgit ls-remoteand read lease SHAs from it.Phase 3: Automation (Pending)
gh api orgs/<org>/teams; every team named needs repository access), Dependabot, CodeQL, workflow linting (actionlint, zizmor, shellcheck), docs publishing, CONTRIBUTING, SECURITY, AGENTS. Follow org-wide choices (the DCO GitHub app) over copies from core.maincan deploy to.Open questions: the first live run of the release poller and its first bot PR, the drift issue's noise level against core
main, and how bot steps that need PR context (label triggers, comment commands) fit an environment restricted tomain.Phase 4: Retirement (Pending)
<subdir>, its tasks and toolchain, CodeQL entries, release jobs and theirneedsand expected-job checks, and the freeze check. Rewrite the user docs page for the new location, with examples compiled against the new package.sync-agent-infraskill and search for<surface>as well as the path.Open questions: whether the deprecated tag shows up in the language's package index as expected, and how long the old docs page should keep the migration steps.
Phase 5: Release (Pending)
<target>with release notes that name the core version.Open questions: everything about the first lockstep release; it hasn't happened yet.
Lessons by topic
Governance
ai-openshellappliesmain-integrityto every Terraform-managed repo, and only org admins can bypass.require_last_push_approvalplus a team without a second reviewer means nothing can merge without an admin. Grow the owning team before the move.maintainers, notopenshell-maintainers).DCOfile.ai-openshell/infra. Plan an infra change (made by an infra team member) as step zero.state:acceptedissue for every core-side PR. The tracking issue must stay open, so file one issue per core PR.Automation identity (Pending)
GITHUB_TOKENdo not trigger workflows. Bot PRs need a GitHub App token.workflows: write.GITHUB_TOKENoverrides theghkeyring login. Checkgh auth statuswhen a push of workflow files fails with a missingworkflowscope.CI coupling
Releases (Pending)
sdk/go/vX.Y.Z) can break tooling that runsgit describe(setuptools-scm in fix(ci): keep Release Dev publishing when the snap upload or a Go tag breaks it #5018). Separate repos remove that class of problem.gh apiputs 404 error JSON on stdout.History
sdk/go). Filtered history keeps them, which is acceptable in exchange for blame and authorship.#Nreferences toNVIDIA/OpenShell#Nduring extraction, or they autolink to the new repo's issues.git filter-repocrashes on multi-line alias values ingit config --list. Run it withGIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null.Deprecation (Pending)
Porting
/ok to testis pinned to a SHA. Every push by the author needs a new one, so a PR fixed after review silently waits again.pull_requestworkflows as "awaiting approval" until a maintainer clicks "Approve and run". They are not part of Required CI Gates./ok to testlands, don't push non-blocking polish. Answer the review and carry the polish into the next PR.format-patch --relative=<subdir>plusgit am, and rewrite renamed paths inside the patches before applying.--no-signofftoformat-patch; a porter'sformat.signoff=trueadds their sign-off to every contributor's commit.amresolution with--theirsstill has old paths. Rewrite the resolved lines beforegit am --continue.git ls-remote, not the push output, and read lease SHAs from it too.Docs
All reactions