carlos / platform Public

instance-control: stage the tty exe test under a tenant account (rootfs plan 6)

Fix round 1 (Astra): TestTTYExeUsesItsOwnSources staged under the ops
account; it now uses domains.Sqid(7) and app shop throughout, as the
branch's test-account rule requires. Test-only; the census seal stands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 37a06e985749fa470ec99e7dd7265c2a00accb4d parent 08554c1
1 file changed, +5 −2
  • internal/instancectl/cmd_stagedexe_linux_test.go +5 −2

Intent

Human

<task-notification> <task-id>aff5676e833ceb487</task-id> <tool-use-id>toolu_015vAZjgn54GaDTfQLd2Eceh</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/aff5676e833ceb487.output</output-file> <status>completed</status> <summary>Agent "#471 Task 5: switch on marker" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>**Status: DONE_WITH_CONCERNS.** The concerns are minor; the code is done and the tests pass. **Commit:** `10151ad5` on `design-tunnel-websockets-471`, on top of `3baa50b5`. Not pushed. It switches the hub's marker on, rewrites the three policy tests and deletes `TestUpgradesStillRefusedBeforeSwitchOn`. It also writes TWS-C01..C03 verbatim and puts all three in the copy gate's built list, amends spec §4.9 with P-1's wording, and adds a Task 5 census paragraph to spec §7. **Tests:** RED failed only on the new and rewritten tests and the copy gate. GREEN passes the Step 3 command in all three packages, the new tests under `-race -count=5`, and the neighbouring edge tests under `-race`. Vet, gofmt and the darwin, windows and linux/arm64 builds are clean. Ten mutation checks were run, and each was caught by its test, including the two the brief asked for (no admission check, no caps check). **Concerns:** 1. **No-caps-check mutation.** Removing the caps check fails `TestOldBoxKeepsThe502`, but not the way the brief predicted. One run gave a 502 with cause `tunnel`, another got no answer within 10 s. Neither was the old box's plain 200. This shows that sending an upgrade to an old box hangs or fails, which is why the check is needed. 2. **Unlocked reads.** `TunnelHub.upgradeCap` and the new `TunnelHub.edge` are read without a lock. They are set before serving starts, the same rule `e.tunnels` already follows, and the race detector reported nothing. 3. **Small additions the brief didn't ask for:** - A `channelRefusal` error type carries the channel name, so the log key works for `fleetProxy`, which picks its channel inside its transport. - A stale or missing admission writes one plain log line, which is not copy. - The busy 503 is not logged. 4. **Census.** The card shows the same three rows as Task 4, plus `internal/apperr` as a newly re-pinned envelope, which §7 expected. The seal is unchanged. `Edge.EnableTunnels` has no row on the card, so it is not added to §7's `body` list; the new §7 paragraph names it and says why. Mutation scratch files are deleted. `/tmp/g` was left in place because it may have existed before this task. No background processes are running. The full report is at `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-tunnel-websockets-471/.superpowers/sdd/2026-10-30-tunnel-websockets/task-5-report.md`, and the new tests are in `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-tunnel-websockets-471/internal/edge/tunnel_upgrade_test.go`.</result> <usage><subagent_tokens>211666</subagent_tokens><tool_uses>82</tool_uses><duration_ms>1353132</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>bstzmow0w</task-id> <tool-use-id>toolu_01MrYiiXFArMAcH2Dp2DVcqV</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ba9fa944-a429-4788-9b3c-f2b2f42617f3/tasks/bstzmow0w.output</output-file> <status>completed</status> <summary>Background command "Run Astra review of #471 Task 5" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 6.34 g CO₂e (682,739 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on rootfs-apps-6-interactive, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/internal/instancectl/cmd_stagedexe_linux_test.go b/internal/instancectl/cmd_stagedexe_linux_test.go
index e8f9b4749..988ed9754 100644
--- a/internal/instancectl/cmd_stagedexe_linux_test.go
+++ b/internal/instancectl/cmd_stagedexe_linux_test.go
@@ -13,6 +13,7 @@ import (
"testing"
"github.com/carlosframework/platform/internal/cgroup"
+ "github.com/carlosframework/platform/internal/domains"
"github.com/carlosframework/platform/internal/provision"
"github.com/carlosframework/platform/internal/release"
)
@@ -218,9 +219,11 @@ func TestConcurrentCmdAndSidecarStartsBindTheirOwnBuilds(t *testing.T) {
// never repoint each other's, and a session's stop takes only its own.
func TestTTYExeUsesItsOwnSources(t *testing.T) {
const host = "shop.example.com"
+ // An ordinary tenant account, never the ops account (common.md).
+ acct := domains.Sqid(7)
opt, exeRoot := t.TempDir(), t.TempDir()
stage := func(v string) StagedExe {
- path := release.VersionPath(opt, release.OpsAccount, v, "blog")
+ path := release.VersionPath(opt, acct, v, "shop")
return StagedExe{Path: path, Version: v, Digest: writeStaged(t, path, "build "+v)}
}
cmdBuild, ttyBuild := stage("v2"), stage("v3")
@@ -228,7 +231,7 @@ func TestTTYExeUsesItsOwnSources(t *testing.T) {
newUnitModel(ctl)
_, sock := serveOnSocket(t, ctl, fastCmd, func(s *Server) {
s.ExeRoot, s.OptDir = exeRoot, opt
- s.HostApp = func(string) (string, string, error) { return release.OpsAccount, "blog", nil }
+ s.HostApp = func(string) (string, string, error) { return acct, "shop", nil }
})
c := NewClient(sock)
ctx := context.Background()