Skip to content

E11: the bash/Go Exec-error cause vocabulary is a hand-maintained mirror with no automated drift guard #9

Closed as not planned

Description

@pdettori

E11 now has two Exec clients, and each classifies a failed Exec into the same six-value cause
vocabulary independently:

  • bash — grpc_exec_record in deploy/microvm/e11-density.sh (~:1262-1272), a grep -qi chain
    over grpcurl's stderr.
  • Go — causeFor in remote-worker/cmd/exec-driver/cause.go (:17-31), a switch over
    strings.Contains on a lower-cased message.

Both produce empty-workspace-key, memory-gate, max-runs, spawn-failure,
vsock-short-response, unknown, in that order — and the order is load-bearing, because a message
matching two rules must classify the same way on both paths or the two clients' execErrorsByCause
stop being comparable.

The gap

Nothing automated keeps them in sync. Raised by @huang195 reviewing rossoctl/moca#296, and on checking it is
slightly worse than that review assumed:

  • remote-worker/cmd/exec-driver/cause_test.go mentions e11-density.sh only in a comment
    (:6). Its expectations are hardcoded Go literals, so it passes unchanged if the bash side is
    edited.
  • The bash suite has no assertion about the cause chain at all. The one check labelled
    DRIFT GUARD in deploy/microvm/tests/e11-density.test.sh (:2710) covers execTimeoutS — the
    Exec deadline — not the cause vocabulary.

So the mirror is currently held together by a code comment and reviewer diligence. A one-sided edit —
adding a seventh cause, reordering mem above workspace_key, or renaming one — would leave both
suites green while silently making the two clients' error attribution incomparable. That defeats the
specific thing rossoctl/moca#294 exists to enable: driver-control ladders from the two clients being subtractable.

Why rossoctl/moca#294 did not fix it

The fix touches the reference path's classification. rossoctl/moca#294 deliberately left the grpcurl path's
driving behaviour alone so the two-client comparison stays valid, and changing how it classifies would
alter execErrorsByCause on published ladders mid-comparison. Better done once that comparison has
run and §E11's conclusions are settled.

Candidate approaches

  1. A shared data file — e.g. deploy/microvm/exec-error-causes.tsv with one ordered
    substring<TAB>cause row per rule, read by causeFor at startup and by grpc_exec_record's
    classification. One source of truth, no drift possible. Costs a file read on the Go side (outside
    the timed window) and restructures the bash grep chain into a loop — which needs care, because that
    function is asserted to contain no command substitution at all (the E11: the density knee may be a driver artifact — host resource signals are sampled post-load, and the driver spawns ~9 processes per Exec moca#291 item-2
    no-fork-in-the-timed-window guarantee).
  2. A cross-language drift test — cheaper and non-invasive: have the bash suite extract the cause
    strings and their order from both sources and assert they match. Does not remove the duplication
    but makes desync impossible to merge. Good interim step if option 1 waits on the metal run.
  3. Generate one side from the other at build time.

Option 2 is probably the right first move: it closes the actual risk without touching the reference
path, so it can land before the comparison rather than after.

Context

  • The vocabulary and order are documented in docs/superpowers/specs/2026-09-18-e11-go-exec-client-design.md §4.
  • causeFor's doc comment already states it is a deliberate mirror and why the order matters — that
    comment is currently the only thing enforcing it.

🤖 Generated with Claude Code

Activity

  1. transferred this issue fromrossoctl/mocaon Oct 2, 2026
  2. pdettori commented on Oct 2, 2026

    @pdettori
    MemberAuthor

    Transferred from rossoctl/moca on 2026-10-02, along with the other experiment issues, because their drivers moved here on 2026-09-25 (deploy/microvm/EXPERIMENTS-MOVED.md, deploy/knative/EXPERIMENTS-MOVED.md, experiments/MOVED.md in moca).

    Bare #N references in this issue's body and earlier comments point to rossoctl/moca, not to this repo. GitHub doesn't rewrite them on transfer. For example, #253 means rossoctl/moca#253. The issues moved together, old number to new:

    rossoctl/moca here title
    #130 #2 SWE-bench measurement driver polish
    #256 #3 P4 next-experiments epic
    #257 #4 real model think-time distribution
    #261 #5 E11 with a real model in the loop
    #262 #6 test the admission gate (sealed prediction 1)
    #280 #7 E13 root cause
    #306 #8 rename coldAcquireRate
    #298 #9 E11 bash/Go cause-vocabulary drift guard
    #254 #10 E8 capacity/realism arms
    #275 #11 E8 run
    #276 #12 E9 run

    Product-code issues they reference stay in moca, for example rossoctl/moca#274 (per-Exec VM lifetime), #277 (P4.1 egress), #297 (vmpool test flakes), #307 (Destroy cost) and #338 (workspace lifetime).

  3. pdettori commented on Nov 12, 2026

    @pdettori
    MemberAuthor

    Closing as won't fix. E11's ladders are historical and the two clients' subtractability is no longer used. A real guard would span two repos (the bash mirror here, remote-worker/cmd/exec-driver/cause.go in moca); the suite's only drift guard covers execTimeoutS. Reopen together with #8 if E11 is rerun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions