Repository navigation
Description
Summary
Apply the new edge-case analysis & property-testing process (core-team /edge-cases skill, catalog candidate P-38) to the highest-risk areas of the codebase: enumerate edge cases per target (boundary-value analysis + the incident-traced bug-class checklist), generate parametrized pytest + Hypothesis property tests for the uncovered ones, and verify honestly — branch coverage everywhere, a scoped mutation-testing gate (--mutate) on the destructive guards.
Context
Target selection is risk-based (churn × complexity ∩ git fix-density ∩ property-testing suitability ∩ blast radius), and the shortlist mirrors real incident history: destructive retention prunes (#1638, #1644), naive/aware + ISO-format timestamp bugs (#1474, #476), NaN cost-accumulator poisoning (#1155), CAS status races (#1082), replay side-effects (#1083). Method lineage: Anthropic's agentic property-based testing workflow (understand → propose properties → generate → reflect → report).
Targets (ranked)
src/backend/services/cleanup_service.pyprune predicates +src/backend/services/retention_guard.py— run with--mutate; a surviving mutant here is a data-loss bug (bug: retention floor (#1065) silently deletes pre-existing execution history on upgrade — currently dev-only, ships to everyone at next release #1638/bug: retention prunes have no blast-radius guard — a mistyped window deletes most of a table within 5 minutes #1644 class)- Timestamp helpers:
src/backend/utils/helpers.py(iso_cutoff,parse_iso_timestamp) +src/scheduler/utils.py— round-trip + format-mixing properties (bug: schedule-triggered executions store naive started_at (no timezone suffix) — UI shows wrong relative time #1474, bug(SUB-003): rate-limit events never age out due to SQLite string-compare bug; retries amplify outages #476, architecture Invariant #16) src/backend/db/schedules/— CAS status writers (precondition-guarded terminal transitions) + analytics aggregation (NULL-skip averages, UTC bucketing)src/backend/services/loop_service.py— budget/deadline/no-progress arithmetic with hostile-float strategies (feat(loops): per-loop cost budget enforced as a hard stop (max_cost_usd) #1155–feat(loops): no-progress / doom-loop detection — stop on repeated identical responses #1157)src/backend/services/credential_paths.py— allow/deny policy; bonus property: byte-identical parity with the vendored agent-server copy on every inputsrc/backend/services/skill_packaging.py— frontmatter parse + archive member vetting (agent-authored input trust boundary)src/backend/services/task_execution_service.py—apply_resultenvelope normalization + status mapping (pure parts only; replay/CAS semantics)
Acceptance Criteria
- Edge-case matrix produced per target (enumerated / already covered / newly covered / unspecified)
- New tests land in
tests/unit/as parametrized pytest + Hypothesis properties, CI-bounded (max_examplescapped,deadline=None), no Docker/network in unit tests -
--mutategate run on target 1; every surviving mutant either killed by a new test or documented as an accepted gap with a reason - Any real bug found ships as a
strict=Truexfail test + its own issue via the normal flow — no silent product-code fixes inside this task -
hypothesisadded to the dev/test requirements if property tests are kept - Full local unit run green (dev's required checks don't execute unit tests — verify locally before merge)
Technical Notes
- One PR per target (or small clusters) rather than one mega-PR, so review stays tractable and a bug finding doesn't block the rest.
- Property tests should pin each subsumed matrix row with
@example(...)so deterministic cases survive even if the random search misses them. - Mutation runs must stay scoped to the target file(s) — never repo-wide.
🤖 Generated with Claude Code
Activity
AndriiPasternak31 commentedon Jul 26, 2026
/claim
github-actions commentedon Jul 26, 2026
Claimed by @AndriiPasternak31. Label
status-in-progressadded.Next steps:
feature/1771-<short-slug>Fixes #1771test(deps): harmonize the #1771 hypothesis block across all three slices
test(db/schedules): edge cases + Hypothesis properties for CAS status…
test(db/schedules): edge cases + Hypothesis properties for analytics …
test(registry): register the four #1771 edge-case/property test files
6 remaining items
test(db/schedules): edge cases + Hypothesis properties for CAS status…
test(db/schedules): edge cases + Hypothesis properties for analytics …
test(registry): register the four #1771 edge-case/property test files
test(db/schedules): make the B9 day-bucketing case date-relative (#1771)
test(db/schedules): close the get_schedule_analytics gap and de-vacuu…
test(deps): harmonize the #1771 hypothesis block across the three slices
test(#1771): restore sys.modules the four 1771c files evict (#762 lint)
test(retention): edge-case + property coverage for the retention blas…
test(db/schedules): edge-case + property coverage for CAS status writ…
test(timestamps): edge-case and property coverage for the ISO helpers…
vybe commentedon Sep 6, 2026
Groom 2026-09-06: claim from 2026-07-26 had no branch, PR, or update in 42 days, so the issue returns to
status-readyand is unassigned. Re-claim when you pick it up.