Skip to content

test: fault-fixture coverage gaps for defensive mechanisms #43

Description

@CMGS

A whole-repo mechanism audit (every recovery/rollback/idempotency guard traced to its origin commit and test) confirmed all defensive mechanisms are justified, but eight lack a test that exercises their exact failure branch. Each needs a fault fixture; none is urgent — adjacent tests cover the surrounding flow.

sandboxd

  • pool/claim.goRelease in-memory rollback on failed persist: no direct test for the persist-fail arm (hibernate/archive equivalents have one via breakStore).
  • pool/egress.godisarmIfReleased: the wake-races-Release window has no test naming this path.
  • pool/egress.goarmEgressProxy stale-socket removal before bind: no test with a leftover UDS from a prior life.
  • egress/intercept.goleafFor near-expiry renewal and the 1024-entry eviction: neither is directly asserted.

silkd

  • session.rsTable::create duplicate-id rejection under real concurrency (two racing creates, loser's shell must not leak).
  • exec.rsStarted-frame write-failure rollback (needs a broken-pipe writer fixture; the ghost-entry outcome is otherwise untestable).
  • proc.rsTable::remove_if pointer-identity guard: pid-reuse eviction has no isolated test (requires a forged pid collision).
  • vsock.rs / net_egress.rs — accept-error retry loop: no EMFILE-style transient-error fixture; a failure here would take down the whole daemon.

Suggested fixtures: breakStore-style fault injection for the pool items, a half-closed pipe writer for silkd exec, fd-budget exhaustion via setrlimit in a child for the accept loops.

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