Repository navigation
Corpus coverage for off-hours-activity: per-case benchmark settings + attack/benign pair - #504
Merged
blitzcrieg1 merged 6 commits intoNov 27, 2026
Conversation
blitzcrieg1
force-pushed
the
feat/off-hours-corpus-36
branch
from
November 27, 2026 17:44
2297533 to
f3d2ad0
Compare
blitzcrieg1
added a commit
that referenced
this pull request
Nov 27, 2026
Generated by Mistral Vibe. Co-authored-by: Mistral Vibe <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #36 (the remaining half: host-subagent-swarm was already covered). Corpus-only task under the bounty program (#454), claimed on the issue. Contributor from #486.
Why a harness change is included
off-hours-activitywas the last published rule with no corpus case, and it could not have one: the rule is opt-in (settings.detect_off_hours) and the benchmark never enabled it, so any case would have recorded a miss. This PR adds per-case settings to the corpus manifest:settings:in corpus.yaml; the benchmark applies them for that case's replay only and restores them afterwards, even on error.detect_off_hours,business_tz,business_hours) — a manifest cannot reach arbitrary settings and quietly disable the rule it claims to exercise. A test pins this.The two cases
attack_off_hours_impact.jsonl, expect[off-hours-activity]): an unscheduled autonomous agent deletes data at 02:30 UTC on a Tuesday. The case pinsbusiness_tz: UTCand a 09–18 window and stamps its events in UTC, so it is reproducible on any host timezone — the trap the issue warns about. The run is approved in-session first, soautonomous-unapproved-writestays quiet and the case pins off-hours alone.benign_human_night_maintenance.jsonl, expect[]): the same hour and the same deletions with a human driving, under the same settings pin — the rule was awake and stayed quiet, because it governs autonomous agents, not people on a night shift. The cron exclusion is deliberately not the benign pair: a cron session at that hour would legitimately tripautonomous-unapproved-write, so it cannot be an expect-nothing case; the exclusion itself is pinned by the rule's unit tests.One existing test fixed
test_the_corpus_exercises_a_meaningful_share_of_the_rulesbounded covered rule ids bylen(REGISTRY)— session rule functions only. Covered ids also include the host rule and the experimental (registered, unpublished)autonomous-unapproved-write; the two counts agreed at 18 only by coincidence, and covering a 19th rule broke the bound. It is now a subset check against the canonical id sets (BUILTIN_RULE_IDS | EXPERIMENTAL_RULE_IDS).Numbers (README refreshed)
Tests collected 3034 → 3037 (+3: settings parsing/pin, the pin gating the opt-in rule, and the allowlist rejection). The detection benchmark, detection rules and README-claims test files are fully green, and ruff is clean. A bare local venv shows identical pre-existing failures on master and on this branch (missing optional extras); CI is the arbiter for the full suite.
(This PR replaces #503, which was built on an unsynced fork master and conflicted on README.md and corpus.yaml; the content is identical, rebased onto current master.)