Repository navigation
Conversation
There was a problem hiding this comment.
Important
The new rejoin concurrency test can hang the bot test job if the first handler exits before posting.
Approach The behavioral fixtures and semantic selectors fit #1139. The current-only analytics calls match the decision in #1151.
Reviewed changes
- Bot. Rejoin tests exercise log admission, stale departures, and concurrent joins. The four permanent-ban callers pass a marker-attempt token, and a paused-time test checks the reservation deadline.
- API and runtime. The owner denial test reads paths from the sessioned router builder. The cgroup fixture tests exercise host metric isolation and v1 memory-limit handling.
- WebUI. Dashboard state tests use stable stat hooks, contrast checks drop stylesheet comment boundaries, and Platform Analytics uses the split endpoints.
Local validation covered JavaScript syntax checks and Rust source tracing. The full suites were not rerun for this review.
Non-blocking
- The owner-route inventory omits the outer router. The previous scan covered registrations anywhere in
mod.rs, whileregistered_sessioned_routessees only the sessioned builder. A future owner-prefixed route added directly to the outer router would escape the denial-test inventory. Include both routers in the recorded paths. Inventory assertion and Outer router. - The Members import tests still depend on wrapper markup. Adding a semantic
sectionaround Members would fail both the finished and never-run cases even if the summary, order, and controls stayed the same. The existing summary, order, and disclosure assertions can carry those checks without the Mantine-class and ancestor-tag assertions. Finished case and never-run case.
gpt-6.2-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed d974011, the follow-up to db3e6ad.
- Bounded the initial rejoin wait. The concurrency test now fails when the first handler exits before posting or when the loopback request fails to arrive within five seconds.
- Included outer routes in the owner-route inventory. The denial test now collects paths from both builders used by the live router.
- Removed wrapper assertions from the Members import tests. The tests still check the summary, the collapsed history disclosure after a completed run, and the absence of import details before the first run.
Both targeted Members state tests passed in JSDOM. Rust formatting and delta whitespace checks passed. The Rust test paths were reviewed in source, and the bot and API CI jobs were still running. CI run
gpt-6.2-sol | 𝕏
d974011 to
138f615
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed d974011 through 138f615.
- Replaced the explicit sleep with
tokio::time::timeout. The rejoin test still races the first loopback request against early handler exit, and it fails after five seconds if neither happens. This removes the explicit sleep that the prior Dylint run flagged. - Rebased the WebUI changes onto the updated card and modal components. The dashboard keeps its stat hooks, and the Members and known-spam tests keep their summary, disclosure, and alert assertions.
Rust formatting, JavaScript syntax, whitespace, and the test timing policy check passed locally. The bot test suite and Dylint were still running in CI for 138f615.
gpt-6.2-sol | 𝕏

Closes #1139
Summary
crates/bot/src/member_rejoin/tests.rs: Replaced fixed-windowinclude_str!checks with async behavioral tests (maybe_emit_defers_rejoin_enrichment_to_log_admission,rejected_departure_keeps_rejoin_delivery_guard,concurrent_guild_member_addition_does_not_double_post_rejoin_note) againstStartupProbe,Handler, and a local hyper fixture.crates/bot/src/member_directory.rs+crates/bot/src/discord.rs+ ban callers (automod.rs,spam_actions.rs,commands/behaviors.rs,commands/plans.rs): Replaced source-file grepping with a compile-timeBanAttemptTokenwitness required ondiscord::automod_ban/discord::ban_with_reasonplus an asyncstart_paused = truedeadline test forreserve_ban_marker.crates/runtime/src/cgroup.rs: Replacedinclude_str!("cgroup.rs")grep with behavioral temp/proc+ cgroup fixture coverage proving host/proc/meminfoand/proc/statnever synthesize cgroup counters andhost_totalis consulted only for numeric v1 limits.crates/api/src/web/mod.rs,recovery.rs,enrollment_tests.rs: Replacedinclude_str!.route(string splitting with a zero-overheadRouteBuilderwrapper that collects registered&'static strpaths under#[cfg(test)].data-testidhooks on dashboard stats (frontend/app.js) and reworked the coupled tests inscripts/frontend-state-test.mjsoff.stat*/.badge/.card/.heroonto semantic role/label/data-testidselectors.analytics/database usagecomment-banner) and obsolete-scale regex checks fromscripts/frontend-contrast-test.mjswhile keeping all WCAG contrast, focus-ring, scale, and responsive layout assertions.frontend/app.jsand its test inscripts/frontend-state-test.mjs(current only, per test(webui): rework tests that pin source text and daisyUI-era classes #1139 / chore: master plan and merge order for the Dec 2026 backlog #1151 decision).Validation
db3e6ad4d940e32a50614a11a9eb6a99fdc71462bash scripts/ci-preflight.sh --only frontend— PASS (frontend-state-test.mjs634/634,frontend-contrast-test.mjs39/39,frontend-warmup-test.mjs13/13,frontend-sr-only-test.mjs1/1,package-webui-test.mjs4/4,administration-state-test.mjs42/42, ESLint + flake 10/10)cargo test --locked -p jmodguard-runtime— PASS (77/77)cargo test --locked -p jmodguard-bot member_rejoin— PASS (32/32)cargo test --locked -p jmodguard-bot member_directory— PASS (12/12)cargo test --locked -p jmodguard-api owner_routes— PASS (2/2 default, 2/2--no-default-features)cargo fmt --checkandcargo clippy --locked -p <pkg> --all-targets -- -D warnings(all 3 crates, API both feature modes) — PASSgit diff --check— PASS/proc/cgroup fixtures, and JSDOM + headless Firefox browser tests; no live Discord/Bunny/remote libSQL calls.Summary by Sourcery
Replace brittle source- and style-based checks with behavior-focused coverage, and remove the obsolete platform analytics API fallback.
Bug Fixes:
Enhancements:
Tests: