Skip to content

tests: cover atty-side daemon-verdict path via e2e + reconsider sandbox continue-on-error #461

Description

@fentas

Follow-up from #433 / PR (server-side coverage landed there).

#433 had four coverage bullets. The two reliable, self-contained ones landed as atty-guard server tests (atom-overlay Warn classify; loud-skip for the cross-UID gate tests). The remaining two need a different harness:

1. atty-side daemon-verdict integration (REFUSED / banner / trust short-circuit)

The headline gap: security_guard's daemon-Block path (red REFUSED + \x15 readline clear + Critical mark), daemon-Warn arming, and the trust short-circuit over a daemon verdict have no integration coverage — only the response parser is unit-tested.

Attempted + reverted: an in-process fake-UDS-daemon + servicing thread inside the Zig unit test (security_guard_tests.zig). It proved racy and hang-prone — the client connection is sticky, the server thread lifecycle is hard to bound under the build test runner (which also hides child stderr), and runs alternated between pass / assertion-fail / 240 s hang. Not worth merging a flaky threaded unit test.

Recommendation: cover this in the e2e harness (tests/e2e/) instead, driving a real (or scripted) atty-guard so the daemon→atty verdict path is exercised end-to-end without in-process thread races. A scripted-PTY scenario asserting the REFUSED line + cleared readline on a daemon-Block is the right shape.

2. e2e env.toml goldens + sandbox continue-on-error

  • e2e env.toml goldens are written but never diffed — either compare them or drop them from the golden set.
  • The sandbox eBPF/ONNX workflows run continue-on-error: true; reconsider whether that hides real regressions.

TODO

  • e2e scenario(s) for daemon Block → REFUSED+clear, daemon Warn → banner, trust short-circuit over a daemon verdict
  • Diff e2e env.toml or remove it from goldens
  • Reconsider continue-on-error on the sandbox eBPF/ONNX jobs

No activity

Activity on this issue will appear here.

Activity

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

    atty-guardIssues in the Rust security_guard sidecar daemonaudit-trackedFiled from a self-review audit; future reviews should skip

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions