Repository navigation
Description
Context
With the #56 harness fix, the full Tier 2 suite now runs cleanly (17/24 pass, 316s, no timeouts) against real AWS. 7 failures remain — these are real product/test issues, NOT the harness timeout. Triaging them here so each can be addressed; some are likely test-design issues, some may be real bugs.
The 7 failures
-
TestTier2_FSxTagsWritten—launch ... --fsx-id fs-00000000000000000→FileSystemNotFound. Test bug: uses a hardcoded fake FSx id that doesn't exist. The test needs to create (or skip if absent) a real FSx filesystem, or assert the tag-writing logic without a live FSx. Pre-existing, unrelated to e2e Tier 2 harness can't run ~22 launches in parallel — waitForRunning times out, SSH ControlMaster contention #56. -
TestTier2_HibernateAndResume+ 3.TestTier2_ConnectWakesHibernated—spawn hibernate ... exit status 1, failing right after "Requesting hibernate" at uptime 1m0s. Likely test timing: hibernating ~1 min after launch is too early — the instance/hibernation agent isn't ready yet (EC2 rejects hibernate until initialized). Either wait for readiness before hibernating, or this surfaces a real "hibernate too soon" gap. Needs the actual AWS error captured (currently truncated). (Note:ConnectWakesHibernatedis the new test from PR test(e2e): strengthen connect wake/reconnect coverage (stopped + hibernated) #59.) -
TestTier2_IAMPolicyApplied—--iam-policy s3:ReadOnly did not grant S3 access. Likely IAM propagation timing (instance-profile/policy not effective yet when the test checks), or a real policy-application bug. Needs a retry/wait or root-cause. -
TestTier2_PreStop—/tmp/prestop-ran.txt not found. The pre-stop hook didn't run (or didn't finish) before the assertion. Timing vs. spored, or real. -
TestTier2_CommandExecution—connect -- cat /tmp/cmd-ran.txt exit 1. The--command(run at launch) hadn't created the file when connect checked. Likely spored/command timing. -
TestTier2_NameResolutionPrefersRunning([audit] Flags: launch uses --key-pair vs --key-name on autoscale/burst #313) — connect picked an instance but the test's assertion about which (running vs stopped dup) didn't match cleanly. Possible flake or a [audit] Flags: launch uses --key-pair vs --key-name on autoscale/burst #313 regression; needs the actual vs expected instance id compared.
Likely categories
- Test-design / fake fixtures: Feature request: --tag / --tags flag for custom EC2 instance tags #1 (FSx fake id).
- Timing (need wait/retry before asserting): feat: Discord chat integration (alongside Slack and Teams) #2, Raise test coverage on low-coverage packages (aggregate 24.7%) #3, ci: add coverage ratchet floor (22%) #4, test: raise pkg/aws coverage to 31.4% + fix ListInstances nil panic #5, test: cover pkg/dns (→39.5%) and pkg/provider (→24.0%) #6 — all assert on instance-side state shortly after launch/hibernate.
- Possible real regression: test: cover pkg/streaming TCP transport (→60.4%) #7 ([audit] Flags: launch uses --key-pair vs --key-name on autoscale/burst #313 name resolution) — verify.
Asks
Address each (most are likely "wait for readiness before asserting" in the test, but #4/#7 should be confirmed not-a-product-bug). Capture the truncated AWS errors for the hibernate failures. Once fixed, Tier 2 should be 24/24.
Context
Found in the first clean full Tier 2 run after #56. Cost control intact (0 instances leaked).
Activity
scttfrdmn commentedon Jun 5, 2026
Worked through all 7 against real AWS. Result: 3 resolved, 4 are real product gaps (not test timing). Test improvements landed in a PR; the 4 product issues are detailed below for follow-up.
Resolved ✅
spawn hibernate~1 min post-boot returns exit 1 because the EC2 hibernation agent isn't initialized yet. AddedhibernateEventually(retry until accepted). Both now PASS (~186s / 190s).--fsx-idis validated against the real FSx API at launch (GetFSxFilesystem→DescribeFileSystems), so a fake id can never work through the launch path. The test was structurally broken. Now skips unlessE2E_FSX_IDis set; the [audit] Flags: async flag is --detach (launch/sweep) vs --detached (pipeline launch); pipeline flag is also a no-op #314 tag-writing regression is already covered without AWS bypkg/aws/tags_test.go. So no e2e coverage lost.Real product gaps (test now polls correctly, but the behavior is missing)⚠️
--commandappears to no-op on a SINGLE (non-sweep) launch.cmd/launch.go:1787maps--command→config.JobArrayCommand, but the only code that executes it (cmd/launch.go:~2249) lives inside the parameter-sweep user-data block, keyed on reading thespawn:commandtag. A plainspawn launch --command '...'doesn't go through that path, so the command never runs.TestTier2_CommandExecutionpolls 4 min for the marker file and never sees it. Needs a product fix: execute--commandfor single launches (via spored or the bootstrap), not only for sweeps. (This may also be why launch should fail if spored fails to install on the instance #50/nf-spawn-style single-instance command runs are unreliable.)--pre-stopmarker never appears (TestTier2_PreStop) — likely the same/related single-instance execution gap (pre-stop hook not wired for non-sweep launches, or not firing on completion).--iam-policy s3:ReadOnlydoesn't grant S3 within 4 min (TestTier2_IAMPolicyApplied). Could still be propagation, but 4 min is generous — worth confirming the policy is actually attached to the instance profile for single launches.NameResolutionPrefersRunning([audit] Flags: launch uses --key-pair vs --key-name on autoscale/burst #313) — connect-by-name to the running dup; needs the actual-vs-expected instance id captured to confirm it's a real [audit] Flags: launch uses --key-pair vs --key-name on autoscale/burst #313 regression vs a connect-readiness race.Status
test(e2e): fix Tier 2 timing/fixtures; surface real product gaps (#61) (
scttfrdmn commentedon Jun 6, 2026
Status update — 4/7 resolved, root causes found for the rest
Fixed (PR pending merge)
--commandexec was nested inside the sweep-onlySWEEP_IDgate, so single launches never ran it; (b) it usedsu - local, but nolocaluser exists (bootstrap creates$LOCAL_USERNAME). Both fixed — command now runs for any instance, as the correct user. PASSES.hibernateEventuallyretries until the EC2 hibernation agent is ready. PASS.E2E_FSX_IDset; [audit] Flags: async flag is --detach (launch/sweep) vs --detached (pipeline launch); pipeline flag is also a no-op #314 covered bypkg/aws/tags_test.go.Root-caused, separate issues filed
spored-instance-roleIAM race → filed Concurrent launches race on shared spored-instance-role IAM setup → launch fails #64. Harness now serializes launches (launchSem=1) to avoid it in tests.touch) → ~5s later terminates. The test SSHes to check the marker after pre-stop, but the instance is already terminating, soconnectcan't reach it. Fix: use--on-complete stop(instance survives) and assert the marker after it stops, or have spored record pre-stop completion in a tag/log the test can read post-mortem. pre-stop itself works.--commandnow does).Still to confirm
--iam-policyS3 grant is just propagation-slow or a real attach bug.Net
Tier 2: 20/24 green + CommandExecution = effectively 21, with the remaining 3 understood (pre-stop test-race; iam/name-res blocked on the #64 launch race). No harness/timeout issues remain.
fix: --command as instance user, idempotent IAM, Tier 2 fixes (#61, #64…
fix(spored): run --pre-stop as the instance user, not root (#63) (#185)
scttfrdmn commentedon Oct 19, 2026
All 7 failures resolved or split out: hibernate x2 and FSx fixed in a5fc6b4 (#62); CommandExecution fixed in 7f55e7d (#69); the launch race behind PreStop/IAM/name-resolution filed as #64 (closed, completed) and pre-stop-as-root as #63 (closed, completed). On main, TestTier2_PreStop uses
--on-complete stopwith a /var/tmp marker and TestTier2_IAMPolicyApplied polls for propagation (test/e2e/tier2_test.go).