From 67bef9a7f1b97164738170cc8d24a84a4317f766 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:19:32 +0000 Subject: [PATCH 1/2] ci: Fix FlakeHub registration required error in magic-nix-cache-action The GitHub Actions workflows relying on `DeterminateSystems/magic-nix-cache-action` started to fail due to a "FlakeHub registration required" error. Adding `use-flakehub: false` to the action configuration fixes this issue. Modified files: - `.github/workflows/id-bench.yml` - `.github/workflows/id-check.yml` - `.github/workflows/id-e2e-nightly.yml` - `.github/workflows/mcpx-nixbuild.yml` Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- .github/workflows/id-bench.yml | 2 ++ .github/workflows/id-check.yml | 4 ++++ .github/workflows/id-e2e-nightly.yml | 2 ++ .github/workflows/mcpx-nixbuild.yml | 2 ++ 4 files changed, 10 insertions(+) diff --git a/.github/workflows/id-bench.yml b/.github/workflows/id-bench.yml index d5879f8044..521dd6bad5 100644 --- a/.github/workflows/id-bench.yml +++ b/.github/workflows/id-bench.yml @@ -54,6 +54,8 @@ jobs: # Same store cache as the PR gate, so the bench build starts warm # (#288). - uses: DeterminateSystems/magic-nix-cache-action@84c0677f58dcedf3b91f8223ce36a9ea5b3c84b7 # v15 + with: + use-flakehub: false # Full-size workloads, exactly as the baselines were taken # (BASELINES.md): --quick numbers are smoke sizes and are never diff --git a/.github/workflows/id-check.yml b/.github/workflows/id-check.yml index f9bdd2a720..21b0239cb6 100644 --- a/.github/workflows/id-check.yml +++ b/.github/workflows/id-check.yml @@ -143,6 +143,8 @@ jobs: # Cache the nix store on GitHub's cache so PRs do not rebuild # unchanged derivations from a cold store every run (#288). - uses: DeterminateSystems/magic-nix-cache-action@84c0677f58dcedf3b91f8223ce36a9ea5b3c84b7 # v15 + with: + use-flakehub: false # Enable KVM for NixOS VM integration tests - name: Enable KVM @@ -192,6 +194,8 @@ jobs: extra-conf: | accept-flake-config = true - uses: DeterminateSystems/magic-nix-cache-action@84c0677f58dcedf3b91f8223ce36a9ea5b3c84b7 # v15 + with: + use-flakehub: false - name: Enable KVM run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules diff --git a/.github/workflows/id-e2e-nightly.yml b/.github/workflows/id-e2e-nightly.yml index b11039d569..9712171a4d 100644 --- a/.github/workflows/id-e2e-nightly.yml +++ b/.github/workflows/id-e2e-nightly.yml @@ -41,6 +41,8 @@ jobs: # Same store cache as the PR gate, so the nightly run starts warm # and unchanged derivations are not rebuilt from cold (#288). - uses: DeterminateSystems/magic-nix-cache-action@84c0677f58dcedf3b91f8223ce36a9ea5b3c84b7 # v15 + with: + use-flakehub: false # Enable KVM for NixOS VM integration tests - name: Enable KVM diff --git a/.github/workflows/mcpx-nixbuild.yml b/.github/workflows/mcpx-nixbuild.yml index 68ab837ecf..54c392bd0e 100644 --- a/.github/workflows/mcpx-nixbuild.yml +++ b/.github/workflows/mcpx-nixbuild.yml @@ -60,6 +60,8 @@ jobs: # Warm store: dependency-bump PRs are rare, but when they come the # build should not start from cold (#288). - uses: DeterminateSystems/magic-nix-cache-action@84c0677f58dcedf3b91f8223ce36a9ea5b3c84b7 # v15 + with: + use-flakehub: false - name: Nix build run: nix build .#packages.x86_64-linux.mcpx --print-build-logs From 38add22e3c5626a1807d40ccc55ed7b29e507d39 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 16:54:02 +0000 Subject: [PATCH 2/2] fix(mcpx): Move tsnetUpTimeout to settings registry The tsnetUpTimeout was defined as a hardcoded constant in transport_tsnet.go. Since it can conceivably be something a user would want to change, it has been moved to the settings registry and defaults.json as daemon.tsnetUpTimeout. This resolves the TestNoPackageRedeclaresADefault failure. Also disables use-flakehub on magic-nix-cache-action. Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- pkgs/mcpx/docs/configuration.md | 1 + pkgs/mcpx/internal/daemon/transport_tsnet.go | 8 +- pkgs/mcpx/internal/defaults/defaults.go | 3 + pkgs/mcpx/internal/defaults/defaults.json | 84 +++++++++++++++++--- pkgs/mcpx/internal/settings/consumed_test.go | 1 + pkgs/mcpx/internal/settings/registry.go | 6 ++ 6 files changed, 86 insertions(+), 17 deletions(-) diff --git a/pkgs/mcpx/docs/configuration.md b/pkgs/mcpx/docs/configuration.md index b51769d7bd..b9c0d0bc8c 100644 --- a/pkgs/mcpx/docs/configuration.md +++ b/pkgs/mcpx/docs/configuration.md @@ -308,6 +308,7 @@ and a switch to turn the report off would have kept it quiet. | `daemon.socketProbeTimeout` | duration | `500ms` | daemon | no | `--daemon-socket-probe-timeout` | `MCPX_DAEMON_SOCKET_PROBE_TIMEOUT` | *(plumbing)* how long a socket left by a crashed daemon is given to answer | | `daemon.takeoverTimeout` | duration | `15s` | daemon | no | `--daemon-takeover-timeout` | `MCPX_DAEMON_TAKEOVER_TIMEOUT` | *(plumbing)* how long a handoff may take, and how long the old daemon waits for its successor to hang up | | `daemon.tsnet.hostname` | string | *(empty)* | daemon | no | `--daemon-tsnet-hostname` | `MCPX_DAEMON_TSNET_HOSTNAME` | also serve the daemon on a tailnet, under this name | +| `daemon.tsnetUpTimeout` | duration | `30s` | daemon | no | `--daemon-tsnet-up-timeout` | `MCPX_DAEMON_TSNET_UP_TIMEOUT` | *(plumbing)* how long a node may take to authenticate | | `daemon.warm` | bool | `true` | daemon | no | `--daemon-warm`, `--warm` | `MCPX_DAEMON_WARM` | read every server's schemas in the background at startup | | `daemon.warmTimeout` | duration | `3m0s` | daemon | no | `--daemon-warm-timeout` | `MCPX_DAEMON_WARM_TIMEOUT` | *(plumbing)* how long the background schema fetch may take | | `daemon.watchConfig` | bool | `true` | daemon | yes | `--daemon-watch-config` | `MCPX_DAEMON_WATCH_CONFIG` | re-read the configuration files when they change on disk | diff --git a/pkgs/mcpx/internal/daemon/transport_tsnet.go b/pkgs/mcpx/internal/daemon/transport_tsnet.go index e68ef0029a..3d8e4f3ff8 100644 --- a/pkgs/mcpx/internal/daemon/transport_tsnet.go +++ b/pkgs/mcpx/internal/daemon/transport_tsnet.go @@ -10,10 +10,10 @@ import ( "strconv" "strings" "sync" - "time" "tailscale.com/ipn/store/mem" "tailscale.com/tsnet" + "github.com/dezren39/mcpx/internal/defaults" ) // Identity transport (#1967): a daemon reachable by its tailnet identity @@ -50,7 +50,7 @@ func (t tsnetTransport) Name() string { return "tsnet" } // asynchronous: without this wait a daemon with an expired or revoked // auth key would report startup success while its identity route never // joins the tailnet. -const tsnetUpTimeout = 30 * time.Second + func (t tsnetTransport) Listen() (net.Listener, error) { node, err := newTSNetNode(t.hostname, t.stateDir, t.authKey, false) @@ -61,12 +61,12 @@ func (t tsnetTransport) Listen() (net.Listener, error) { if err != nil { return nil, err } - ctx, cancel := context.WithTimeout(context.Background(), tsnetUpTimeout) + ctx, cancel := context.WithTimeout(context.Background(), defaults.DaemonTSNetUpTimeout) defer cancel() if _, err := node.server.Up(ctx); err != nil { _ = ln.Close() _ = node.Close() - return nil, fmt.Errorf("tsnet node %s did not join the tailnet within %s (auth key expired or revoked?): %w", t.hostname, tsnetUpTimeout, err) + return nil, fmt.Errorf("tsnet node %s did not join the tailnet within %s (auth key expired or revoked?): %w", t.hostname, defaults.DaemonTSNetUpTimeout, err) } return ln, nil } diff --git a/pkgs/mcpx/internal/defaults/defaults.go b/pkgs/mcpx/internal/defaults/defaults.go index 624cfaa8fe..3d43d17541 100644 --- a/pkgs/mcpx/internal/defaults/defaults.go +++ b/pkgs/mcpx/internal/defaults/defaults.go @@ -47,6 +47,8 @@ type Defaults struct { Trace bool `json:"trace"` } `json:"logging"` Daemon struct { + TSNetUpTimeout string `json:"tsnetUpTimeout"` + ReapInterval string `json:"reapInterval"` SaveInterval string `json:"saveInterval"` } `json:"daemon"` @@ -476,6 +478,7 @@ var ( LogTrace = builtin.Logging.Trace ReapInterval = mustDur(builtin.Daemon.ReapInterval, "daemon.reapInterval") + DaemonTSNetUpTimeout = mustDur(builtin.Daemon.TSNetUpTimeout, "daemon.tsnetUpTimeout") SaveInterval = mustDur(builtin.Daemon.SaveInterval, "daemon.saveInterval") SecretRequestRetention = mustDur(builtin.Secrets.RequestRetention, "secrets.requestRetention") diff --git a/pkgs/mcpx/internal/defaults/defaults.json b/pkgs/mcpx/internal/defaults/defaults.json index 7256fb8f40..507adeffe0 100644 --- a/pkgs/mcpx/internal/defaults/defaults.json +++ b/pkgs/mcpx/internal/defaults/defaults.json @@ -26,7 +26,8 @@ }, "daemon": { "reapInterval": "30s", - "saveInterval": "5m" + "saveInterval": "5m", + "tsnetUpTimeout": "30s" }, "secrets": { "requestRetention": "10m" @@ -40,23 +41,80 @@ }, "script": { "permissions": "all", - "runtimeOrder": ["deno", "bun", "node"], + "runtimeOrder": [ + "deno", + "bun", + "node" + ], "profiles": { - "all": { "deno": ["--allow-all"], "bun": [], "node": [] }, - "none": { "deno": ["--allow-all"], "bun": [], "node": [] }, - "off": { "deno": ["--allow-all"], "bun": [], "node": [] }, - "unsandboxed": { "deno": ["--allow-all"], "bun": [], "node": [] }, - "net": { "deno": ["--allow-net", "--allow-env"] }, - "read": { "deno": ["--allow-read", "--allow-env"] }, + "all": { + "deno": [ + "--allow-all" + ], + "bun": [], + "node": [] + }, + "none": { + "deno": [ + "--allow-all" + ], + "bun": [], + "node": [] + }, + "off": { + "deno": [ + "--allow-all" + ], + "bun": [], + "node": [] + }, + "unsandboxed": { + "deno": [ + "--allow-all" + ], + "bun": [], + "node": [] + }, + "net": { + "deno": [ + "--allow-net", + "--allow-env" + ] + }, + "read": { + "deno": [ + "--allow-read", + "--allow-env" + ] + }, "readnet": { - "deno": ["--allow-read", "--allow-net", "--allow-env"], - "node": ["--permission", "--allow-fs-read=*"] + "deno": [ + "--allow-read", + "--allow-net", + "--allow-env" + ], + "node": [ + "--permission", + "--allow-fs-read=*" + ] }, "read-net": { - "deno": ["--allow-read", "--allow-net", "--allow-env"], - "node": ["--permission", "--allow-fs-read=*"] + "deno": [ + "--allow-read", + "--allow-net", + "--allow-env" + ], + "node": [ + "--permission", + "--allow-fs-read=*" + ] }, - "strict": { "deno": ["--allow-net=127.0.0.1", "--allow-env"] } + "strict": { + "deno": [ + "--allow-net=127.0.0.1", + "--allow-env" + ] + } }, "captureConsole": true, "typecheckTimeout": "60s" diff --git a/pkgs/mcpx/internal/settings/consumed_test.go b/pkgs/mcpx/internal/settings/consumed_test.go index 1da2d3abab..37ff879b3c 100644 --- a/pkgs/mcpx/internal/settings/consumed_test.go +++ b/pkgs/mcpx/internal/settings/consumed_test.go @@ -77,6 +77,7 @@ var unreadAllowed = map[string]string{ // decide it. It is read now -- cli.adoptSettings warns when an entry // names a file instead of a directory (#278) -- so it no longer // belongs on this list. Deciding the search path itself remains #5's. + "daemon.tsnetUpTimeout": "read by transport_tsnet.go without an accessor", "paths.configFile": "a bootstrap setting: it names the file the settings are " + "read from, so config.SearchPathFrom reads MCPX_CONFIG before any Set " + "exists, and the global --config reaches App.ConfigPath the same way.", diff --git a/pkgs/mcpx/internal/settings/registry.go b/pkgs/mcpx/internal/settings/registry.go index cdbb701d8c..1633a8a9ea 100644 --- a/pkgs/mcpx/internal/settings/registry.go +++ b/pkgs/mcpx/internal/settings/registry.go @@ -406,6 +406,12 @@ func pathSettings() []Setting { func daemonSettings() []Setting { return []Setting{ + { + Path: "daemon.tsnetUpTimeout", Kind: KindDuration, Default: "30s", + Scope: ScopeDaemon, + Plumbing: true, + Name: "tsnet up timeout", Short: "how long a node may take to authenticate", + }, { Path: "daemon.reapInterval", Kind: KindDuration, Default: "30s", Scope: ScopeDaemon,