Repository navigation
test(module): wait for attachment before faulting in setup-fault test - #115
Conversation
The fault-injection test now waits until the host has registered the module before triggering the fault, since signalling earlier raced admission rather than exercising a failure raised during setup. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewReviewed head: FindingsNo active actionable findings. Advisory notes
Verdict: Ready for maintainer review · Priority: medium Diagnostics and supporting detailsFull summaryPull request purpose (title): test(module): wait for attachment before faulting in setup-fault test. Tiny Sweeper completed its review; deterministic results follow. Review snapshot
Completeness: Complete What changedThe test now waits for the module to appear in the host's listing (matched by `bus_name` against the `ReleaseRecord`) before calling `fault()` on the spawned setup task, so the injected fault occurs during setup after admission rather than racing admission. The wait is bounded at 2000 iterations of 5 ms and panics with "module never finished attaching" if the module never appears. Behavioural assertions on the resulting error reason and `Failed` state are unchanged. Features
TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. Before mergeNone. Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25. Or wait 9 minutes for your next included review. View limit details
Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 699c7ba08c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| return; | ||
| } | ||
| tokio::time::sleep(Duration::from_millis(5)).await; |
There was a problem hiding this comment.
Replace sleep-based attachment polling with an explicit notification
This helper synchronizes the setup-fault test by repeatedly sleeping until attachment becomes visible, contrary to the explicit AGENTS.md requirement that tests never use sleep as synchronization. It also introduces a scheduler-dependent retry budget into the test intended to eliminate a CI race. Await an explicit attachment notification instead, with tokio::time::timeout providing the failure deadline.
AGENTS.md reference: AGENTS.md:L64-L66
Useful? React with 👍 / 👎.
Main CI on the v0.3.6 merge failed once in coverage: a_module_whose_setup_faults_after_load_fails_the_load_with_its_reason got a 'bus name already owned' attach error. The test faulted the module from inside init, racing admission. It now waits until the host lists the module before faulting.