Skip to content

Use a Go vanity import in the "main" substrate repo: go.ate.dev/substrate - #2181

Merged
Benjamin Elder (BenTheElder) merged 9 commits into
agent-substrate:mainfrom
thockin:go-vanity-import
Oct 16, 2026
Merged

Benjamin Elder (BenTheElder) merged 9 commits into
agent-substrate:mainfrom
thockin:go-vanity-import

Conversation

@thockin

Copy link
Copy Markdown
Collaborator

This commit changes everything except HTTP(s) links.

github.com/agent-substrate/substrate -> go.ate.dev/substrate

I chose "go.ate.dev" for brevity, but "pkg.ate.dev" would be OK, too.

This is implemented as "CloudFlare Pages" on my personal account. If we like it, we need to make it more "community operated".

This does not yet convert other repos.

This breaks a TON of open PRs, so we should consider if/when we want to merge it.

/cc Benjamin Elder (@BenTheElder) Jaana Dogan (@rakyll) Eitan Yarmush (@EItanya)

@thockin

Tim Hockin (thockin) commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator Author

Hmm, e2e fails locally, but for different reasons (egress tests). AI thinks there's a test-ordering problem and in fact re-running just the egress passes locally. Lior Lieberman (@LiorLieberman)

This just keeps timing out.

@thockin
Tim Hockin (thockin) force-pushed the go-vanity-import branch 3 times, most recently from 7287dea to 2e3e300 Compare October 4, 2026 21:32
@LiorLieberman

Copy link
Copy Markdown
Collaborator

Hmm, e2e fails locally, but for different reasons (egress tests). AI thinks there's a test-ordering problem and in fact re-running just the egress passes locally. Lior Lieberman (@LiorLieberman)

This just keeps timing out.

Assuming its fixed now?

@thockin

Copy link
Copy Markdown
Collaborator Author

For discussion - this is mostly aesthetic. We could host it semi-statically in a gh-pages, but:
a) that still requires to be regenerated if we add repos
b) that cannot redirect to a specific package URL (e.g. go get go.ate.dev/foo/bar) unless we regenerate everytime we add a package

Currently it's a small JS snippet but that requires that someone administers said JS snippet on a hosted service, over time, forever and ever.

Is it worth doing?

@EItanya

Copy link
Copy Markdown
Collaborator

For discussion - this is mostly aesthetic. We could host it semi-statically in a gh-pages, but: a) that still requires to be regenerated if we add repos b) that cannot redirect to a specific package URL (e.g. go get go.ate.dev/foo/bar) unless we regenerate everytime we add a package

Currently it's a small JS snippet but that requires that someone administers said JS snippet on a hosted service, over time, forever and ever.

Is it worth doing?

Seems worth it for simplicity. Is there a way we could put that script in a separate repo with workflows to auto deploy it to cloudflare or something similar. That way the process is a part of the project itself

@thockin

Copy link
Copy Markdown
Collaborator Author

Seems worth it for simplicity.

You mean the overall change?

@EItanya

Copy link
Copy Markdown
Collaborator

Seems worth it for simplicity.

You mean the overall change?

Well definitely I'm on board with the overall change, but specifically I meant the small JS snippet

@BenTheElder

Copy link
Copy Markdown
Collaborator

a) that still requires to be regenerated if we add repos

Doesn't seem like a big blocker / easily automated.

Nightly regenerate on a github action and have it list the repos automatically.

b) that cannot redirect to a specific package URL (e.g. go get go.ate.dev/foo/bar) unless we regenerate everytime we add a package

The package redirect could be done in client-side JS from an otherwise static page, I'm not sure how much we care about trying to serve a redirect to source to JS-less clients at this stage. Really the source code redirect is optional, we need the go meta header.

@BenTheElder

Copy link
Copy Markdown
Collaborator

If we can confirm that CNCF has cloudflare pages then all for the server side JS, but I don't want to make thockin's personal cloudflare loadbearing to get ahead of problems we don't have yet (like supporting lots of repos generated on demand, we have only a few).

@rakyll

Copy link
Copy Markdown
Collaborator

Nightly regenerate on a github action and have it list the repos automatically.

I'd not to go with a static approach. It adds friction each time a new package is added/removed. We tried this in the early days of Go and everyone regretted it.

@thockin

Tim Hockin (thockin) commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator Author

OK, so I think it IS possible to do through gh-pages. What it entails is:

  1. A single repo per org-under-management (e.g. agent-substrate, agent-substrate-integrations, etc)
  2. A script which loops over that org's repos and generates a directory + 1 file
  3. Something to re-run that script

We can have a periodic gh-action which runs the script and opens a PR. This is ugly because it requires GitHubs' "Allow GitHub Actions to create and approve pull requests" action which is scarily powerful (though the OWNERS action may need it anyway).

We can have a periodic action which runs the script and opens an issue, telling us humans to open a PR. That requires "issues: write" and not "create and approve pull requests".

I THINK we can have a periodic which runs the script and pushes a branch and then opens an issue, so creating a PR is super easy.

Or we can just have people go run it and open a PR themselves when they create a new repo.

Thoughts? Benjamin Elder (@BenTheElder) you seem to have the most GH cluefulness ;)

I will ping CNCF folks to see if they have a CloudFlare we could lean on.

@thockin

Copy link
Copy Markdown
Collaborator Author

So much drama for perhaps nothing. Bob K says:

"""
Yup, we have an agreement with cloudflare - that shouldn't be a problem
If you log a service desk ticket, an account can be setup for you pretty quickly
"""

So we can keep it on my own account until the paperwork is done, and then figure out how to move it and the DNS serving / domain renewals?

@BenTheElder

Copy link
Copy Markdown
Collaborator

We discussed offline, TLDR: We have multiple options for hosting the redirect later should we need them. Let's ship it as-is.

@thockin Tim Hockin (thockin) changed the title WIP: Use a Go vanity import in the "main" substrate repo: go.ate.dev/substrate Use a Go vanity import in the "main" substrate repo: go.ate.dev/substrate Oct 15, 2026
@thockin

Copy link
Copy Markdown
Collaborator Author

Rebased: Benjamin Elder (@BenTheElder)

@thockin

Copy link
Copy Markdown
Collaborator Author

Rebased. This is going to really hurt to keep doing.

@thockin

Copy link
Copy Markdown
Collaborator Author

I'm going to sit on this until we can fast-turn it. I can't rebase every 10 minutes :)

@thockin

Copy link
Copy Markdown
Collaborator Author

rebased once before bed

@BenTheElder

Copy link
Copy Markdown
Collaborator

Tim Hockin (@thockin) github notification volume is high, send me a direct message tomorrow when this one is ready given the rebase magnet it is and we'll give it a a go.

@thockin
Tim Hockin (thockin) force-pushed the go-vanity-import branch 2 times, most recently from 8114852 to a88e513 Compare October 16, 2026 03:42
Comment thread .golangci.yaml Outdated
git grep -l 'github.com/agent-substrate' go.mod **/go.mod \
    | while read F; do \
        sed -i 's|github.com/agent-substrate/substrate|go.ate.dev/substrate|g' $F; \
    done
    git grep -l '"github.com/agent-substrate' **.go \
        | while read F; do \
            sed -i 's|"github.com/agent-substrate/substrate|"go.ate.dev/substrate|g' $F; \
        done

    ./hack/update/gofmt.sh
    git grep -l 'ko://github.com/agent-substrate' \
        | while read F; do \
            sed -i 's|github.com/agent-substrate/substrate|go.ate.dev/substrate|g' $F; \
        done

    sed -i 's|github.com/agent-substrate/substrate|go.ate.dev/substrate|g' .ko.yaml
    sed -i 's|github.com/agent-substrate/substrate|go.ate.dev/substrate|g' cmd/ate-setup/internal/ko/ko_test.go
git grep -l '// +k8s:.*github.com/agent-substrate' \
    | while read F; do \
        sed -i 's|github.com/agent-substrate/substrate|go.ate.dev/substrate|g' $F;
    done
git grep -l '//go:generate.*github.com/agent-substrate' \
    | while read F; do \
        sed -i 's|github.com/agent-substrate/substrate|go.ate.dev/substrate|g' $F; \
    done
    git ls-files */*.proto \
        | while read F; do \
            sed -i 's|github.com/agent-substrate/substrate|go.ate.dev/substrate|g' $F;
        done

    ./hack/update/codegen.sh
sed -i 's|github.com/agent-substrate/substrate|go.ate.dev/substrate|g' \
    hack/update/licenses.sh \
    hack/run-root-tests.sh \
    tools/apitool/internal/validate/validate.go
    There ought to be a script for this:

    cd cmd/ateworker-microvm/internal/third_party/kata/agentpb
    ../../../../../../hack/protoc.sh \
        -I . \
        --plugin=protoc-gen-go="$(cd ../../../../../.. && ./hack/run-tool.sh --print-bin-path protoc-gen-go)" \
        --go_out=paths=source_relative:. \
        ./*.proto
    cd -

    sed -i \
        's|github.com/agent-substrate/substrate|go.ate.dev/substrate|g' \
        cmd/ateworker-microvm/internal/third_party/kata/PROVENANCE.md
@BenTheElder
Benjamin Elder (BenTheElder) added this pull request to the merge queue Oct 16, 2026
Merged via the queue into agent-substrate:main with commit 68a082c Oct 16, 2026
15 checks passed
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.

5 participants