Repository navigation
feat(ci): read package workflow registry settings from caller variables; add optional registry proxy - #4801
Conversation
…nal proxy Adds a REGISTRY_PROXY input to the reusable release and tagAndRelease workflows. When set, the configure-registry-proxy action writes it as start-cli's proxy, so registries can be .onion addresses; a loopback proxy with nothing listening gets a Tor daemon started on the runner. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
Reusable workflows evaluate vars against the caller's repository, so package repos pick up an org or repo REGISTRY_PROXY variable without passing it from their workflow files. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
REFERENCE_REGISTRY, RELEASE_REGISTRY and S3_S9PKS_BASE_URL now default to the calling repository's variables like REGISTRY_PROXY, so package callers pass only secrets. A missing reference registry fails with a named error instead of an empty-registry query. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
helix-white
left a comment
There was a problem hiding this comment.
[P2] Make proxy configuration repeatable for host-backed Forgejo jobs (.github/actions/configure-registry-proxy/action.yml). The action appends a fresh proxy: field on every invocation. Forgejo executes the reusable workflow's jobs locally; with the host execution backend, Tag and Publish inherit the same HOME. Tag therefore writes the first field and Publish appends a duplicate. ClientConfig::load_path_rec deserializes that file into ClientConfig, where duplicate proxy fields are rejected, so the next start-cli invocation fails instead of publishing. This occurs within one workflow run, even with an initially clean runner.
The proposal avoids appending an identical setting twice and records the shared-home constraint at the action. It also inserts a line boundary when an existing config lacks a trailing newline. Added regression cases apply the production action twice against both a new config and an existing registry config; these proposed tests have not been run.
The PR merges cleanly with current origin/master. Reviewed the caller-variable defaults, nested input forwarding, template/docs changes, generated Forgejo imports, and start-cli proxy consumption. No builds, tests, or lint were run during review.
Proposed changes: 9e0ea96...proposal/4801
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Forgejo's host backend runs Tag and Publish with the same HOME, so appending a proxy line twice left a duplicate key that start-cli rejects. Replace any existing proxy line instead, and clear it when no proxy is configured so a persistent runner does not inherit a stale one. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
|
Addressed in 9b3a5d5. [P2] Repeatable proxy configuration: agreed. I went a little past the proposal. It skipped only an identical line, so a different earlier value would still leave two On a persistent host runner, a later run with I adopted your test file and extended it with a stale-proxy case and an unset-clears case. |
helix-white
left a comment
There was a problem hiding this comment.
Approved on re-review of 9b3a5d5. The previous finding is addressed: repeated configuration replaces the prior proxy entry, preserves the other settings and their line boundary, and clears stale proxy settings when unset. Reviewed the regression cases against the production action script and the revised shared-home contract. No further blockers found; git merge-tree confirms a clean merge with current origin/master.
No builds, tests, or lint run during review. CI is still pending; the disclosed live Forgejo/default-evaluation and hosted Tor-bootstrap verification gaps remain unchanged.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
A loopback REGISTRY_PROXY no longer starts a Tor daemon implicitly. REGISTRY_TOR=true starts Tor on the publishing runners and proxies through it; REGISTRY_PROXY uses an existing proxy as given. Setting both is an error. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
…eachable proxy The workflows only point start-cli at the configured proxy. Running a Tor SOCKS proxy the runners can reach is the repository owner's job. Helix-Harness: claude-code Helix-Model: claude-opus-5-5
Package release workflows now read their registry settings from the calling repository's variables, and can route registry traffic through a user-provided proxy, so registries can be Tor
.onionaddresses.release.ymlandtagAndRelease.yml, theREFERENCE_REGISTRY,RELEASE_REGISTRYandS3_S9PKS_BASE_URLinputs, plus the newREGISTRY_PROXY, default to${{ vars.<same name> }}. Package repos set org or repo variables, and their caller workflows pass only secrets. A repo that passes an input underwith:still overrides the default, so existing*-startoscallers keep working unchanged.project-structure.mdexamples drop theirwith:blocks. The docs say these inputs come from variables and that secrets must still be passed.REFERENCE_REGISTRYis no longerrequired. If it is empty, the Tag job now fails with "No reference registry: set the REFERENCE_REGISTRY variable or pass the input". It previously queried an empty registry address. Callers already passed${{ vars.REFERENCE_REGISTRY }}, which is empty when unset, sorequired: truenever caught a missing variable..github/actions/configure-registry-proxy, runs in the Tag job and the Publish job. With a proxy URL, it sets the singleproxy:key in the runner's~/.startos/config.yaml. That key isstart-cli's existing--proxysetting, which applies to everystart-cliHTTP request: the version check, remove, publish and the add-mirror verification download. With no proxy, it removes anyproxy:key. Build jobs never contact a registry, sobuild.ymlis unchanged. S3 uploads go throughs3cmdand bypass the proxy.REGISTRY_PROXYmust name a SOCKS proxy the runners can already reach, such as a Tor daemon the repository owner runs..onionregistries need thesocks5hscheme, which resolves names through the proxy. An unreachable proxy fails the firststart-cliregistry call with a connection error.Implementation diff: +105 / −26 lines in 9 files (excludes lockfiles, tests, docs, release notes, and changelog). 31 of the added lines are generated Forgejo copies of the two workflows. I counted the package-template caller workflows as implementation.
Approach
start-cli's existingproxyconfig key rather than adding--proxyto eachstart-clicall. One write covers every call in the job.HOMEacross the Tag and Publish jobs and across runs. Appending would leave a duplicateproxy:key, whichstart-clirejects, and a run with the proxy unset would inherit a stale one. @helix-white caught the duplicate-key failure in review and proposed the regression test, which I extended with the stale-value and unset-clears cases.setupWorkflowInputs→rc.Config.Vars).Neighbors
release.yml/tagAndRelease.ymland the generated.forgejo/copies. Whichever merges second needs to regenerate the Forgejo variants.hello-world-startosand the other package repos need no change. Removing their now-redundantwith:blocks is optional cleanup.Testing
make package-ci-test: 171/171 pass. That covers Forgejo drift and the newconfigure-registry-proxy.test.mjs, which runs the production action script against a new config, an existing config, an existing config with a stale proxy, and the unset-clears case. actionlint and shellcheck report nothing new, and prettier is clean.start-cliwithproxy:in its config failed to reach registry.start9.com through a dead proxy and succeeded without one. This confirms the config key routes registry requests..onionregistry through a Tor proxy, and variable-default evaluation on a live Forgejo instance (confirmed from the runner source only). Repo CI on this head is still running; package workflows are not exercised by this repo's CI.Helix-Harness: claude-code
Helix-Model: claude-opus-5-5